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

Render description field as markdown #1568

Merged
merged 4 commits into from
Apr 11, 2023
Merged

Render description field as markdown #1568

merged 4 commits into from
Apr 11, 2023

Conversation

waxlamp
Copy link
Member

@waxlamp waxlamp commented Apr 7, 2023

This PR introduces the use of marked and DOMPurify to treat the description metadata field as a Markdown document.

The background here is that we'd like a way to give a bit more control to end users over the formatting of their Dandiset descriptions so they can put, e.g., "release notes" here to let consumers of their data know why they published a new version. The fuller solution for this is tracked in #189, but this feature allows a minor form of that ability in addition to its value in itself.

Closes #1567.

@waxlamp
Copy link
Member Author

waxlamp commented Apr 7, 2023

Reviewers, here's what I'm looking for from each of you:

  • @AlmightyYakob: you have previous experience with markdown rendering via MPF, so I'm looking for your take on how it's been done here.
  • @mvandenburgh: I made some changes to the frontend code to try to simplify a bit, so I need your review of the changes I made.
  • @danlamanna: I followed the guidelines from the Marked people for using this safely, but I did so without fully understanding the risks, so I'd like your take on whether this is a safely implemented feature.

Thanks all!

Copy link
Member

@jjnesbitt jjnesbitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Tested out in staging with some markdown and it rendered correctly.

Copy link
Member

@mvandenburgh mvandenburgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@waxlamp waxlamp merged commit a02f66c into master Apr 11, 2023
@waxlamp waxlamp deleted the markdown-description branch April 11, 2023 15:23
@dandibot
Copy link
Member

🚀 PR was released in v0.3.30 🚀

@dandibot dandibot added the released This issue/pull request has been released. label Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support markdown rendering for description field
5 participants