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

[Task]: Support markdown in add-on listing fields #15145

Closed
5 tasks
abyrne-moz opened this issue Nov 6, 2024 · 11 comments · Fixed by mozilla/addons-server#22956
Closed
5 tasks

[Task]: Support markdown in add-on listing fields #15145

abyrne-moz opened this issue Nov 6, 2024 · 11 comments · Fixed by mozilla/addons-server#22956
Assignees
Labels
qa:verified_fix repository:addons-frontend Issue relating to addons-frontend
Milestone

Comments

@abyrne-moz
Copy link

abyrne-moz commented Nov 6, 2024

Description

Support markdown in various add-on listing fields to make it easier for add-on users to absorb information. The fields should include:

  • Add-on summary description
  • Privacy policy
  • Developer Comments

Once this feature is enabled, straight HTML tags should no longer be allowed in any add-on fields. Existing HTML already existing in these fields before the feature is enabled should be unaffected and still render as before.

Acceptance Criteria

Milestones/checkpoints

Preview Give feedback

Checks

  • If I have identified that the work is specific to a repository, I have removed "repository:addons-server" or "repository:addons-frontend"

┆Issue is synchronized with this Jira Task

@abyrne-moz abyrne-moz added needs:info repository:addons-frontend Issue relating to addons-frontend labels Nov 6, 2024
@willdurand
Copy link
Member

Add-on summary

FWIW this is used in the main card on an add-on detail page, and I think it makes sense to have a "raw" string there, otherwise that might change how detail pages look.

Also, what markup are we talking about? We do support some html tags in some other fields but "straight HTML tags should no longer be allowed in any add-on fields" makes me think that we're more thinking about markdown than markup? Or is this a new thing?

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Nov 6, 2024

Also, what markup are we talking about? We do support some html tags in some other fields but "straight HTML tags should no longer be allowed in any add-on fields" makes me think that we're more thinking about markdown than markup? Or is this a new thing?

@willdurand, Markdown support more frequently than not includes support for a significant subset of HTML5. That is part of its popularity – it is in most situations to HTML as YAML is to JSON.

Consequently, I would say that there is no need to prevent an author using basic HTML5 tags, like <i>, <s>, or <b>. It may be useful when duplicating markup between the extension page to a webpage, as is common for extensions listed in multiple places.

@abyrne-moz
Copy link
Author

I definitely meant mark_down,_ not mark_up_. I'll edit the ticket.

@abyrne-moz abyrne-moz changed the title [Task]: Support markup in add-on listing fields [Task]: Support markdown in add-on listing fields Nov 6, 2024
@KevinMind
Copy link
Contributor

Notes:

  • html to markdown compatibility
  • how do we do validation on markdown, is it different to how we do it currently

@chrstinalin
Copy link

@abyrne-moz When you say 'summary', do you mean the add-on description? The fields that expect HTML on the Addon model are: description, developer_comments, eula, and privacy_policy. Summary is not included (though, FE still allows HTML included in the summary to render).

image

Should eula be excluded as well?

@abyrne-moz
Copy link
Author

Excellent spot, it should be the Description, not the Summary - my mistake! the eula should be in scope for markdown as well, as it currently supports HTML.

I'll update the description with the correct field too.

@alexandruschek
Copy link

Hello,

I checked on -DEV ENV the following: addon description, privacy policy & eula, developer comments, version notes; they all display html code as expected now:
Image

Thank you! Adding the label: verified fix to this task

@ioanarusiczki
Copy link

I looked a bit on the new markdowns in all fields and wfm except for abbreviations and filed #15316 ✔️

Tried all mentioned fields for https://addons-dev.allizom.org/en-US/firefox/addon/bun-la-toate/ ✔️

Image

Blockquotes on frontend doesn't look as in rev tools pages (where I think it's the correct layout) -> for the same addon https://reviewers.addons-dev.allizom.org/en-US/reviewers/review/635484 but that's reproducible on stage atm too, for example developer comments versus reviewer page for https://addons.allizom.org/en-US/firefox/addon/install-and-report/

Blockquotes rev tools
Image

Blockquotes frontend
Image

@Juraj-Masiar
Copy link

Juraj-Masiar commented Mar 4, 2025

The Ordered / Unordered lists are both wrongly rendered, it's just a normal text, there is no ul / li, and thus no padding / margin.
This is how it suppose to look:

Image

And this is what AMO looks like:

Image


And some real world example from one of my addons:

Image

@diox
Copy link
Member

diox commented Mar 4, 2025

@Juraj-Masiar thanks for catching that, could you file a new bug with that information ?

@Juraj-Masiar
Copy link

Reported: #15425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified_fix repository:addons-frontend Issue relating to addons-frontend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants