Enable GFM for snippet's blob and desc rendering
What does this MR do?
- Enables GFM for snippet's Description and Blob Content fields when viewing a snippet. This is supposed to solve #214435 (closed) and #216381 (closed)
- Moves out Description rendering out of
snippet_title
component into a separate one - Since GFM functionality is supposed to be re-used, a new mixin
app/assets/javascripts/vue_shared/mixins/markdown_field_mixin.js
is created. The mixin is immediately used by the before mentioned Description and Blob Content components.
:snippets_vue
) so no Changelog entry has been provided.
Why not 3 different MRs?
Very good question. However, this is done for efficiency of the process. In the light of the upcoming work of enabling :snippets_vue
flag by default, it makes sense to merge related issues that affect the usability of the refactored Snippet view as soon as possible. Splitting this MR into several ones might have unnecessary delay the process.
Testing
To test, one needs to enable the :snippets_vue
feature flag in the local GDK.
Screenshots
Before | After | |
---|---|---|
Description (using Mermaid diagram as an example) | ![]() |
![]() |
Blob Content (KaTeX) | ![]() |
![]() |
Blob Content (Mermaid diagram) | ![]() |
![]() |
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
References #216381 (closed) #214435 (closed)
Edited by 🤖 GitLab Bot 🤖