Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
33813ba
feat(linux-browse): switch a table tab between Data and Structure fro…
sedax90 Nov 8, 2026
340e9ca
docs(linux-browse): add the changelog entry
sedax90 Nov 8, 2026
d0aca39
feat(linux-browse): one bottom bar for a table tab's Structure view
sedax90 Nov 8, 2026
ef44adb
docs(linux-browse): add the changelog entry
sedax90 Nov 8, 2026
6d73a7c
fix(linux-browse): route table commands by selected view
datlechin Nov 8, 2026
4c31e38
fix(linux-browse): protect structure drafts during reloads
datlechin Nov 8, 2026
4ee4c26
fix(linux-browse): keep table commands reachable in narrow tabs
datlechin Nov 8, 2026
2816b11
refactor(linux-browse): group workspace save requests
datlechin Nov 8, 2026
9fb78f6
test(linux-browse): exercise refresh guards during valid saves
datlechin Nov 8, 2026
e703e58
test(linux-browse): bound structure save frame waits
datlechin Nov 8, 2026
bcc5d79
test(linux-browse): pass the owned window to the frame wait
datlechin Nov 8, 2026
6bd9152
test(linux-browse): report refresh save wait state
datlechin Nov 8, 2026
560c913
test(linux-browse): use typed columns in row save fixtures
datlechin Nov 8, 2026
054cf47
fix(linux-browse): merge selected-view routing into the shared bar
datlechin Nov 8, 2026
06f07fc
fix(linux-browse): keep shared structure commands accessible in compa…
datlechin Nov 8, 2026
563d2ee
fix(linux-browse): add access keys to compact structure commands
datlechin Nov 8, 2026
bc0e6d8
Merge remote-tracking branch 'origin/main' into feat/linux-browse-str…
datlechin Nov 9, 2026
3fb1996
fix(linux-workspace): drop the line-count expectation the shorter upd…
datlechin Nov 9, 2026
75d7a53
Merge remote-tracking branch 'origin/main' into feat/linux-browse-str…
datlechin Nov 9, 2026
1d29b84
Merge remote-tracking branch 'origin/main' into feat/linux-browse-str…
datlechin Nov 9, 2026
eb4f801
Merge remote-tracking branch 'origin/main' into feat/linux-browse-str…
datlechin Nov 9, 2026
6f8ac50
fix(linux-grid): pass the NULL text to the row details field search
datlechin Nov 9, 2026
df29b33
Merge commit '6f8ac5096e5504f6ac7dd2178b7d84feadf0751c' into feat/lin…
datlechin Nov 9, 2026
492f499
Merge branch 'main' into feat/linux-browse-structure-one-bar
datlechin Nov 9, 2026
4f27513
fix(linux-browse): keep the view switch's names whole by moving Colum…
datlechin Nov 9, 2026
4d720b7
Merge remote-tracking branch 'origin/main' into feat/linux-browse-str…
datlechin Nov 10, 2026
6b92b49
Merge remote-tracking branch 'origin/main' into feat/linux-browse-str…
datlechin Nov 10, 2026
5f50e7a
test(linux-browse): hold the test windows' widths with a size request…
datlechin Nov 10, 2026
417cb1c
test(linux-browse): upcast to GtkWindow before sizing it
datlechin Nov 10, 2026
1929e2c
test(linux-browse): give the tab its width, since the window's reques…
datlechin Nov 10, 2026
df75c36
Merge remote-tracking branch 'origin/main' into feat/linux-browse-str…
datlechin Nov 10, 2026
4062ff5
Merge remote-tracking branch 'origin/main' into feat/linux-browse-str…
datlechin Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions linux/changelog.d/4111.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A table tab's Structure view shares the tab's bottom bar instead of stacking a second one.
14 changes: 14 additions & 0 deletions linux/crates/app/src/ui/browse_tab/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ pub struct BrowseTab {
#[template_child]
pub view_toggle: TemplateChild<adw::InlineViewSwitcher>,
#[template_child]
pub structure_start: TemplateChild<gtk::Box>,
#[template_child]
pub structure_end: TemplateChild<gtk::Box>,
#[template_child]
pub structure_details: TemplateChild<gtk::Box>,
#[template_child]
pub structure_secondary: TemplateChild<gtk::Box>,
#[template_child]
pub structure_primary: TemplateChild<gtk::Box>,
#[template_child]
pub structure_more: TemplateChild<gtk::MenuButton>,
#[template_child]
pub data_start: TemplateChild<gtk::Box>,
#[template_child]
pub data_end: TemplateChild<gtk::Box>,
Expand All @@ -58,6 +70,8 @@ pub struct BrowseTab {
#[template_child]
pub action_bar: TemplateChild<gtk::ActionBar>,
#[template_child]
pub overflow_button: TemplateChild<gtk::MenuButton>,
#[template_child]
pub more_button: TemplateChild<gtk::MenuButton>,
#[template_child]
pub export_button: TemplateChild<gtk::Button>,
Expand Down
47 changes: 34 additions & 13 deletions linux/crates/app/src/ui/browse_tab/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub(super) fn build(tab: &BrowseTab, init: &LayoutInit<'_>) -> BrowseTabWidgets
imp.inner_stack.set_visible_child_name("loading");
imp.read_only_banner.set_revealed(init.read_only);
let page_sizes = page_size_choices(&imp.page_size_dropdown, init.page_size);
imp.overflow_button.set_menu_model(Some(&overflow_menu(&page_sizes)));
imp.more_button.set_menu_model(Some(&more_menu(&page_sizes)));
connect_controls(tab, page_sizes.clone());
BrowseTabWidgets {
Expand All @@ -62,23 +63,12 @@ pub(super) fn build(tab: &BrowseTab, init: &LayoutInit<'_>) -> BrowseTabWidgets
}

fn more_menu(page_sizes: &[u64]) -> gio::Menu {
let export = gio::MenuItem::new(Some(&gettext("_Export Rows…")), Some("browse.export"));
// The window's Export Results key reaches this tab's Export.
if let Some(key) = crate::application::triggers_for("win.export-results").first() {
export.set_attribute_value("accel", Some(&key.to_variant()));
}
let actions = gio::Menu::new();
actions.append(Some(&gettext("_Filter Rows")), Some("browse.filter"));
actions.append(Some(&gettext("Col_umns…")), Some("grid.columns"));
actions.append_item(&export);
actions.append_item(&export_item());
actions.append(Some(&gettext("_Count Rows")), Some("browse.count-rows"));
actions.append(Some(&gettext("_Highlight Rules…")), Some("grid.highlight-rules"));
let sizes = gio::Menu::new();
for size in page_sizes {
let item = gio::MenuItem::new(Some(&format_thousands(*size)), None);
item.set_action_and_target_value(Some("browse.page-size"), Some(&size.to_variant()));
sizes.append_item(&item);
}
let rows = gio::Menu::new();
rows.append(Some(&gettext("_Insert Row")), Some("grid.insert-row"));
rows.append(Some(&gettext("_Delete Selected Rows")), Some("grid.delete-rows"));
Expand All @@ -90,10 +80,40 @@ fn more_menu(page_sizes: &[u64]) -> gio::Menu {
menu.append_section(None, &actions);
menu.append_section(None, &rows);
menu.append_section(None, &pages);
menu.append_section(Some(&gettext("Rows per Page")), &sizes);
menu.append_section(Some(&gettext("Rows per Page")), &page_size_menu(page_sizes));
menu
}

// Holds only what the medium breakpoint takes off the bar.
fn overflow_menu(page_sizes: &[u64]) -> gio::Menu {
let actions = gio::Menu::new();
actions.append(Some(&gettext("Col_umns…")), Some("grid.columns"));
actions.append_item(&export_item());
let menu = gio::Menu::new();
menu.append_section(None, &actions);
menu.append_section(Some(&gettext("Rows per Page")), &page_size_menu(page_sizes));
menu
}

fn export_item() -> gio::MenuItem {
let export = gio::MenuItem::new(Some(&gettext("_Export Rows…")), Some("browse.export"));
// The window's Export Results key reaches this tab's Export.
if let Some(key) = crate::application::triggers_for("win.export-results").first() {
export.set_attribute_value("accel", Some(&key.to_variant()));
}
export
}

fn page_size_menu(page_sizes: &[u64]) -> gio::Menu {
let sizes = gio::Menu::new();
for size in page_sizes {
let item = gio::MenuItem::new(Some(&format_thousands(*size)), None);
item.set_action_and_target_value(Some("browse.page-size"), Some(&size.to_variant()));
sizes.append_item(&item);
}
sizes
}

/// An inline editor that slides down above the grid. It lives in the
/// tab so the user's in-progress rules survive a click into a cell or
/// the SQL editor. It offers what the connection's engine evaluates, and
Expand Down Expand Up @@ -303,6 +323,7 @@ mod tests {
fn every_action_in_the_more_menu_has_an_access_key_of_its_own() {
// A page size is a number, which takes no key.
crate::test_support::assert_access_keys(&more_menu(&[]));
crate::test_support::assert_access_keys(&overflow_menu(&[]));
}

#[test]
Expand Down
11 changes: 11 additions & 0 deletions linux/crates/app/src/ui/browse_tab/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ impl BrowseTab {

pub fn set_structure(&self, structure: &crate::ui::structure_tab::StructureTab) {
libadwaita::prelude::BinExt::set_child(&*self.imp().structure_host, Some(structure));
let imp = self.imp();
structure.dock_actions(&imp.structure_details, &imp.structure_secondary, &imp.structure_primary);
self.sync_structure_actions();
self.emit_by_name::<()>("save-action-changed", &[]);
}

Expand All @@ -465,6 +468,9 @@ impl BrowseTab {
}
imp.data_start.set_visible(!structure);
imp.data_end.set_visible(!structure);
imp.structure_start.set_visible(structure);
imp.structure_end.set_visible(structure);
self.sync_structure_actions();
let actions = imp.browse_actions.get().filter(|_| !structure);
self.insert_action_group("browse", actions);
if let Some(model) = imp.model.borrow_mut().as_mut() {
Expand All @@ -473,6 +479,11 @@ impl BrowseTab {
self.emit_by_name::<()>("save-action-changed", &[]);
}

fn sync_structure_actions(&self) {
let structure = self.structure_tab().filter(|_| self.shows_structure());
self.insert_action_group("structure", structure.as_ref().and_then(|tab| tab.command_actions()));
}

fn save_selected_view(&self) {
if let Some(action) = self.shown_save_action() {
action.activate(None);
Expand Down
Loading
Loading