Skip to content

Conversation

@leekelleher
Copy link
Member

@leekelleher leekelleher commented Aug 5, 2025

Description

One of the issues outlined in #19728 is the layout shift once the Tiptap RTE has loaded.
The main reason for this is that each toolbar item is an extension, which is loaded in asynchronously, and when there are numerous toolbar items, this can visually appear quite jarring.

Important

Issue #19728 should not be resolved by this, as there are other issues to investigate there.

This fix refactors how the toolbar extension items are loaded in, along with adding skeleton UI during loading, a minimum-height for the toolbar's rows and groups has also been added, so that the vertical layout shift is reduced.

How to test?

Try loading the Tiptap RTE on a document before and after this patch. Specifically notice how the toolbar items are loaded in, after the initial load, and then on subsequent loads. A good scenario is to try within a Block List element, either inline or sidebar modal, (it's quicker to see the build-up/tear-down of the RTE component).

Copilot AI review requested due to automatic review settings August 5, 2025 10:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses layout shift issues in the Tiptap Rich Text Editor by adding minimum heights to toolbar components and improving the loading state visual appearance. The changes help reduce the jarring visual effect that occurs when toolbar items load asynchronously.

  • Add minimum heights to toolbar rows and groups to prevent vertical layout shift
  • Improve loading state by conditionally showing editor border only after content loads
  • Update CSS box-sizing and height values to use design system tokens

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tiptap-toolbar.element.ts Adds minimum heights and box-sizing to toolbar container and groups
tiptap-statusbar.element.ts Adds box-sizing property to statusbar styling
input-tiptap.element.ts Conditionally shows editor border based on loading state and adds data attribute

@iOvergaard iOvergaard merged commit b3d5744 into main Aug 8, 2025
27 checks passed
@iOvergaard iOvergaard deleted the v16/bugfix/tiptap-layout-shift branch August 8, 2025 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants