Skip to content

Conversation

@JayGeorge
Copy link
Contributor

Description of the Problem

This closes #13728.
When we have nested sticky toolbars in Bard, our existing approach is to cascade the sticky position.

For example:

  • The first sticky toolbar effectively gets stuck to the top of the container
  • Nested fixed toolbars get stuck to the top of the container + the assumed height of the first fixed toolbar, like so:
nested-fixed-toolbars.mp4

The problem with this approach

The above works very well, however, it assumes there is a single row of Bard icons to offset the nested fixed toolbars, with @apply top-8;

As soon as the fixed toolbar has a second, or even(!) a third row, we can no longer rely on the assumed height of the toolbar.
The second or third rows of buttons can also appear when the viewport width is narrower. You can see the problem here:

bard-toolbars-with-multiple-rows.mp4

What this PR Does

  • I think the only way to reliably deal with this is to unstick inactive toolbars rather than stack them
    • This is also cleaner than seeing stacked toolbars
  • Fixes the toolbar position for smaller viewports

Here is the video of the solution. Only the focused bard field has a stuck toolbar. You can see when we focus on an inner bard field around 0:05, all other toolbars get unstuck.

unstuck-bard-toolbars-for-unfocused-fields.mp4

How to Reproduce

  1. Nest a load of Bard fields

… it assumes only a single row of Bard buttons
…pe with a fixed toolbar _with focus_, release the sticky positioning so that it doesn't cover the focused Bard toolbar
@JayGeorge JayGeorge changed the title Nested bard fixed toolbars - remove sticky stacking approach [6.x] Nested bard fixed toolbars - remove sticky stacking approach Jan 30, 2026
@jasonvarga jasonvarga merged commit b2a3bb5 into 6.x Jan 30, 2026
12 of 13 checks passed
@jasonvarga jasonvarga deleted the live-preview-nested-bards branch January 30, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sticky Bard toolbars overlap in Live Preview with nested Bards

3 participants