Repository navigation
fix(app-shell): permission grid signals cut columns and pins its Object column and field header - #27909
Merged
Conversation
…ct column and field header The permission-set grid is wider than its pane at 1440 px and on a phone. A fade on the pane's right edge now says columns are cut, the Object column is pinned to the left edge, an expanded object's field header pins under the matrix header, and two fields sharing a label draw their API names as the distinguishing text. Claude-Session: https://claude.ai/code/session_01Utp6CYzrSNZwgsCPhWGAbi Co-authored-by: Claude <noreply@anthropic.com>
… chrome pins Claude-Session: https://claude.ai/code/session_01Utp6CYzrSNZwgsCPhWGAbi Co-authored-by: Claude <noreply@anthropic.com>
2 tasks
Contributor
Author
|
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh 席位核对ACCEPT · head
Generated by Claude Code |
3 tasks
9 tasks done
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.
Requested by Bill · project thread
维护者速读
MatrixScrollPane.tsx(新文件,渐隐提示);PermissionMatrixEditor.tsx的STICKY_OBJECT_CELL/FIELD_HEAD_CELL两个常量及其使用处;FieldsSubTable里的sharesLabel。pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.gridChrome-27866.test.tsx,预期 9 条全部通过。Fixes #27866
Clause-②: no
Metadata-protocol: none
What changes
All in
ui/packages/app-shell/src/views/metadata-admin/(app-shell is private; it ships inside@object-ui/console):MatrixScrollPane.tsxreplaces the bareoverflow-autobox around the matrix, on the routed page (PermissionTable) and the Studio Objects tab (StudioObjectMatrix). It reads its own box on scroll and on resize (readPaneOverflow) and, while columns are cut on the right, draws anaria-hiddenfade over the pane's right edge (perm-matrix-overflow-cue); the fade goes once the last column is in view. It also stampsdata-scrolled-xonce the pane has scrolled sideways.STICKY_OBJECT_CELLpins the Object header and every object row's first cell to the pane's left edge over an opaque background, and draws the column's right edge whiledata-scrolled-xis set. Row tints (the routed page's hover, the Studio row's active state) are laid on as a background image so the pinned cell keeps them. On a phone the routed page's Object column isw-36(wasw-72) and the(api_name)aside is hidden belowsm, so the pinned column takes ~178 px of 390 instead of ~332.FIELD_HEAD_CELLpins the field sub-table's header cells totop-9, under the matrix header row (nowh-9on the routed page; the Studio row already was), while the sub-table is in view. Field rows scrolled under the matrix header are labelled by their own Field / Read / Edit / When columns, not by the object columns above.(api_name)in the foreground, monospace, instead of the muted aside, and carriesdata-shared-label.No i18n key, no export from a published package, no metadata change.
Tests
PermissionMatrixEditor.gridChrome-27866.test.tsx(9 tests):readPaneOverflowcases, then on both renderings: the cue shows while the stubbed pane is cut and goes at the end (and for a grid that fits),data-scrolled-xfollows; the Object header and row cells are pinned (CONTROL: a box cell is not); the field header cells pintop-9under anh-9header row (CONTROL: field rows do not);owner/owner_idboth "Owner" draw their API names in the foreground (CONTROL:statuskeeps the muted aside).Readings
PermissionMatrixEditor.tsxrestored toorigin/mainunder a trap (markersSTICKY_OBJECT_CELLandMatrixScrollPanecounted 0), same file: Tests 8 failed, 1 passed (the purereadPaneOverflowcase), VERDICT command-exit 1; restored bygit checkout HEAD,git diff HEADempty, blob hash equal to HEAD. Tests importsrc, so no dist rebuild.PermissionMatrixEditororMatrixScrollPane(48 files): Test Files 48 passed (48), Tests 340 passed (340), VERDICT command-exit 0.pnpm --filter @object-ui/app-shell run type-check(tsc --noEmit and tsconfig.test.json): VERDICT command-exit 0.Acceptance notes
Re-driven on stock
examples/app-showcase --seed-admin --fresh(admin, Chromium, Setup, permission setmember_default) before and after the change, routed page:mainboth rows already showed their API names as a muted aside (Owner (owner),Owner (owner_id)onshowcase_project, and the same pair onshowcase_invoice); they now draw the API name as the distinguishing text. The duplicate itself is metadata: the showcase authors a text fieldownerlabelled "Owner" beside the platform-injectedowner_id, also "Owner". That half is outside this card's file surface (examples/app-showcase, and the injected label underpackages/**), named, not done. No two columns share a label.showcase_project's field rows, the only header in view was the object header (C at 584 … Read scope at 1063) while the field Read box sat at 1044. After: the field header pins at top 495, right under the object header (459 + 36), with Read at 1036 over the Read boxes.Not re-driven live: the Studio Objects tab (pinned by the same tests on that rendering). The fade is drawn over the whole pane's right edge, so on the routed page it also lies over the right margin of the advanced facets and Assigned Users below the grid while columns are cut.
Generated by Claude Code