Reported from an app project (steedos-labs/os-project-titanwind-ehr#1161) on @objectstack/*@17.0.0-rc.6.
What it does
The list view toolbar's Print button is a bare browser print call:
// packages/plugin-list/src/ListView.tsx:2626
onClick={() => window.print()}
No print layout, no preview, no PDF generation, no downloaded artifact. The same bare
call also backs packages/plugin-report/src/ReportViewer.tsx:115 and
packages/app-shell/src/views/DashboardView.tsx:101.
Why it's a defect, not just a thin feature
window.print() is a no-op in exactly the environments a platform gets driven in:
headless/automated browsers and several embedded WebViews. The click resolves normally —
no exception, no console error, nothing rendered. Observed at the reporting project:
the click dispatched successfully, console clean, nothing happened. From the outside it
is indistinguishable from a broken button, and it is being read by acceptance testers as
the product's "export to PDF" entry point.
Even in a normal desktop browser the result is the browser's own dialog printing the
whole Console chrome — unpaginated, tables clipped, styling unsuited to paper (this is
the exact workaround objectstack-ai/objectstack#1301 already documented and rejected as
inadequate).
Repro
- Open any object list view in Console.
- Click Print in the toolbar.
- Headless/WebView: nothing happens, no error. Desktop browser: the browser's print
dialog for the whole page, including Console chrome.
What we're asking for
Note that the real feature — a print/PDF primitive — was closed NOT_PLANNED as
objectstack-ai/objectstack#1301, so we are not re-litigating that here. Given that
decision, the minimum fix is to stop the button from reading as an export entry point.
In descending order of preference:
- Give the list a print stylesheet / print-scoped render so
window.print() produces a
usable page (no Console chrome, paginated, table not clipped).
- Document the button's semantics explicitly ("opens your browser's print dialog"; not a
PDF export), so it stops being accepted against "export PDF" requirements.
- Failing both, remove or gate the button rather than ship a control that is a silent
no-op in a supported runtime.
Related
Reported from an app project (
steedos-labs/os-project-titanwind-ehr#1161) on@objectstack/*@17.0.0-rc.6.What it does
The list view toolbar's Print button is a bare browser print call:
No print layout, no preview, no PDF generation, no downloaded artifact. The same bare
call also backs
packages/plugin-report/src/ReportViewer.tsx:115andpackages/app-shell/src/views/DashboardView.tsx:101.Why it's a defect, not just a thin feature
window.print()is a no-op in exactly the environments a platform gets driven in:headless/automated browsers and several embedded WebViews. The click resolves normally —
no exception, no console error, nothing rendered. Observed at the reporting project:
the click dispatched successfully, console clean, nothing happened. From the outside it
is indistinguishable from a broken button, and it is being read by acceptance testers as
the product's "export to PDF" entry point.
Even in a normal desktop browser the result is the browser's own dialog printing the
whole Console chrome — unpaginated, tables clipped, styling unsuited to paper (this is
the exact workaround
objectstack-ai/objectstack#1301already documented and rejected asinadequate).
Repro
dialog for the whole page, including Console chrome.
What we're asking for
Note that the real feature — a print/PDF primitive — was closed NOT_PLANNED as
objectstack-ai/objectstack#1301, so we are not re-litigating that here. Given thatdecision, the minimum fix is to stop the button from reading as an export entry point.
In descending order of preference:
window.print()produces ausable page (no Console chrome, paginated, table not clipped).
PDF export), so it stops being accepted against "export PDF" requirements.
no-op in a supported runtime.
Related
objectstack-ai/objectstack#1301— print / PDF export, closed NOT_PLANNEDexportOptionscontract mismatch): spec:ListView.exportOptionsis typed as a bare array, but the only renderer readsexportOptions.formatsobjectstack#8010