Repository navigation
feat(frontend): suppress kernel-dependent table controls in static export - #10007
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the static HTML export experience for mo.ui.table by hiding or disabling table controls that depend on a live kernel (RPC-backed), preventing exported tables from appearing interactive when they cannot actually perform those actions.
Changes:
- Skip column-summaries RPCs and suppress selection behaviors when rendering in
isStaticNotebook()mode. - Hide the table top bar and disable sorting/filtering in static mode; hide pagination controls in the bottom bar.
- Add frontend test coverage for static-mode control suppression by mocking
isStaticNotebook().
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| frontend/src/plugins/impl/DataTablePlugin.tsx | Detect static notebook mode to skip kernel RPCs (column summaries), suppress selection, and show a truncation banner. |
| frontend/src/plugins/impl/tests/DataTablePlugin.test.tsx | Add tests that verify kernel-dependent controls are present in normal mode and suppressed in static mode via a mock. |
| frontend/src/components/data-table/TableBottomBar.tsx | Hide pagination UI in static mode (pagination requires kernel-backed page fetches). |
| frontend/src/components/data-table/data-table.tsx | Hide top bar and disable sorting/filtering in static mode to avoid non-functional UI in exports. |
Contributor
There was a problem hiding this comment.
No issues found across 4 files
Architecture diagram
sequenceDiagram
participant Reader as Static HTML Reader
participant Table as DataTableComponent
participant Static as isStaticNotebook()
participant TopBar as TableTopBar
participant BottomBar as TableBottomBar
participant ColumnSum as Column Summaries (RPC)
participant ReactTable as React Table State
participant Banner as Truncation Banner
Note over Reader,Banner: Static Export Rendering Flow
Table->>Static: Check isStaticNotebook()
Static-->>Table: true
alt Static Export
Table->>TopBar: hide entire top bar (search, filters, chart, explorers, download, size)
Table->>ReactTable: enableSorting = false
Table->>ReactTable: enableColumnFilters = false
Table->>BottomBar: hide pagination controls
Table->>ColumnSum: skip fetchColumnSummaries()
Columnum-->>Table: not called (RPC never sent)
Table->>ReactTable: clear selection = null
Table->>Banner: show "Showing X of Y rows. Increase page_size..."
Banner-->>Reader: visible message
Note over Table: Client-side only features remain active
Note over Table: data-type badges, row/column counts, cell-selection stats
else Normal (Live Kernel)
Table->>TopBar: render full toolbar
Table->>BottomBar: render pagination
Table->>ColumnSum: fetch via kernel RPC
Table->>ReactTable: enable all interactions
end
…port Hide table chrome backed by live-kernel RPCs (search, filters, column summaries, sorting, pagination, selection, chart builder, explorers, download) when isStaticNotebook() is true, and add a banner reporting visible-vs-total rows. Controls that work without a kernel are unaffected.
kirangadhave
force-pushed
the
kg/static-table-suppress-controls
branch
from
June 26, 2026 22:41
55eac1f to
9903379
Compare
mscolnick
approved these changes
Jun 27, 2026
Contributor
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.12-dev10 |
williambdean
pushed a commit
to williambdean/marimo
that referenced
this pull request
Sep 6, 2026
This branch was successfully deployed
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.
📝 Summary
In a static HTML export,
mo.ui.tablerenders chrome backed by live-kernel RPCs that silently no-op when used: search, filters, column summaries, sorting, pagination, row/cell selection, the chart builder, and the row/column explorers. The table looks interactive but isn't. The frontend now detectsisStaticNotebook()at render time and hides those controls, so an exported table exposes only what works without a kernel.The entire top bar is hidden (search, filters access, chart builder, explorers, download, size), pagination is dropped from the bottom bar, the column summaries RPC is skipped, and the selection column is removed. Controls that need no kernel stay: the row and column counts, client-side cell-selection stats, and data-type badges. Download is hidden along with the top bar because
download_asis itself a kernel RPC and does not resolve in a static export, so the issue's note that download is unaffected does not hold in practice.Because a static export only embeds the first page, a banner now reports how many rows are visible out of the total and points authors at
page_sizeto embed more.Verified against a real
marimo export htmlsnapshot and covered by frontend tests that mockisStaticNotebook().Static table
Closes MO-6534, #9387
