Skip to content

feat(linux-grid): sort a table by a default column when it opens - #4140

Closed
sedax90 wants to merge 57 commits into
TableProApp:mainfrom
sedax90:feat/linux-default-sort
Closed

sedax90 wants to merge 57 commits into
TableProApp:mainfrom
sedax90:feat/linux-default-sort

Conversation

@sedax90

@sedax90 sedax90 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a default table sort: none, primary key or first column, with ascending or descending order.
  • Apply it when a new table opens. Restored and reopened tabs keep their saved sort, including an explicitly unsorted state. Preference changes leave open tabs as they are.
  • Use the first column of a composite key. Skip sorting when the engine or chosen column cannot support it. Builds on feat(linux-grid): open row details when a row is selected, if asked #4138.

Test plan

  • Add 17 test cases: 11 GTK, five unit and one platform test.
  • Cover the first page query and header, saved and cleared sorts, reopening, metadata retries, stale replies, unsupported engines and unavailable columns.
  • Formatting, XML and writing checks pass. Linux build and runtime test results are pending in CI.

Screenshots

Contributor's original Data Browser group, before this stack.

Light Dark
Before
After, table on first open After, light After, dark
After, preferences Preferences, light Preferences, dark

Primary key and Descending selected before opening the table. Its first page shows IDs 6 through 1, with the sort indicator on id.

sedax90 and others added 24 commits November 8, 2026 16:53
# Conflicts:
#	linux/crates/app/src/ui/browse_tab/tests/mod.rs
#	linux/crates/app/src/ui/data_grid/edit/tests/rows.rs
#	linux/crates/app/src/ui/data_grid/row_detail/tests.rs
# Conflicts:
#	linux/crates/app/src/ui/data_grid/edit/tests/rows.rs
#	linux/crates/app/src/ui/data_grid/row_detail/tests.rs
# Conflicts:
#	linux/crates/app/src/ui/data_grid/edit/tests/rows.rs
#	linux/crates/app/src/ui/data_grid/row_detail/tests.rs
#	linux/crates/app/src/ui/preferences_dialog/data_browser_group.rs
#	linux/crates/platform/src/settings/grid_preferences.rs
#	linux/crates/platform/src/settings/mod.rs
#	linux/crates/platform/tests/settings.rs
#	linux/data/app.tablepro.TablePro.gschema.xml.in
#	linux/docs/storage.md
# Conflicts:
#	linux/crates/app/src/ui/browse_tab/tests/mod.rs
@datlechin

Copy link
Copy Markdown
Member

Landed on main in #4142 (1071560), which was stacked on this branch and carried its commits. Closing as done. Thanks!

@datlechin datlechin closed this Nov 11, 2026
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.

2 participants