Skip to content

fix(datagrid): keep the grid on screen while a table loads into a tab - #3270

Open
datlechin wants to merge 2 commits into
mainfrom
fix/table-tab-replace-blank-grid
Open

datlechin wants to merge 2 commits into
mainfrom
fix/table-tab-replace-blank-grid

Conversation

@datlechin

Copy link
Copy Markdown
Member

Why

Opening a table into the preview tab showed a blank pane until its rows arrived: no grid, no headers, only "Executing…" in the status bar. The retarget empties the tab's rows first, and since #2892 the pane drew "running, nothing loaded" as an empty Spacer, unmounting the grid.

Change

  • A table keeps its grid while it loads. A pane with nothing to draw yet (a query's first run, JSON, Chart, Map) shows a delayed spinner. A dismissed load error no longer leaves a blank pane.
  • A table opened into a tab no longer inherits the previous table's primary key, change marks or late metadata, so edits to a keyless table match the right rows.
  • A SQL file's tab is not reused for a table, and a table that replaces one drops the file, so Save cannot write its query into it.
  • Safe Mode (Full): Cancel no longer leaves Loading stuck, and an approval runs only on the tab it asked about. A tab restored behind another app now loads.

Verified

TableLoadKeepsGridUITests opens a slow view into the preview tab and checks the grid stays during the fetch. Unit tests cover the rest.

Screenshots

A slow view opened over customers, one second into the fetch.

Light Dark
Before Before, light Before, dark
After After, light After, dark

Not in this PR

  • Redis database switching still replaces a tab holding typed SQL or edits.
  • A table opened beside a kept tab skips its saved hidden columns and filters.
  • LoadingReveal never reveals; fixing it adds a second status bar spinner.

Opening a table into the preview tab empties the tab's rows before the
fetch, and the results pane drew that state as an empty Spacer, so the
pane went blank and the grid unmounted for the whole fetch.

- A table tab in Data mode keeps its grid while it loads; a pane with
  nothing to draw yet shows a delayed spinner. A dismissed load error no
  longer resolves to a blank pane.
- Retargeting a tab builds a fresh table context and query content and
  forgets the previous table's change marks and source file.
- A superseded load no longer launches phase 2 onto the retargeted tab.
- Safe Mode (Full): Cancel lowers the loading flag, and an approval runs
  only on the tab, table and SQL it asked about.
- Becoming key always ends a deferred restore load.
- A file-backed query tab is never reused for a table.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant