Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Markdown formatting in all the fields of the "About" page #3371

Merged
merged 4 commits into from
Nov 30, 2020

Conversation

Poslovitch
Copy link
Contributor

@Poslovitch Poslovitch commented Nov 27, 2020

Description

This PR introduces Markdown formatting in additional fields of the instance's "About" page.
It replaces plain-text textareas in the admin configuration by my-markdown-textarea as well as adds the <my-help helpType="markdownText"></my-help> to all of them.
It also registers the missing fields into instance.service.ts so that their content gets rendered as Markdown.

Related issues

Resolves #3368.

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 👍 yes, light tests as follows are enough
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Since my computer is a bit of a potato, I can't efficiently run Docker on it. Therefore, I developed all of that on Gitpod.

The "new" code reuses the same "code" that previously existed. It was just a matter of tweaking some HTML tags and adding a few fields in instance.service.ts. I tested the code by running a dev PeerTube instance and modifying the "config" of the About page a few times (this included: not-formatted text, Markdown-formatted text, blank text fields...).

Screenshots

Proof that the Markdown formatting now works in fields it previously didn't:

image

@Poslovitch
Copy link
Contributor Author

@kimsible textareaHeight is not defined for others my-markdown-textarea (those that were already there prior to this PR). Do you think I should also add it to them?

@kimsible
Copy link
Contributor

@kimsible textareaHeight is not defined for others my-markdown-textarea (those that were already there prior to this PR). Do you think I should also add it to them?

@Poslovitch My bad, sorry, the default textareaHeight for markdown is 150px:

Though this PR adds markdown to all about textarea I think you can actually delete them, 75px looks very small with the preview.

@kimsible
Copy link
Contributor

Thanks for the PR @Poslovitch ! LGTM 👍 !

@Chocobozzz Chocobozzz merged commit f45c7cc into Chocobozzz:develop Nov 30, 2020
@Chocobozzz
Copy link
Owner

Thanks @Poslovitch

@Poslovitch
Copy link
Contributor Author

Thank you too 🙂

@Poslovitch Poslovitch deleted the feature/3368-markdown-about branch November 30, 2020 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Markdown formatting in more instance information sections
3 participants