Conversation
ui's Viewer wraps every document in a relative z-50 layer. In the Inbox's attachment pane neither .ib-docscroll nor .ib-docarea made a stacking context, so that layer escaped into .ib-view and painted the document (the card, table rows, code, callouts, diagrams) over the floating toolstrip (z 3), the error line (z 5) and the stepping bar's file list (z 6), at every width and on a phone. Isolate the file layers (.ib-docscroll, .ib-codeview) and raise the scroller above the chrome only while a dialog the Viewer portals into its own article (the table popout) is open. Plan review / annotate were not affected: StickyHeaderLane sits at z-60 above the Viewer's layer. The new toolstrip-stacking.spec.ts proves both surfaces with elementFromPoint in Chromium.
# Conflicts: # tests/e2e/playwright.config.ts
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bug
In the Inbox, with a markdown attachment open beside a thread (the owner's DESIGN.md), scrolling put the document over the floating Select / Pinpoint / Markup toolstrip: table rows, and in fact the whole document card, painted on top of it.
Root cause
ui's
Viewerwraps every document in arelative z-50layer (Viewer.tsx, the outer wrapper). In the Inbox's attachment pane, neither.ib-docscroll(absolute, no z-index) nor.ib-docarea(relative, no z-index) creates a stacking context. On a phone.ib-docareais isolated, but the strip sits inside it too. So the Viewer's z-50 layer competed directly with the pane's own chrome in.ib-view's stacking context, and won against:.ib-toolstrip(z 3).ib-view-error(z 5).ib-steplist, inside.ib-vfoot(z 6). It opens upward over the document and was drawn under it as well.This happened at every width (beside the thread, full screen, 1000 px, phone) and in both the Grid and Clean looks.
Plan review and annotate are not affected. There the strip rides
StickyHeaderLane, which sits at z-60 above the Viewer's z-50, inside the plan area's own stacking context. The new spec checks this too.Fix (Inbox CSS only, no change to
@plannotator/ui).ib-docscroll, .ib-codeview { isolation: isolate; }: every z-index inside the open file stays inside the file. The pane's chrome now paints above the document..ib-docscroll:has([data-popout]) { z-index: 7; }: the table popout is portaled into the Viewer's own article, so it lives inside the scroller. While it is open, the scroller rises above the chrome, so the popout still covers the toolstrip and the bar the way a dialog should.Proof
New spec
tests/e2e/toolstrip-stacking.spec.ts, added to the Inbox e2e config, runs in Chromium on the compiled binary:document.elementFromPointat 10 points across the strip must land on the strip. The table must actually cross the strip, so the check is never vacuous.Results:
inbox-attachments,inbox-attachments-kinds,inbox-attachment-stepping(32 tests) andinbox-mobile(34 tests) pass on the freshly compiled binary.bun run typecheckpasses.bun test packages/inbox tests/never-touch-the-real-inbox.test.tspasses.