Repository navigation
fix(components): data-table row actions trigger visible at rest in a muted tone - #29030
Merged
Merged
Conversation
…muted tone The data-table's row ⋯ trigger rests in text-muted-foreground instead of opacity-0, and lifts to full strength on row hover, focus-within, a selected row, an open menu, its own focus and a coarse pointer, as the list grid's RowActionMenu does. The open-as-page link keeps its hover reveal; its docblock no longer claims it matches the row menu. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSXEKkhP494Y6s2au2
Contributor
Author
|
domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu 席位核对 · ACCEPT · 2026-11-02T06: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 #28923
Clause-②: no
Metadata-protocol: none
维护者速读
data-table渲染器里每行的 ⋯ 操作按钮,静止时也画出来(灰色弱化色),鼠标移到该行、行内获得焦点、行被选中、按钮自己获得键盘焦点、菜单打开时,或在触屏上,变为正常前景色。与列表表格(List grid Actions column: a visible low-emphasis ⋯ on every row at rest, instead of a header over a column that looks empty until the pointer hovers a row #28871)的做法一致。菜单里有哪些项、各项的显示条件和顺序都不变。Console 列表名称旁的「整页打开」↗ 仍保持悬停才出现,只把它说「与行菜单一致」的注释改正。ui/packages/components一个按钮的样式类,另有一处 app-shell 注释;不动 spec、服务端、元数据和菜单逻辑。弱化色用文字色(text-muted-foreground),不是透明度。回滚 = revert 本 PR。ui/packages/components/src/renderers/complex/data-table.tsx里data-testid="data-table-row-actions"那个按钮的className;再看新测试data-table-row-actions-atRest-28923.test.tsx。cd ui && pnpm exec vitest run packages/components/src/renderers/complex/__tests__/data-table-row-actions-atRest-28923.test.tsx,应 1 个文件 4 个用例全部通过;或打开任一相关列表(1440 px),不移动鼠标就能看到每行的 ⋯。What changes
data-table's row ⋯ trigger (data-testid="data-table-row-actions", drawn per row when the schema'srowActionsleave at least one item):text-muted-foreground. Theopacity-0/transition-opacitypair is gone.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). This is the class setRowActionMenucarries since List grid Actions column: a visible low-emphasis ⋯ on every row at rest, instead of a header over a column that looks empty until the pointer hovers a row #28871 (PR fix(plugin-grid): list grid row actions trigger visible at rest in a muted tone #28922).objectViewOpenAsPage.tsx(the Console list's per-row ↗ "open as page"): triage's call, kept hover-revealed. It is an extra link beside the name with no header of its own, so the empty-column defect does not apply, and drawing it on every row would crowd the name column. Only its docblock changes: it no longer claims to match the row menu, and says why the two differ.OPEN_AS_PAGE_CLASSis unchanged.Unchanged: the menu's items, gates and order (
useDataTableRowMenuPlan, #28434), the empty-menu guard, the header, the accessible name. No key, option or prop is added. Changeset:@object-ui/componentspatch (app-shell's change is a comment only, not published).Tests
data-table-row-actions-atRest-28923.test.tsx(new, 4 cases): at rest noopacity-0under any variant,invisible,hiddenorsr-only, name kept; rests intext-muted-foregroundwith the five full-strength variants; the onlypointer-coarse:class ispointer-coarse:text-foreground; control: opening the menu flipsdata-statetoopenand shows Edit.data-table-leadingCell-12423.test.tsx: its row-actions-trigger case pinned the oldopacity-0set and is repointed to the new one. Its checkbox cases are untouched.Ablation (scripts/ablation-replace.mjs, at 920a4d8, 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 on every row"), 3 passed. Restored, blob1d306e61equal to HEAD,git diff HEADempty.pointer-coarse:text-foregroundtopointer-coarse:opacity-100): 1 failed (the every-pointer-type case), 3 passed. Restored, blob1d306e61equal to HEAD,git diff HEADempty.Acceptance notes
Verification
All on the final head
920a4d85(baseorigin/main62b3ec36), afterpnpm install --frozen-lockfileandturbo run build --filter='@object-ui/components^...'plus formula, sdui-parser, lint and client (43 tasks, exit 0), underscripts/pm/os-verify-lock.sh.packages/components/vitest suite (--maxWorkers=2): 470 files passed, 1 skipped; 4481 tests passed, 24 skipped. The threedata-tablerow-menu files plusObjectView.recordOpenDisplay-26681.test.tsx(app-shell, the open-as-page link): 22 passed.pnpm --filter @object-ui/components run type-check(bothtscprograms, the test one included): exit 0.data-table.tsx, one on the 12423 file's existingComponentRegistry.get(...) as any, and one on the same cast in the new test, copied from it.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), includingnode scripts/check-sdui-manifest.mjsand the PR-body gates with this body asGITHUB_EVENT_PATH.--ranreconciles 34 derived, 34 run, 0 NOT-MEASURED.check-partof-closing-keywordwithPR_BODY: exit 0.type-check(the app-shell change is a docblock only) and the rest of app-shell's suite; CI's Type Check UI and Test UI run them.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jSXEKkhP494Y6s2au2