Skip to content

Move all markdown parsing from /vue-strap to /markbind #969

@ang-zeyu

Description

@ang-zeyu

Is your request related to a problem?
#889 - larger bundle size increases loading times, which can cause FOUC more frequently

Somewhat related:
#36 - would be a good time to tackle this, while still supporting deprecated attributes ( a quick script can also be written to convert old markbind documents to standardise all attributes )

Currently, the the client is responsible for rendering markdown provided as attributes in vue components ( e.g. modals, panels, popovers, tabs ).

Problems:

  1. This may be bloating the resulting bundle size ( yet to test impact ), exacerbating FOUC
  2. Impact on loading times due to more client side rendering, especially on large documents
  3. ( opinion ) Cohesion & consistency
    3.1 Attribute rendering should be done only when building or purely in the client, not both. Currently, it is also done when building for panel headers for heading indexing. ( boxes if implemented similarly too - x of the dismissible boxes it not at the top-right corner #962 ) This can also make the code more difficult to understand for newer developers.
    3.2 Markdown headers inserted using vue's slots are parsed in /markbind, but those inserted with attributes are not.

Other positive side effects:

  1. Easier to accomplish a rewrite for Migrate all MarkBind components from vue-strap to bootstrap-vue #814, with decoupling of /vue-strap from markdown-it.

Describe the solution you'd like
Move all markdown parsing in /vue-strap to /markbind, aiming to remove markdown-it as a dependency from /vue-strap altogether.

Cons if moved:

  1. More per-component logic in parser.js ( though, it already has quite a bit )
  2. Slightly harder to add new components with attributes requiring markdown parsing
  3. Slight increase in build times ( though, it would likely be offsetted by the decrease in loading time due to lack of client-side rendering when using markbind serve )
  4. Potentially high initial risk of regressions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions