Skip to content
Snippets Groups Projects

Pass a Markdown serializer to the Content Editor

Merged Enrique Alcántara requested to merge content-editor-markdown-serializer into master

What does this MR do?

This MR Refactors the Content Editor to decouple Markdown serializing from the Editor itself. The goal is allowing to customize Markdown serialization by configuring a separate serialization object independently from the Content Editor itself.

What are the serialization/deserialization targets?

When deserializing, we want to convert a Markdown string into a ProseMirror document and serialization performs the inverse operation.

Why is this useful?

We have to parse and render Markdown before converting it into a ProseMirror document. The process of parsing and rendering Markdown varies across use cases. That’s why we want to decouple this operation from the Content Editor.

Screenshots (strongly suggested)

This MR does not introduce user-facing changes. The Content Editor is not used by any feature yet.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Enrique Alcántara

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 1 Warning
    :warning: Please add a merge request type to this merge request.
    1 Message
    :book: CHANGELOG missing:

    If you want to create a changelog entry for GitLab FOSS, run the following:

    bin/changelog -m 58678 "Pass a Markdown serializer to the Content Editor"

    If you want to create a changelog entry for GitLab EE, run the following instead:

    bin/changelog --ee -m 58678 "Pass a Markdown serializer to the Content Editor"

    If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.

    Reviewer roulette

    Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.

    To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

    To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

    Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

    Category Reviewer Maintainer
    frontend Coung Ngo (@cngo) (UTC+1, 5 hours ahead of @ealcantara) Simon Knox (@psimyn) (UTC+10, 14 hours ahead of @ealcantara)

    If needed, you can retry the danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

    Edited by 🤖 GitLab Bot 🤖
  • @himkp: Could you review this MR, please? I decided to stick with the serializer idea. I know that we won’t support serialization targets anytime soon, but the concept is still useful for several reasons:

    • We can group the two operations (to markdown/from markdown) in a single place. This put closely related responsibilities together which increases cohesiveness.
    • It gives us a more consistent API because deserialize/serialize have similar return types and parameters but inverted.
    • We should expose the concept of Markdown Serialization to the features using the Content Editor because they have to configure it by providing a custom render function.
  • Enrique Alcántara changed the description

    changed the description

  • Bundle size analysis [beta]

    This compares changes in bundle size for entry points between the commits 2895caf8 and a3132e46

    :sparkles: Special assets

    Entrypoint / Name Size before Size after Diff Diff in percent
    average 3.15 MB 3.15 MB - 0.0 %
    mainChunk 1.87 MB 1.87 MB - 0.0 %

    Note: We do not have exact data for 2895caf8. So we have used data from: 395a3f53.
    The target commit was too new, so we used the latest commit from master we have info on.
    It might help to rerun the bundle-size-review job
    This might mean that you have a few false positives in this report. If something unrelated to your code changes is reported, you can check this comparison in order to see if they caused this change.

    Please look at the full report for more details


    Read more about how this report works.

    Generated by :no_entry_sign: Danger

    Edited by 🤖 GitLab Bot 🤖
  • Setting label(s) devopscreate sectiondev based on ~"group::editor".

  • Himanshu Kapoor approved this merge request

    approved this merge request

  • Enrique Alcántara requested review from @dmishunov and removed review request for @himkp

    requested review from @dmishunov and removed review request for @himkp

  • added 1 commit

    • e921a1b3 - Provide a Markdown renderer to the Content Editor

    Compare with previous version

  • Enrique Alcántara added 363 commits

    added 363 commits

    Compare with previous version

  • Denys Mishunov marked the checklist item Code review guidelines as completed

    marked the checklist item Code review guidelines as completed

  • Denys Mishunov marked the checklist item Merge request performance guidelines as completed

    marked the checklist item Merge request performance guidelines as completed

  • Denys Mishunov marked the checklist item Style guides as completed

    marked the checklist item Style guides as completed

  • Denys Mishunov marked the checklist item Style guides as incomplete

    marked the checklist item Style guides as incomplete

  • Denys Mishunov marked the checklist item Merge request performance guidelines as incomplete

    marked the checklist item Merge request performance guidelines as incomplete

  • Denys Mishunov marked the checklist item Code review guidelines as incomplete

    marked the checklist item Code review guidelines as incomplete

  • Enrique Alcántara marked the checklist item Code review guidelines as completed

    marked the checklist item Code review guidelines as completed

  • Enrique Alcántara marked the checklist item Style guides as completed

    marked the checklist item Style guides as completed

  • Enrique Alcántara changed the description

    changed the description

  • Denys Mishunov
  • Denys Mishunov
  • Denys Mishunov
  • Enrique Alcántara added 402 commits

    added 402 commits

    Compare with previous version

  • Enrique Alcántara added 324 commits

    added 324 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Denys Mishunov approved this merge request

    approved this merge request

  • Denys Mishunov resolved all threads

    resolved all threads

  • Denys Mishunov enabled an automatic merge when the pipeline for 708cf420 succeeds

    enabled an automatic merge when the pipeline for 708cf420 succeeds

  • Enrique Alcántara aborted the automatic merge because source branch was updated

    aborted the automatic merge because source branch was updated

  • added 69 commits

    Compare with previous version

  • Enrique Alcántara enabled an automatic merge when the pipeline for 4b021d9a succeeds

    enabled an automatic merge when the pipeline for 4b021d9a succeeds

  • Enrique Alcántara changed target branch from master to 273812-use-the-gitlab-folder-and-update-filename-dast

    changed target branch from master to 273812-use-the-gitlab-folder-and-update-filename-dast

  • Enrique Alcántara aborted the automatic merge because target branch was changed

    aborted the automatic merge because target branch was changed

  • Enrique Alcántara changed target branch from 273812-use-the-gitlab-folder-and-update-filename-dast to master

    changed target branch from 273812-use-the-gitlab-folder-and-update-filename-dast to master

  • mentioned in commit e61d74af

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading