Repository navigation
fix(app-shell): the Studio read-only link at a tab row's end folds to its icon instead of being cut to "Rea" (objectui#12707) - #12792
Conversation
… its icon instead of being cut to "Rea" (objectui#12707) The read-only link at the end of an item's tab row (Automations flow, Access permission set) now folds to its layers icon when the row cannot hold it whole, measured from the tab row's own width; folded, its label stays its accessible name, its title its tooltip, and its link target is unchanged. Claude-Session: https://claude.ai/code/session_01Umh5XoHZFaBP7A8Kc2g2Jc Co-authored-by: Claude <noreply@anthropic.com>
席位核对 — ACCEPT · objectui#12707 · head
|
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Landing · head
|
Fixes #12707
Clause-②: no
What changed
Target 1: the read-only chip in a tab row. Measured on main 80863ad at 1024 px (HotCRM, Automations, Enroll Members in Campaign): the flow's tab row is 436 px wide and the full "Read-only · Customize with an overlay" link is 254 px, so the row's scrollWidth is 636 and only 54 px of the link shows, which is the icon and "Rea". The link was never squeezed; it overflowed the row's sideways scroll.
StudioItemHeadernow tells the children of its tab row which row they sit in, through a React context; no prop was added.useStudioTabRowFold, in the same file, measures that row: the tabs' right edge, plus the gap and the slot's padding, plus the chip's full width, against the row's own clientWidth. It re-measures on every render and from a ResizeObserver, never by viewport or breakpoint. The chip unfolds as soon as the row has room again.StudioReadOnlyLink(internal) uses the hook. Folded, it is a 28 px glyph-only chip: its text stays in the DOM as sr-only, so its accessible name is the same in both forms, its title (the existing pillar sentence) stays its tooltip, and its href is unchanged.data-testid="studio-readonly-link"and the package chip'sstudio-pkg-readonlyare untouched. No i18n key was added.PermissionMatrixEditor'schrome.chips; that file is unchanged. The placements in the Data and Interfaces title rows are not in a tab row and never fold; there the link is whole and the title truncates first.whitespace-nowrap shrink-0, and the row keeps its sideways scroll and edge fades (objectui#12611).Target 2: the Unpublished draft chip in Data and Interfaces. Measured first, as the ruling asks: in a writable package with a draft object, at a 560 px header row the chip is 122 px, reads "Unpublished draft" whole, and sits inside the row. objectui#12611 already covers it, so nothing changed there; a CONTROL test pins it.
Deviations
engine.studio.pkg.readonlyLink). The tooltip is the placement's existing title (engine.studio.pkg.readonlyHinton Automations). No new key; the name does not change between forms.useStudioTabRowFoldfromStudioItemHeader.tsx, a module the package entry does not re-export.Screenshots (HotCRM, read-only under objectstack dev)
DOM read at capture:
Test evidence (head
78306de; this PR's head9dc644cis the same tree as one commit)StudioDesignSurface.readOnlyChipFold-12707.test.tsx, 7 passed. It runs the real AutomationsPillar with a flow open, read-only. At 800 px the link is whole. At 560 px it is glyph-only, with the accessible name, the title and the same href. It folds and unfolds as the row resizes. The tab labels stay nowrap and the row still scrolls. CONTROLs: the chip in a title row never folds; the Unpublished draft chip keeps its Studio at 1024 px: the read-only app chip, the flow item header and the Access tabs truncate or wrap #12611 fold.pnpm --filter @object-ui/app-shell test, in full: exit 0, Test Files 1484 passed and 1 skipped, Tests 13945 passed and 9 skipped.pnpm --filter @object-ui/app-shell type-check: exit 0.build: exit 0. eslint on the touched files: exit 0, 0 errors.pnpm check:i18n-keys,pnpm check:i18n-drift,node scripts/check-changeset-presence.mjs,pnpm check:new-line-citations: all exit 0.Acceptance notes
Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01Umh5XoHZFaBP7A8Kc2g2Jc