Repository navigation
fix(console): dashboards meet the 44 px touch-target floor at phone width - #29149
Merged
Merged
Conversation
…idth Below sm, the dashboard page's Refresh All, the filter bar's triggers, option rows and custom-range calendar (one month, 44 px days), the dataset table's sort buttons, drillable rows and pivot cells, its Export CSV button, the drill drawer's Open in list and every Sheet's Close button are 44 px touch targets. Desktop sizes are unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTE9T9iArKPf81eTtb
…hangeset Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTE9T9iArKPf81eTtb
…n local patch ui/packages/components/src/ui/** regenerates from the shadcn registry, so the phone class list on the Sheet close button is declared in shadcn-local-patches.mjs (anchored on the registry bytes) and re-applied by the sync; the inline JSX comment moves into the declaration. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTE9T9iArKPf81eTtb
This was referenced Nov 2, 2026
Contributor
Author
|
domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu 席位核对 · ACCEPT · 2026-11-02T09:01ZHead-sha:
|
This was referenced Nov 2, 2026
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 #29078
Part of #29040 (the Dashboards flow; the other seven flows have their own cards).
Clause-②: no
Metadata-protocol: none
维护者速读
sm,即 640 px)下,仪表盘页面的可点控件统一放大到 44 px 触控目标:页头「Refresh All」、筛选栏的日期/下拉/文本控件与「Reset」、下拉选项行、自定义日期日历(手机上只显示一个月,日期格 44 px)、数据表的排序按钮与可钻取行、透视表的可钻取单元格、「Export CSV」(手机上移到表格上方单独一行,不再压住最后一列的排序按钮)、钻取抽屉的「Open in list」,以及所有 Sheet 抽屉的关闭按钮。桌面宽度(sm及以上)样式不变。sheet.tsx的关闭按钮,只加max-sm:前缀类,桌面不变,手机上所有抽屉的关闭按钮变成 44 px;该文件由 shadcn 同步生成,改动已登记为本地补丁,同步时自动重放。回滚即还原本 PR。ui/packages/components/src/ui/sheet.tsx与ui/scripts/shadcn-local-patches.mjs(全局抽屉关闭按钮,作为 shadcn 本地补丁声明)、ui/packages/plugin-dashboard/src/DatasetWidget.tsx(Export CSV 手机上改为独立一行)、ui/packages/plugin-dashboard/src/DashboardFilterBar.tsx(日历手机上单月)。cd ui && pnpm exec vitest run packages/plugin-dashboard/src/__tests__/DashboardPhoneTouchTargets-29078.test.tsx packages/components/src/__tests__/sheet-close-touch-target-29078.test.tsx packages/app-shell/src/views/DashboardView.phoneTouchTarget-29078.test.tsx,预期 3 个文件 10 个用例全绿。What changes
Every change is phone-only: a class under
max-sm:, or amin-h-11floor released bysm:min-h-0(the pattern the form select trigger already uses). Fromsmup the class lists draw what they drew before.@object-ui/app-shell,DashboardView.tsx: the page header's Refresh All gets the 44 px floor.@object-ui/plugin-dashboard,DashboardFilterBar.tsx: the date-range and select triggers, the text filter, Reset, and every option row of both lists get the floor. The custom-range calendar opens one month belowmd(useIsMobile) with 44 px day cells (max-md:[--cell-size:2.75rem]); two stacked months at that size would run past a phone's viewport. Frommdup it keeps two months at 32 px.@object-ui/plugin-dashboard,DatasetWidget.tsx: the table's sort buttons get the floor; the cells of a drillable row are 44 px tall (a table nobody can drill is unchanged); a drillable pivot cell is 44 by 44. Export CSV is 44 px and, belowsm, leaves the table's top-right corner (where it would cover the last column's sort button) for its own right-aligned row above the table.@object-ui/plugin-dashboard,OpenInListButton.tsx: the drill drawer's Open in list gets the floor; a hostclassNamestill merges.@object-ui/components,sheet.tsx: the Close button every Sheet draws is a 44 px box belowsm, its 16 px glyph where it was. The Dialog close button is not touched.ui/scripts/shadcn-local-patches.mjs:src/ui/**regenerates from the shadcn registry, so the Sheet edit is declared as the local patchsheet-close-phone-touch-target(one anchor, written from the vendoredsheet.registry.txtbytes) and re-applied by the sync. Without it the nextshadcn:updatewould revert it silently;shadcn-local-patches.test.tscaught the undeclared edit.Why
The card asks for the Dashboards flow driven at 375×812 and 390×844 against the showcase and CRM examples, five checks each. The audit ran first on
origin/main6b3ba82c, on a real Console, and only the touch-target check failed. Claim 6571438083 declared the audit read-only; the seat then amended the surface to these five files, their tests and a changeset (amendment 6571555427) before any push, and addedui/scripts/shadcn-local-patches.mjsand its tests (amendment 6572329768) once the derived gates showed the Sheet edit had to be declared there.Run record
Harness:
pnpm build+pnpm console:build, the Console served at/_consolebypnpm dev:crm -- --freshandpnpm dev:showcase -- --fresh, Playwright Chromium withisMobile,hasTouch, an Android UA and DPR 2. Pages: CRMpipeline_dashboard(KPIs, line, bar, pie); showcaseshowcase_ops_dashboard(date and select filters, KPIs, charts, table),showcase_revenue_pulse(date and region filters, KPIs, charts, table),showcase_chart_gallery(every chart type, table, pivot). Before and after screenshots and the raw reports stay in the project folder.setCPUThrottlingRate 4: the dashboard scroller (up to 6.5k px) scrolled in 30 steps with p95 frame 17 ms and 0 long tasks; tap on a table row to drill drawer visible 507 to 749 ms, the data request included.Not fixed here, and not this card's file surface: the Console app bar's controls (sidebar toggle 28 px; home, search, Studio, inbox, account 32 px) are under 44 px on every route. They are AppHeader's, held by the Navigation card #29075.
Tests
ui/packages/plugin-dashboard/src/__tests__/DashboardPhoneTouchTargets-29078.test.tsx(8 cases): filter triggers, text field and Reset carry the floor; every option row of both lists does; belowmdthe custom range opens one month with the 44 px cell size, and frommdup it keeps two (control); sort buttons and drillable-row cells carry the floor and Export CSV is 44 px out of the corner; a non-drillable table's rows do not grow (control); a drillable pivot cell is 44 by 44; Open in list carries the floor and keeps a host class.ui/packages/app-shell/src/views/DashboardView.phoneTouchTarget-29078.test.tsx(1 case): Refresh All carries the floor.ui/packages/components/src/__tests__/sheet-close-touch-target-29078.test.tsx(1 case): the Sheet Close button is 44 px belowsm, keepsright-4 top-4fromsmup and its 16 px glyph.origin/main6b3ba82c, the three files ran 8 failed, 2 passed (the two controls), then restored fromHEAD(git diff HEADempty). These tests import the components from source, so no build stands between the edit and the run.ui/scripts/__tests__/shadcn-local-patches.test.tswas red on0ff4d360(1 case, "sheet: byte round-trip holds":sheet.tsxno longer regenerated from registry bytes) and is green on8423b760with the patch declared.0ff4d360: the wholepackages/plugin-dashboard/suite, 200 files, 1922 passed, 6 skipped; the 43 components, app-shell and console test files namingsheetor the touched dashboard modules, 404 passed;turbo run type-checkfor components, plugin-dashboard and app-shell, 67 of 67 tasks.Acceptance notes
Verification
Derived gates, local subset
node scripts/pm/dispatch-gates.mjs --commandsderived 36 families. On0ff4d360all 36 ran: 35 exit 0 (among themcheck-sdui-manifest.mjsand its self-test,check-changeset-no-major,check-empty-changeset,check-adr-0087-registration,check:nul-bytes,check:cross-package-test-inputs,check:test-source-alias,check:query-options-erasure, andcheck:type-check-debtunder the verify lock), andpnpm --dir ui exec vitest run scripts/exit 1 on the one shadcn round-trip case above.dispatch-gates --ran: 36 derived, 36 run, 0 NOT-MEASURED. On8423b760the same derivation (identical list):pnpm --dir ui exec vitest run scripts/exit 0, 169 files passed, 2 skipped (4900 tests). The other 35 are re-running on8423b760; their results go in the os-dev report on the card.Families CI runs (Lint UI, Test UI, Type Check UI and the rest) are read from this PR's check-runs.
Human Minimum
packages/specholds no runtime logic. (Not touched.)pnpm lintpasses. (No formatter ran;pnpm lintis CI's Lint UI run.)main, one pull request.packages/spectouched: not touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTE9T9iArKPf81eTtb