Repository navigation
fix(app-shell): the permission matrix's field boxes stay reachable while the matrix scrolls sideways - #29744
Merged
Conversation
… column The field sub-table's name column was its flexible one, so it took all the width the matrix floor left over (about 697 px), and once pinned to the left it covered the Read and Edit boxes after a sideways scroll of about 80 px. The whole field panel now stays at the expanded cell's inset, as wide as the scroll pane shows, so every box stays in view at any scroll offset. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTaAUD6ttuQLjbPsrZ
…ll; add the QA clause and the changeset A Playwright spec bundles the real permission editor from source and reads elementFromPoint at every field box over a sweep of scroll offsets, on both matrix renderings and two narrow panes, with a wide-pane control. The jsdom pins move from the pinned name column to the pinned field panel. The QA item permission-matrix-editor-ux gains clause acceptance[6], step B5 and a negative (revision 10). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTaAUD6ttuQLjbPsrZ
…ubbed holders module Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTaAUD6ttuQLjbPsrZ
…ngs; split the wide-pane control Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTaAUD6ttuQLjbPsrZ
Contributor
Author
|
domain:ui#2 · zhuangjianguo · session_01QsR2jRFuJz9QBZqPVHYVhJ 维护者速读
席位意见: 实测 main 上 1000 px 窗格滚到 80 px 时 18 个勾选框只有 9 个可点,200 px 起全部被盖;修复后每个偏移都 18/18。只固定名字宽度不够(任何滚动仍会把框滑到名字下),所以改为固定整个字段面板。 席位核对 — ACCEPT ·
|
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 Steedos · project thread
Fixes #29677
Clause-②: no
Metadata-protocol: none
Claim: 6593552174
维护者速读
PermissionMatrixEditor.tsx里的FIELD_PANEL/MATRIX_PANE两个常量和FieldsSubTable根节点;ui/e2e/permission-field-panel-scroll.spec.ts(浏览器里逐个滚动位置点中每个勾选框)。cd ui && CI=1 pnpm exec playwright test e2e/permission-field-panel-scroll.spec.ts --project=chromium,预期 6 条全绿;在 main 的编辑器上同一命令在 scrollLeft 80 处报“勾选框被字段名单元格盖住”。What changes
ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsxonly:w-full, so its name column (the only unsized one) took all the leftover width, about 697 px. objectstack#26846 pinned that columnsticky left-0, so once the pane scrolled about 80 px it slid over both boxes. Bounding the column's width alone would not do: the boxes sit right after the name, so any scroll past the cell's inset still slides them under a pinned name. NowFieldsSubTable's root (filter, count, bulk buttons, legend and table) carriesFIELD_PANEL=sticky left-12 max-w-[calc(100cqi-6rem)]: it holds its place at the expanded cell's own inset (pl-12on Studio's matrix,px-12on the metadata admin's) and is no wider than the pane shows less both insets. The name header and cells lose their own pin (FIELD_NAME_CELLis gone); the header keeps its top pin from objectstack#27866 (FIELD_HEAD_CELL).MatrixScrollPanecall sites passMATRIX_PANE=flex-1 @container, which sets the container on the pane's outer box (the same width as its scroll box), so100cqiis the pane's width.MatrixScrollPane.tsxis unchanged.The QA item
studio-authoring.permission-matrix-editor-ux(revision 10) gains clause acceptance[6], step B5 (steps[8]) and negative[2] for the field boxes under a sideways scroll, appended so no existing index moves, and itsautomated.refnames the new spec. One changeset,@object-ui/app-shellpatch.Why
The card's runner reading on main at
3482f3d8d2:elementFromPointat a field box centre answeredperm-field-name-OBJ-FIELDfrom scrollLeft 80 up, and below 1304 px of pane width the boxes could not be reached at all. Re-measured on main atc76cdebfbefore the fix (below).Tests
ui/e2e/permission-field-panel-scroll.spec.ts(Playwright, picked up byui/playwright.config.ts,testDir: ./e2e; CI runs it in the requiredBuild & E2E UIjob,pnpm --dir ui run test:e2e --project=chromium). It bundles the realPermissionMatrixEditPagefrom source with Vite (the metadata client stubbed at bundle time the way the jsdom testsvi.mockit), styles it with the real Tailwind theme, expands an object of eight fields, and at scroll offsets 0, 40, 57, 80, 120, 200, 320, 480 and the far end readselementFromPointat every Read and Edit box centre and at each field name. Six cases: Studio and metadata-admin renderings at 1000 px and 720 px panes (every box answers, the panel holds one left offset); a CONTROL at a 1600 px pane (nothing scrolls, every box answers at scrollLeft 0, green on main too); and the pin not binding at 1600 px (panel width equals the cell's content width).PermissionMatrixEditor.fieldTableLayout-26846.test.tsxnow pins, on both renderings, the panel'ssticky left-12 max-w-[calc(100cqi-6rem)], the cell's 48 px inset,@containeron the pane, the toolbar, header, names and both boxes inside the panel, and nostickyon the name cells;PermissionMatrixEditor.gridChrome-27866.test.tsx's field-header pin now expects the name header withoutleft-0(it pinned the oldleft-0 z-[3]).PermissionMatrixEditor.tsxrestored into the tree under a trap, blobaa5d4f53=origin/main; restored to HEAD bloba0b449fd,git statusclean): the spec's four sweep cases go red withRead box of amount at scrollLeft 80 (pane 1000/1304) is covered by td[data-testid=perm-field-name-a_project-amount](same at 720 px), the 1600 px CONTROL stays green, the no-bind case is red (no panel); jsdom 4 of 12 red (both panel pins, both field-header pins).Live Console measure (Vite on source + app-crm backend, 1000 px window)
/studio/~all/metadata/permission/qa_field_scroll(a writable env-scope set grantingcrm_account, metadata-admin rendering, pane 1000/1304) and/studio/com.example.crm/access?item=crm_sales_user(Studio Access rendering, pane 760/1304),crm_accountexpanded, 18 field boxes in view:Every covered box answered
perm-field-name-crm_account-FIELD. Before/after screenshots at scrollLeft 0, 200 and the far end are kept with the card thread's files.Local runs on the final head 9d196c5 (after merging main)
fieldTableLayout-26846,gridChrome-27866,fieldBulk,readonly: 4 files, 26 tests passed.ui/packagesnamingPermissionMatrixEditor,perm-field-,FieldsSubTableorMatrixScrollPane, 368 tests passed;pnpm --filter @object-ui/app-shell run type-checkexit 0;tsc -p ui/tsconfig.e2e.jsonexit 0; eslint on the four touched ui files 0 errors (19 warnings, all pre-existing lines);pnpm --dir ui exec vitest run scripts/170 files passed.dispatch-gates --commandsderived 42 families at 5799825; all 42 ran, exit 0, reconciled with--ran(42 run, 0 NOT-MEASURED). Re-run on 9d196c5:check-sdui-manifest,check:platform-checklist,check-changeset-no-major --base origin/main,check:nul-bytes, all exit 0.Acceptance notes
Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (eslint on the touched ui files: 0 errors)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTaAUD6ttuQLjbPsrZ
Generated by Claude Code