refactor: rename tablet marker to floating-window--tablet-viewport, add shell naming maps
The right-padding bug recurred three times because 'Task Detail modal' names ONE surface with THREE shells and fixes kept landing in the wrong file. Disambiguate: - Rename the just-introduced .floating-window--tablet marker to .floating-window--tablet-viewport and document the naming contract next to it: --tablet-viewport = viewport MODE classifies tablet (touch or not, styling surface); --touch-geometry = tablet AND touch (enlarged 44px targets only). - Add SHELL NAMING MAP breadcrumbs at the top of TaskDetailModal.css and TerminalModal.css pointing inset/padding fixes at the FloatingWindow shell that tablet popups and floating terminals actually render through. Comment wording deliberately avoids dot-prefixed class tokens because FloatingWindow.test.tsx scans raw CSS (comments included) with selector regexes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,4 +4,4 @@
|
||||
|
||||
summary: Fix uneven right padding on tablet task/terminal popups; drag the terminal from anywhere in its toolbar.
|
||||
category: fix
|
||||
dev: Tablet-mode FloatingWindows (`.floating-window--tablet`) zero the FN-8015 scrollbar gutter; GitHub-import detail compensates locally. Terminal tab-strip empty space now bubbles to the `.terminal-header` drag handle (`touch-action: none` on the tablet floating header supersedes the FN-8633 pan-x contract).
|
||||
dev: Tablet-mode FloatingWindows (`.floating-window--tablet-viewport`) zero the FN-8015 scrollbar gutter; GitHub-import detail compensates locally. Terminal tab-strip empty space now bubbles to the `.terminal-header` drag handle (`touch-action: none` on the tablet floating header supersedes the FN-8633 pan-x contract).
|
||||
|
||||
@@ -545,13 +545,13 @@ Tablet windows drop FN-8015's inline-end scrollbar gutter. On tablet the gutter
|
||||
too-big, uneven right border inside Task Detail popups and the floating terminal (the inner
|
||||
surfaces already carry their own symmetric padding), and the mouse conflict FN-8015 solves —
|
||||
grabbing a hosted scrollbar thumb versus the east resize hot zone — does not apply to touch
|
||||
input, which never grabs scrollbar thumbs. This keys on tablet MODE (`.floating-window--tablet`,
|
||||
input, which never grabs scrollbar thumbs. This keys on tablet MODE (`.floating-window--tablet-viewport`,
|
||||
set from `useViewportMode()`), not `--touch-geometry`, so a non-touch window at tablet widths
|
||||
gets the same symmetric inset the operator sees on an iPad. Desktop keeps the FN-8015 gutter.
|
||||
Callers that relied on the gutter as their right inset must compensate under the same class
|
||||
(see `.github-import-detail-panel`).
|
||||
*/
|
||||
.floating-window--tablet .floating-window__body {
|
||||
.floating-window--tablet-viewport .floating-window__body {
|
||||
margin-inline-end: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -233,15 +233,19 @@ export function FloatingWindow({
|
||||
*/
|
||||
const hasTabletTouchGeometry = isTabletTouchViewport(viewportMode);
|
||||
/*
|
||||
FNXC:ModalTouchGeometry 2026-08-01-03:48:
|
||||
Tablet MODE (touch or not) is a distinct styling surface from touch geometry: a 900px
|
||||
non-touch window classifies tablet without `--touch-geometry`, yet operators still see the
|
||||
FN-8015 scrollbar gutter as an uneven right inset there (third recurrence of the Task Detail
|
||||
right-padding bug — FN-8630/FN-8634 fixed only the `.modal-overlay` shells, while every
|
||||
tablet task popup and floating terminal renders through THIS host). Expose the mode as a
|
||||
class so FloatingWindow.css can zero the gutter for all tablet windows.
|
||||
FNXC:ModalTouchGeometry 2026-08-01-04:23:
|
||||
NAMING CONTRACT — FloatingWindow has two distinct tablet markers; do not conflate them:
|
||||
- `floating-window--tablet-viewport`: the viewport MODE classifies as tablet (769-1024px
|
||||
width OR a known 768px touch tablet), touch or not. Pure styling surface — currently the
|
||||
FN-8015 gutter zeroing lives here.
|
||||
- `floating-window--touch-geometry`: tablet AND touch-capable (`isTabletTouchViewport`) —
|
||||
enlarged 44px drag/resize targets only.
|
||||
A 900px non-touch window is `--tablet-viewport` but NOT `--touch-geometry`, and operators
|
||||
still see the FN-8015 scrollbar gutter as an uneven right inset there (third recurrence of
|
||||
the Task Detail right-padding bug — FN-8630/FN-8634 fixed only the `.modal-overlay` shells,
|
||||
while every tablet task popup and floating terminal renders through THIS host).
|
||||
*/
|
||||
const isTabletMode = viewportMode === "tablet";
|
||||
const isTabletViewportMode = viewportMode === "tablet";
|
||||
const initialGeometry = useRef<{ size: FloatingWindowSize; position: FloatingWindowPosition } | null>(null);
|
||||
/*
|
||||
FNXC:ModalGeometryPersistence 2026-07-16-00:40:
|
||||
@@ -648,7 +652,7 @@ export function FloatingWindow({
|
||||
>
|
||||
<div
|
||||
ref={panelRef}
|
||||
className={`floating-window${hideHeader ? " floating-window--headerless" : ""}${hasTabletTouchGeometry ? " floating-window--touch-geometry" : ""}${isTabletMode ? " floating-window--tablet" : ""}${className ? ` ${className}` : ""}`}
|
||||
className={`floating-window${hideHeader ? " floating-window--headerless" : ""}${hasTabletTouchGeometry ? " floating-window--touch-geometry" : ""}${isTabletViewportMode ? " floating-window--tablet-viewport" : ""}${className ? ` ${className}` : ""}`}
|
||||
style={panelStyle}
|
||||
data-testid={`floating-window-${windowKey}`}
|
||||
onPointerDownCapture={bringToFront}
|
||||
|
||||
@@ -329,11 +329,11 @@ Padding lives on the panel rather than the pane content so header, toast, and sc
|
||||
|
||||
/*
|
||||
FNXC:GitHubImport 2026-08-01-03:48:
|
||||
Tablet windows zero the shared FN-8015 body gutter (`.floating-window--tablet .floating-window__body`
|
||||
Tablet windows zero the shared FN-8015 body gutter (`.floating-window--tablet-viewport .floating-window__body`
|
||||
in FloatingWindow.css) because it rendered as an uneven right border on tablet. This panel's right
|
||||
inset was supplied by that gutter, so restore it locally to keep the panel's insets symmetric.
|
||||
*/
|
||||
.floating-window--tablet .github-import-detail-panel {
|
||||
.floating-window--tablet-viewport .github-import-detail-panel {
|
||||
padding-inline-end: var(--space-lg);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
/* === Detail Modal === */
|
||||
/*
|
||||
FNXC:TaskDetailLayout 2026-08-01-04:23:
|
||||
SHELL NAMING MAP — read before fixing any Task Detail inset/padding bug. "Task Detail modal"
|
||||
is ONE surface with THREE shells, and only one of them lives in this file's `.modal-overlay`
|
||||
rules: (1) the fixed desktop modal (`.modal-overlay` + `.modal.task-detail-modal`, this file),
|
||||
(2) the tablet popup and desktop pop-out (FloatingWindow.css — class floating-window--task-detail,
|
||||
whose shared body element owns the FN-8015 inline-end gutter and the tablet-viewport zeroing),
|
||||
and (3) the mobile full-screen sheet. The right-
|
||||
padding bug recurred across FN-8630, FN-8634, and the 2026-08-01 tablet fix precisely because
|
||||
fixes landed only in shell (1) while the reporter was looking at shell (2).
|
||||
*/
|
||||
.task-detail-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -7,6 +7,14 @@ FN-6603 found that unicode-range scoping is not enough when the symbols face is
|
||||
|
||||
FNXC:Terminal 2026-06-20-18:04:
|
||||
FN-6811 recurrence #6 tightened ownership of this scoped symbols face: every terminal surface that exposes the DOM glyph fallback must define the same ASCII-excluding @font-face in its own CSS chunk, and tests must check each CSS owner independently rather than relying on combined app CSS.
|
||||
|
||||
FNXC:TerminalLayout 2026-08-01-04:23:
|
||||
SHELL NAMING MAP — the terminal renders through FIVE shells and only some live in this file:
|
||||
docked/below panels and the mobile sheet are plain `.modal`/host elements styled here, but the
|
||||
FLOATING pop-out wraps `terminalContent` in FloatingWindow (FloatingWindow.css), whose shared
|
||||
body element owns the FN-8015 inline-end gutter and the tablet-viewport zeroing. An
|
||||
inset/padding bug reported "on the terminal
|
||||
modal" in tablet view is almost certainly the FloatingWindow shell, not a rule in this file.
|
||||
*/
|
||||
@font-face {
|
||||
font-family: "Fusion Terminal Nerd Font Symbols";
|
||||
|
||||
@@ -210,13 +210,13 @@ describe("FloatingWindow", () => {
|
||||
*/
|
||||
const tabletBody = cssRuleContaining(
|
||||
floatingWindowCss,
|
||||
".floating-window--tablet .floating-window__body",
|
||||
".floating-window--tablet-viewport .floating-window__body",
|
||||
"margin-inline-end",
|
||||
);
|
||||
expect(tabletBody).toContain("margin-inline-end: 0;");
|
||||
const tabletGitHubImportPanel = cssRuleContaining(
|
||||
allAppCss,
|
||||
".floating-window--tablet .github-import-detail-panel",
|
||||
".floating-window--tablet-viewport .github-import-detail-panel",
|
||||
"padding-inline-end",
|
||||
);
|
||||
expect(tabletGitHubImportPanel).toContain("padding-inline-end: var(--space-lg);");
|
||||
@@ -251,10 +251,10 @@ describe("FloatingWindow", () => {
|
||||
/*
|
||||
FNXC:ModalTouchGeometry 2026-08-01-03:48:
|
||||
Tablet MODE is its own styling marker, distinct from `--touch-geometry`: a non-touch window
|
||||
at tablet widths must still receive `floating-window--tablet` so the FN-8015 gutter zeroing
|
||||
at tablet widths must still receive `floating-window--tablet-viewport` so the FN-8015 gutter zeroing
|
||||
applies everywhere the app classifies the viewport as tablet.
|
||||
*/
|
||||
it("marks tablet-mode windows with floating-window--tablet even without touch", () => {
|
||||
it("marks tablet-mode windows with floating-window--tablet-viewport even without touch", () => {
|
||||
vi.stubGlobal("matchMedia", vi.fn((query: string) => ({
|
||||
matches: query === "(min-width: 769px) and (max-width: 1024px)",
|
||||
media: query,
|
||||
@@ -271,7 +271,7 @@ describe("FloatingWindow", () => {
|
||||
</FloatingWindow>
|
||||
);
|
||||
const panel = screen.getByTestId("floating-window-tablet-mode");
|
||||
expect(panel.className).toContain("floating-window--tablet");
|
||||
expect(panel.className).toContain("floating-window--tablet-viewport");
|
||||
});
|
||||
|
||||
it("keeps task-detail long content clear of right handles while preserving short-content right-edge resize", () => {
|
||||
|
||||
Reference in New Issue
Block a user