mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-03 23:23:21 +00:00
fix(app): make the compact Explorer tab rail usable on phones (#7589)
Popovers on Android landed one status bar below their trigger. React Native 0.86 stopped subtracting the status bar from window coordinates under edge-to-edge, so measureInWindow, touch pageY and a full-screen Modal already share screen-top coordinates; the old StatusBar.currentHeight compensation in the menu engine, tooltip, context menu and sidebar long-press now double-shifted every anchor. Compact tabs keep their natural width and the rail scrolls as soon as they overflow, instead of squeezing labels first and then scrolling anyway. They drop the inline close because the long-press sheet already closes a tab and a narrow X beside the label is easy to hit. Any scrolling rail keeps natural widths rather than collapsing every chip to the minimum, and the rail resets its offset when scrolling ends so tabs scrolled out of view come back. The Explorer rail paints the sidebar surface, so its chips climb the sidebar hover and selected tokens. Light themes paint the sidebar with surface2, which made the surface2 active chip invisible there. The compact Explorer closes with the same X as the compact agent list, and the compact + menu omits Diff because compact Changes already shows diffs inline.
This commit is contained in:
@@ -83,7 +83,12 @@ literal `"explorer"` pane id and `explorerPaneIdByWorkspace` key for compatibili
|
||||
|
||||
Explorer uses the shared workspace tab row and ordinary tab context menus. Files and Changes
|
||||
hide their close buttons through the panel manifest; close them from the tab context menu.
|
||||
Other tabs reveal the close control on hover. The + menu opens compatible panels in the dock, including Agent and terminal profiles.
|
||||
Other tabs reveal the close control on hover. Compact layouts show no inline close on any tab,
|
||||
since a narrow X beside the label is easy to hit by accident; the long-press menu closes it.
|
||||
Compact tabs also keep their natural width and the rail scrolls as soon as they overflow, while
|
||||
pointer layouts shrink tabs toward the clickable minimum first. A rail that scrolls never truncates.
|
||||
The + menu opens compatible panels in the dock, including Agent and terminal profiles. Compact
|
||||
layouts omit Diff from it because compact Changes shows each file's diff inline.
|
||||
Web also supports dragging agents and terminals into Explorer.
|
||||
Bulk-close actions apply only to the dock's tabs. Explorer tabs can be reordered and dragged
|
||||
between compatible panes, but the dock cannot be split or maximized. Selecting an Explorer tab
|
||||
|
||||
@@ -282,10 +282,12 @@ left = anchorRect.x - hostRect.x;
|
||||
bottom = hostRect.height - (anchorRect.y - hostRect.y) + offset;
|
||||
```
|
||||
|
||||
Do this before adding any platform offset. If anchor and host are both measured
|
||||
with `measureInWindow`, Android's status-bar coordinate behavior cancels out.
|
||||
Only add a status-bar offset when the render surface is not measured in the same
|
||||
coordinate system. See `tooltip.tsx` for that separate case.
|
||||
Do this before adding any platform offset. The app draws edge-to-edge on Android, so
|
||||
`measureInWindow`, touch `pageY`, and a full-screen `Modal` all share one coordinate
|
||||
space that starts at the screen top. Do not add `StatusBar.currentHeight` to an anchor:
|
||||
React Native 0.86 stopped subtracting the status bar from window coordinates under
|
||||
edge-to-edge, and the old compensation now lands every menu, tooltip, and context menu
|
||||
one status bar below its trigger.
|
||||
|
||||
## Gotcha 5 — The two-measurement flash
|
||||
|
||||
|
||||
Reference in New Issue
Block a user