diff --git a/.changeset/35729-chart-view-bar-left-edge.md b/.changeset/35729-chart-view-bar-left-edge.md new file mode 100644 index 00000000000..e4aae2397e5 --- /dev/null +++ b/.changeset/35729-chart-view-bar-left-edge.md @@ -0,0 +1,12 @@ +--- +'@object-ui/app-shell': patch +--- + +fix: a chart view's view bar starts its view icon on the list page's 16px left edge, as the list view's bar does + +Clause-②: no +Metadata-protocol: none + +A chart view draws its own copy of the view bar, and that copy kept `sm:px-4` after the list view's bar moved to `sm:pl-2.5 sm:pr-2` in #35663. From `sm` up the chart's view icon sat 22px from the main area's left edge while the list's sat at 16, so switching between a list view and a chart view moved the switcher. The chart bar now carries the list bar's padding: at 1280 its icon starts at 16 and its right padding is the list bar's 8. Below `sm` both bars keep `px-2`, so a phone is unchanged. + +The list renderer's `inSetup` input is gone. Since #35663 removed the Setup app's row-number line it was read only in a memo's dependency list, so `ObjectView` no longer derives it from the route. diff --git a/ui/e2e/list-left-edge-35663.spec.ts b/ui/e2e/list-left-edge-35663.spec.ts index fa5de9059f4..78f0d759978 100644 --- a/ui/e2e/list-left-edge-35663.spec.ts +++ b/ui/e2e/list-left-edge-35663.spec.ts @@ -49,6 +49,15 @@ import { uiRoot } from '../scripts/ui-root.mjs'; * the switcher's and footer's contents are short literals. Fonts are * Chromium's fallbacks: the assertions are edges and widths of boxes, not of * glyphs. + * + * ## The chart view's view bar (objectstack#35729) + * + * A chart view draws its own copy of the view bar (`chartPage` in + * `objectViewListRenderer.tsx`), which kept `sm:px-4` after #35663 and so put + * the view icon at 22. Its class is read out of that file at run time and a + * second bar with that class, holding the same switcher, sits under the list's + * view bar: at 1280 its icon starts on the list's 16 and its right padding is + * the list bar's; at 375 it is no closer than 12 to the left edge. */ const REPO_ROOT = uiRoot(); @@ -76,6 +85,11 @@ const SWITCHER_CLASS = pick( /data-testid="list-view-switcher"[\s\S]*?className=\{cn\(\s*(?:\/\/[^\n]*\n\s*)*'([^']+)'/, 'the switcher trigger class', ); +const CHART_BAR_CLASS = pick( + 'packages/app-shell/src/views/objectViewListRenderer.tsx', + /const chartPage = [\s\S]*?hasPhoneTitle && \(\s*