[go: up one dir, main page]

Skip to content

Refactor preview markdown for PersonalSnippets

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Please note:

The changes required to address this issue will be completed behind the feature flag :personal_snippet_reference_filters.

This is to ensure a consistent user experience until all changes are complete (reference filtering, previewing, background migration of existing content)


Summary

In order to support previewing GFM references on PersonalSnippets, we need access to the Snippet and it's author, when previewing the markdown.

Currently the endpoint for fetching the markdown preview for Snippets (both description and comments), is for the Snippets collection - /snippets/preview_markdown, but it will need to be modified to be for the member, e.g. snippets/1/preview_markdown, so that we can establish the user parent, once it is implemented in #217305 (closed)

This involves route modifications and changing the concern so it modifies the context accordingly (i.e. here) as well as a front-end change to use the new route (minor 🤞)

Risks

The PreviewMarkdown concern is used in multiple places, so we will need to investigate to ensure (and test) that we have not introduced a regression in those places.

Edited by 🤖 GitLab Bot 🤖