fix(app): let touch users close a secondary panel tab (BM-67) - #2
Open
jonolee-kr wants to merge 3 commits into
Open
fix(app): let touch users close a secondary panel tab (BM-67)#2jonolee-kr wants to merge 3 commits into
jonolee-kr wants to merge 3 commits into
Conversation
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.
Problem
The tab close button in the secondary panel reveals on hover. A touch user cannot hover, so a touch user could not close a tab.
A coarse-pointer fallback already existed, but every rule was gated behind the
max-md:width variant, which only applies under 768px. A tablet, or a phone in landscape, is 768px or wider, so touch users there got nothing.On an iPad at 810px the close button was not merely invisible — it was
pointer-events: none, so it was unreachable even by a lucky tap.Change
Remove the
max-md:width gate from every coarse-pointer rule intab-pill.tsx. The close button now reveals and sizes correctly on any coarse pointer at any viewport width.Zero
max-mdtokens remain in the file. This brings tablets to parity with the behaviour phones already ship. No pixel values changed.Verification
Playwright with emulated touch, measuring computed style on the real component:
pointer-events: none, 16x16, pill 28pxauto, 20x20, pill 36pxNo console errors at any size. Tapping the X on the Diff tab at 810px removed Diff and left Browser active - it did not switch tabs.
Also verified:
tab-pilltests, including a mutation proof that they fail when the gates are restored.TabPillcall sites.@media (pointer: coarse).Only
SecondaryPanelTabStrippasses a close action, and only for unpinned tabs. Pinned tabs keep their leading icon.Known, pre-existing, not addressed here
COARSE_POINTER_TEXT_SM_CLASSkeeps its ownmax-mdgate, so a tablet shows 12px label text in a 36px pill vs 15px on a phone. That constant has 45 consumers, so it was left alone.🤖 Generated with Claude Code