Skip to content

Approvals: step progress bar overflows horizontally for long flows (5+ steps) — only the first 3 steps are visible, rest reachable only by dragging the whole drawer sideways #5554

Description

@baozhoutao

Summary

In the Approvals inbox detail drawer, the approval step progress bar is laid out as a single non-wrapping horizontal row. For a real 6-step approval flow the bar's intrinsic width (1070px) is roughly double its container (527px). The bar itself is not scrollable (overflow-x: visible); the nearest scrollable ancestor is the drawer panel, so the only way to see steps 4–6 is to drag the drawer's bottom horizontal scrollbar — which scrolls every other element in the drawer out of view and leaves a near-blank panel.

End users read the clipped bar as "there is no more data". This was reported verbatim by a customer acceptance tester on a production project ("I thought at first there was no data").

Environment

  • @objectstack/console17.1.0 (prebuilt SPA, served at /_console/ by @objectstack/cli 17.1.0 via createConsoleStaticPlugin)
  • Chromium, viewport 1440×900 and 1920×1000 — identical clipping at both (the drawer is fixed-width, so a wider window does not help)
  • Locale zh-CN

Where the code is

Minified chunk dist/assets/ApprovalsInboxPage-*.js, the block guarded by (P.flow_steps?.length ?? 0) > 1:

<divclassName="flex items-center px-1"aria-label={t('stepProgress','Approval steps')}>{P.flow_steps.map((s,i)=>(<Fragmentkey={s.id}>{i>0&&<divclassName="h-px flex-1 mx-2 …"/>}<divclassName="flex items-center gap-1.5 shrink-0"><spanclassName="… h-5 w-5 rounded-full …">{i+1}</span><spanclassName="text-xs …">{s.label}</span></div></Fragment>))}</div>

Every step is shrink-0 and the container is a plain flex row with no wrap and no scroll, so intrinsic width grows without bound with step count and label length.

Sibling occurrence (same family, likely wants the same treatment): the record-detail Approvals panel in dist/assets/RecordDetailView-*.js renders the same bar as:

<divclassName="flex items-center overflow-x-auto"aria-label={t('stepProgress','Approval steps')}>{s.flow_steps.map((e,t)=>(<Fragment>{t>0&&<divclassName="h-px flex-1 min-w-4 mx-2 …"/>}</Fragment>))}</div>

That one at least scrolls itself instead of dragging the whole panel, but it still hides steps behind a scroll gesture with no visible affordance. Please fix both occurrences together.

DOM measurements (live repro)

Ancestor chain outward from the step bar:

elementoverflow-xscrollWidthclientWidthscrollable?
div.flex.items-center.px-1 (the bar, aria-label="审批步骤")visible1070527no
div.space-y-4.mt-6visible1070527no
div.fixed.z-50… (drawer panel)auto1094575yes ← the only scroller

Overflow is 543px on a 527px container — i.e. the bar needs slightly more than twice the width available to it.

Minimal reproduction

  1. Define an approval flow with ≥5 approval nodes whose labels are ordinary business phrases (CJK labels of 8–16 chars are typical). Example used here — a 6-step flow:
    1. 需求部门负责人初审
    2. 工厂生产工艺负责人审核
    3. 工厂业财审核(确认单价/派工工时)
    4. 事业部成本改善经理加审
    5. 区域总经理+事业部业财运营总监会审
    6. 工厂厂长审批
  2. Submit a record into that flow so a pendingsys_approval_request exists.
  3. Open /_console/apps/<app>/system/approvals and click the row to open the detail drawer.
  4. Observed: only steps 1–3 render inside the drawer; steps 4–6 are clipped. Dragging the drawer's bottom horizontal scrollbar reveals 4–6 while pushing all other drawer content (record card, activity timeline, action buttons) off-screen.
  5. Expected: all steps are readable without horizontal scrolling.

Also verified: enlarging the viewport from 1440×900 to 1920×1000 changes nothing — the drawer is fixed-width, so "make the window bigger" is not a workaround.

Requested behaviour

Render the step progress bar vertically (stacked steps with a vertical connector) — either always, or at least once the step count / measured width would overflow. A vertical stepper also matches the drawer's tall-and-narrow aspect ratio, and it degrades gracefully as flows get longer, which a horizontal row fundamentally cannot.

If a horizontal bar is to be kept for short flows, please at minimum give the bar itself overflow-x-auto (so it scrolls independently of the drawer body) and a visible affordance — but note that the reporter's explicit ask, and our own UX read, is vertical.

Downstream

Filed from a customer project running 17.1.0. There is no supported project-side customization point for this:

  • @objectstack/console ships as a prebuilt, dist-only SPA (exports exposes only ./package.json); the consuming project has no source for it.
  • createConsoleStaticPlugin() injects only <base href="/_console/"> and the OS_PAGE_REACT=off capability flag into index.html — there is no custom-CSS / custom-head / theme-override hook.
  • Console resolution has exactly two paths (the version-locked npm package, or a sibling ../objectui/apps/console checkout), so short of maintaining a full console fork there is no downstream slot.
  • The metadata overlay allow-list (view, dashboard, report, translation, email_template) contains nothing that can affect this component's layout.

We will not patch node_modules or intercept the console HTML to inject CSS, so the project work item is parked on "platform capability blocked" pending this issue.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:dispatched

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions