Skip to content

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.

@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
@Antreesy Antreesy requested a review from hamza221 December 20, 2024 10:58
@ShGKme
Copy link
Contributor

ShGKme commented Dec 20, 2024

But I'm still not sure we need an async module with an addition request for text rendering to save quite a small chunk.

Unlike highlights, which change is not significant, this async chunk either makes a layout shift or stops rendering the content on mount (I'm not sure nobody relies on it).

@ShGKme ShGKme requested a review from juliusknorr December 20, 2024 11:00
@ShGKme ShGKme added the bug Something isn't working label Dec 20, 2024
@ShGKme
Copy link
Contributor

ShGKme commented Dec 20, 2024

Adding bug label, so this change is at least mentioned in the changelog.

@Antreesy Antreesy merged commit 7e601ad into master Dec 27, 2024
18 checks passed
@Antreesy Antreesy deleted the fix/6246/async-load-remark-gfm branch December 27, 2024 08:55
@Antreesy
Copy link
Contributor Author

/backport to next

@susnux susnux modified the milestones: 8.21.1, 8.23.0 Jan 15, 2025
@Antreesy Antreesy changed the title fix(NcRichText): async import remark-gfm library fix(NcRichText): adjust import conditions for rehype-highlight library Feb 13, 2025
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 bug Something isn't working 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

5 participants