Repository navigation
fix(plugin-grid): list grid row actions trigger visible at rest in a muted tone - #28922
Merged
Merged
Conversation
The list grid always draws its Actions header, but the row trigger was opacity-0 on a fine pointer until the row was hovered, so the column looked empty. Draw it on every row in text-muted-foreground on every pointer type, full strength on row hover, focus-within, selection, its own focus, an open menu and a coarse pointer. Menu set, gates and order unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSUCWFfGqhaRR97caT
Contributor
Author
|
domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu 席位核对 · ACCEPT · 2026-11-02T04:35ZHead-sha:
|
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 #28871
Clause-②: no
Metadata-protocol: none
维护者速读
ui/packages/plugin-grid一个组件里那个按钮的样式类,不动 spec、服务端、元数据和菜单逻辑。弱化色用的是文字色(text-muted-foreground),不是透明度,对比度与其它次要图标一致。回滚 = revert 本 PR。ui/packages/plugin-grid/src/components/RowActionMenu.tsx里data-testid="row-action-trigger"那个按钮的className;再看新测试RowActionMenu.atRest-28871.test.tsx。cd ui && pnpm exec vitest run packages/plugin-grid/src/components/__tests__/RowActionMenu.atRest-28871.test.tsx,应 1 个文件 4 个用例全部通过;或在 Console 打开线索列表(1440 px),不移动鼠标就能看到每行的 ⋯。What changes
RowActionMenu's ⋯ trigger (data-testid="row-action-trigger", the one the list grid's_actionscolumn draws per row):text-muted-foreground. Theopacity-0/transition-opacitypair is gone, so nothing hides the trigger before the pointer reaches the row.text-foreground) on row hover (group-hover/row), focus within the row (group-focus-within/row), a selected row (group-data-[state=selected]/row), an open menu (data-[state=open]), its own keyboard focus (focus-visible) and a coarse pointer (pointer-coarse), which cannot hover.hover:bg-accent hover:text-accent-foregroundstill applies when the pointer is on the button itself.Unchanged: the menu's items, their gates and their order (
useRowActionPlan, #28434), the inline primary buttons, the empty-menu guard (no trigger when the plan offers nothing), the header (objectGridActionsColumn.tsxis not touched), the 44 px touch target, and the accessible name. No key, option or prop is added.Tests
RowActionMenu.atRest-28871.test.tsx(new, 4 cases,domproject). jsdom applies no stylesheet, so visibility is read off the classes that decide it, asdata-table-leadingCell-12423.test.tsxdoes:opacity-0(under any variant),invisible,hiddenorsr-only, and keeps its accessible name;text-muted-foregroundand carries the five full-strength variants;pointer-coarse:class ispointer-coarse:text-foreground, so a coarse pointer strengthens the tone and is never what makes the trigger appear;data-statetoopen(the statedata-[state=open]:keys on) and shows the item.Ablation (scripts/ablation-replace.mjs, at 7d46751, source-resolved, no dist)
opacity-0put back at rest (text-muted-foreground transition-colorstotext-muted-foreground opacity-0 transition-colors): 1 failed ("is drawn at rest: nothing hides it before the pointer reaches the row"), 3 passed. Restored, blobadea0869equal to HEAD,git diff HEADempty.pointer-coarse:text-foregroundtopointer-coarse:opacity-100): 1 failed (the every-pointer-type case), 3 passed. Restored, blobadea0869equal to HEAD,git diff HEADempty.Acceptance notes
ui/packages/components/src/renderers/complex/data-table.tsxdraws its own row-actions trigger (data-testid="data-table-row-actions", the genericdata-tablerenderer's schemarowActions) with the oldopacity-0set, pinned bydata-table-leadingCell-12423.test.tsx. It is not the list grid's trigger and is outside this card's file surface, so it keeps hover-reveal.ui/packages/app-shell/src/views/objectViewOpenAsPage.tsxhas a separate hover-revealed control in the same style, also untouched.object-grid(Record page enlarged related tab: on desktop, draw the child object's list face (object-grid) as the phone face already does — today a generic data-table with taller rows, plain-text names and the count twice #28865), with no change here.Verification
All on the final head
7d467519(baseorigin/mainb15b634c), afterpnpm install --frozen-lockfileandturbo run build --filter='@object-ui/plugin-grid^...'plus formula, sdui-parser, lint and client (49 tasks, exit 0), underscripts/pm/os-verify-lock.sh.packages/plugin-grid/vitest suite (--maxWorkers=2): 271 files, 2353 tests passed. The fiveRowActionMenu*files alone: 81 passed.pnpm --filter @object-ui/plugin-grid run type-check(bothtscprograms, the test one included): exit 0.node scripts/pm/dispatch-gates.mjs --commands): 34 of 34 run, each exit 0 (check:type-check-debtandpnpm --dir ui exec vitest run scripts/under the lock; the latter 169 files passed, 2 skipped), includingnode scripts/check-sdui-manifest.mjsand the PR-body gates with this body asGITHUB_EVENT_PATH.--ranreconciles 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.check-partof-closing-keywordwithPR_BODY: exit 0.uicheck:new-line-citations: 0 new citations.row-action-trigger(plugin-view, plugin-designer, app-shell). They find the trigger by test id and never read its classes; CI's Test UI runs them.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jSUCWFfGqhaRR97caT