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

fix(NcRichText): async import remark-gfm library #6259

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Antreesy
Copy link
Contributor

☑️ Resolves

🖼️ Screenshots

No visual changes

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 3️⃣ Backport to next requested with a Vue 3 upgrade
    Signed-off-by: Maksim Sukharev [email protected]

@Antreesy Antreesy added 3. to review Waiting for reviews technical debt feature: richtext Related to the richtext component labels Nov 22, 2024
@Antreesy Antreesy added this to the 8.21.1 milestone Nov 22, 2024
@Antreesy Antreesy self-assigned this Nov 22, 2024
Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

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

I'm not sure this is a good idea with remark-gfm.

If the connection is slow - it first renders the raw text value, and then it flashes to rendered Markdown.

Unlike code => code with highlights update, this is a huge visible change. Imagine a message with headings and lists, that is first a plain text and then formatted.

I'm not sure we need a dynamic module here. But if we do it, we should render content ONLY when remark-gfm is loaded, and render nothing during loading.

src/components/NcRichText/NcRichText.vue Outdated Show resolved Hide resolved
src/components/NcRichText/NcRichText.vue Outdated Show resolved Hide resolved
src/components/NcRichText/NcRichText.vue Outdated Show resolved Hide resolved
@Antreesy Antreesy force-pushed the fix/6246/async-load-remark-gfm branch from cc74645 to 49ce673 Compare November 25, 2024 23:53
@Antreesy Antreesy requested a review from ShGKme November 25, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews feature: richtext Related to the richtext component technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] NcRichText: remark-gfm could be async loaded to reduce initial size
2 participants