[6.x] Nested bard fixed toolbars - remove sticky stacking approach #13750
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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
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