diff --git a/linux/ARCHITECTURE.md b/linux/ARCHITECTURE.md index e547f42ac6..bcc585f83f 100644 --- a/linux/ARCHITECTURE.md +++ b/linux/ARCHITECTURE.md @@ -87,7 +87,7 @@ Each window is a `SessionWindow` (`crates/app/src/ui/session_window/`) for its c - When a run, a save or an export ends in a tab the user is not looking at, the window's `WorkNotifier` sends a desktop notification through `GApplication`: one per tab, with no time threshold, as GNOME Console does. A tab counts as looked at while the window is active and the tab is in front. The notification names the tab and the connection only, since it can show on the lock screen, so an editor tab goes by its number rather than its script. Clicking it runs `app.focus-tab`, which brings the tab forward in its window. It is withdrawn once the tab is in front of an active window, when the tab closes, and when the session goes. A save that settles while a close prompt covering its tab decides is not notified: the prompt waited for it in front of the user, and then closes the tab or asks about it again. - The window's content is the page itself, never a wrapper, and is at least 360 by 294 pixels. Each page has its own header bars and its own `AdwToastOverlay`, and the window's toasts go to the page on screen. The menus come from `data/resources/gtk/menus.ui`, which `GtkApplication` loads at startup. Main Menu above the sidebar holds app and connection-library commands. Session Menu in the content header holds commands for the session in front, including Safe Mode. -The `WorkspaceShell` (`crates/app/src/ui/workspace/workspace_shell.rs`) is what a window has once: the connection tree in the sidebar, the one tab view every session's tabs share, the header bars, the assistant's column and the toasts. Its `front` property is the session of the tab in front, or with no tab the newest session or the one last shown, and the session in front speaks for the window: the header bars, the window title, its banners, its assistant pane and the window's actions read it through bindings. The `Workspace` (`crates/app/src/ui/workspace/`) is one session: its sidebar model, which the tree shows as one list per schema and a search as one flat list of what it found, its tabs, its banners and its assistant pane, and the `title`, `subtitle`, `window-title` and `icon-name` properties the shell binds. The shell's template puts the `AdwTabOverview` at the root, as libadwaita expects, around an `AdwBreakpointBin` with an `AdwOverlaySplitView`: the sidebar and the tabs each have their own header bar. Below 600sp the sidebar collapses into an overlay, and below 450sp an `AdwTabButton` takes the tab bar's place. The `show-sidebar` window action and F9 show and hide the sidebar. The shell adds the window's workspace actions once, each sent to the session in front, and removes them when it shuts down. A workspace follows its session's health and object list through `WatchForwarder`s and tells the window what it holds through its `dirty-changed`, `saves-in-flight-changed`, `work-completed` and `tabs-changed` signals. Its `WorkspaceHandle` runs the saves and tells the close prompts what closing any part of it would lose. Its `ExportLedger` writes exports off the GTK thread: the rows are encoded on the runtime and GIO writes them. An export takes the rows a grid holds, or every row of a table or an editor statement, streamed through `Connection::stream_read` on a read-only connection of its own with no deadline. `ReplaceFileWriter` removes a file the export made when it stops or fails. An existing regular file gets a temporary file beside it, renamed over it at the end, so a stopped export leaves it as it was. GLib truncates a symbolic link's target, a hard-linked file or a file in a folder that refuses the temporary file when the export opens it, and a stopped export then says that file is incomplete. [Workspace tab system](#workspace-tab-system) covers its tabs, and `../core/ARCHITECTURE.md`, Sessions and health, the `Session` itself. +The `WorkspaceShell` (`crates/app/src/ui/workspace/workspace_shell.rs`) is what a window has once: the connection tree in the sidebar, the one tab view every session's tabs share, the header bars, the assistant's column and the toasts. Its `front` property is the session of the tab in front, or with no tab the newest session or the one last shown, and the session in front speaks for the window: the header bars, the window title, its banners, its assistant pane and the window's actions read it through bindings. The `Workspace` (`crates/app/src/ui/workspace/`) is one session: its sidebar model, which the tree shows as one list per schema and a search as one flat list of what it found, its tabs, its banners and its assistant pane, and the `title`, `subtitle`, `window-title` and `icon-name` properties the shell binds. The shell's template puts the `AdwTabOverview` at the root, as libadwaita expects, around an `AdwBreakpointBin` with an `AdwOverlaySplitView`: the sidebar and the tabs each have their own header bar. Below 600sp the sidebar collapses into an overlay, and below 450sp an `AdwTabButton` takes the tab bar's place. The `show-sidebar` window action and F9 show and hide the sidebar. Below the tree, a bar holds the Add menu the session in front builds from what its engine makes and whether it may write; the Favorites scope hides it. The shell adds the window's workspace actions once, each sent to the session in front, and removes them when it shuts down. A workspace follows its session's health and object list through `WatchForwarder`s and tells the window what it holds through its `dirty-changed`, `saves-in-flight-changed`, `work-completed` and `tabs-changed` signals. Its `WorkspaceHandle` runs the saves and tells the close prompts what closing any part of it would lose. Its `ExportLedger` writes exports off the GTK thread: the rows are encoded on the runtime and GIO writes them. An export takes the rows a grid holds, or every row of a table or an editor statement, streamed through `Connection::stream_read` on a read-only connection of its own with no deadline. `ReplaceFileWriter` removes a file the export made when it stops or fails. An existing regular file gets a temporary file beside it, renamed over it at the end, so a stopped export leaves it as it was. GLib truncates a symbolic link's target, a hard-linked file or a file in a folder that refuses the temporary file when the export opens it, and a stopped export then says that file is incomplete. [Workspace tab system](#workspace-tab-system) covers its tabs, and `../core/ARCHITECTURE.md`, Sessions and health, the `Session` itself. ## UI architecture diff --git a/linux/changelog.d/4146.added.md b/linux/changelog.d/4146.added.md new file mode 100644 index 0000000000..d5075374aa --- /dev/null +++ b/linux/changelog.d/4146.added.md @@ -0,0 +1 @@ +The sidebar has an Add button below the tree for a new table, schema or database in the connection in front. diff --git a/linux/crates/app/src/ui/session_window/mod.rs b/linux/crates/app/src/ui/session_window/mod.rs index 20c71d4b2e..0380a7072c 100644 --- a/linux/crates/app/src/ui/session_window/mod.rs +++ b/linux/crates/app/src/ui/session_window/mod.rs @@ -463,21 +463,11 @@ impl SessionWindow { SessionWindowInput::DialogClosed => drop(self.imp().dialog.take()), SessionWindowInput::CancelConnect => self.on_cancel_connect(), SessionWindowInput::StopConnecting(key) => self.stop_connecting(&key), - SessionWindowInput::RetryConnect => { - if let Some(key) = self.failed_key() { - self.on_retry_connect(&key); - } - } + SessionWindowInput::RetryConnect => self.on_failed(|key| self.on_retry_connect(key)), SessionWindowInput::RetryWithNewSecret(kind) => { - if let Some(key) = self.failed_key() { - self.on_retry_with_new_secret(&key, kind); - } - } - SessionWindowInput::EditConnection => { - if let Some(key) = self.failed_key() { - self.on_edit_connection(&key); - } + self.on_failed(|key| self.on_retry_with_new_secret(key, kind)); } + SessionWindowInput::EditConnection => self.on_failed(|key| self.on_edit_connection(key)), SessionWindowInput::Remedy { key, remedy } => self.on_remedy(key, remedy), SessionWindowInput::ShowConnectFailure(key) => self.on_show_connect_failure(key), SessionWindowInput::ForgetConnectFailure(key) => self.forget_failure(&key), @@ -486,6 +476,7 @@ impl SessionWindow { SessionWindowInput::Disconnect => self.on_disconnect_front(), SessionWindowInput::DisconnectSession(key) => self.on_disconnect(key), SessionWindowInput::ChooseDatabaseIn(key) => self.choose_database_in(key), + SessionWindowInput::NewTableIn(key) => self.deliver_to(&key, WorkspaceInput::NewTableTab { schema: None }), SessionWindowInput::NewDatabaseIn(key) => self.deliver_to(&key, WorkspaceInput::NewDatabasePrompt), SessionWindowInput::NewSchemaIn(key) => self.deliver_to(&key, WorkspaceInput::NewSchemaPrompt), SessionWindowInput::DropDatabaseIn(key) => self.drop_database_in(key), @@ -1600,7 +1591,13 @@ impl SessionWindow { self.connects_changed(); } - /// The key the failed page is about. + // The failure page's buttons act on the connect that failed. + fn on_failed(&self, act: impl FnOnce(&SessionKey)) { + if let Some(key) = self.failed_key() { + act(&key); + } + } + fn failed_key(&self) -> Option { self.imp() .failed diff --git a/linux/crates/app/src/ui/session_window/session_window_input.rs b/linux/crates/app/src/ui/session_window/session_window_input.rs index 39a3df0897..a0fc4d2f11 100644 --- a/linux/crates/app/src/ui/session_window/session_window_input.rs +++ b/linux/crates/app/src/ui/session_window/session_window_input.rs @@ -82,6 +82,7 @@ pub(crate) enum SessionWindowInput { /// Open Database… on a connection's row: pick another of its server's /// databases to open beside it. ChooseDatabaseIn(SessionKey), + NewTableIn(SessionKey), /// New Database… on a connection's row. NewDatabaseIn(SessionKey), /// New Schema… on a connection's row. diff --git a/linux/crates/app/src/ui/session_window/window_actions.rs b/linux/crates/app/src/ui/session_window/window_actions.rs index 1babc96a56..47f4e559a6 100644 --- a/linux/crates/app/src/ui/session_window/window_actions.rs +++ b/linux/crates/app/src/ui/session_window/window_actions.rs @@ -46,13 +46,14 @@ const ACTIONS: [(&str, ActionInput); 12] = [ /// The actions a connection tree row or a toast fires for its own /// session, which take the session as their target (`session_target`). -const SESSION_ACTIONS: [(&str, SessionInput); 11] = [ +const SESSION_ACTIONS: [(&str, SessionInput); 12] = [ ("show-session", SessionWindowInput::ShowSession), ("disconnect-session", SessionWindowInput::DisconnectSession), ("stop-connecting", SessionWindowInput::StopConnecting), ("new-query-in", SessionWindowInput::NewQueryIn), ("refresh-in", SessionWindowInput::RefreshIn), ("open-database-in", SessionWindowInput::ChooseDatabaseIn), + ("new-table-in", SessionWindowInput::NewTableIn), ("new-database-in", SessionWindowInput::NewDatabaseIn), ("new-schema-in", SessionWindowInput::NewSchemaIn), ("drop-database-in", SessionWindowInput::DropDatabaseIn), diff --git a/linux/crates/app/src/ui/workspace/imp.rs b/linux/crates/app/src/ui/workspace/imp.rs index 49e4d218a5..35933e54a3 100644 --- a/linux/crates/app/src/ui/workspace/imp.rs +++ b/linux/crates/app/src/ui/workspace/imp.rs @@ -4,9 +4,9 @@ use std::sync::OnceLock; use glib::subclass::Signal; use gtk4 as gtk; -use gtk4::glib; use gtk4::prelude::*; use gtk4::subclass::prelude::*; +use gtk4::{gio, glib}; use libadwaita as adw; use libadwaita::subclass::prelude::*; use tablepro_core::DataModel; @@ -56,6 +56,8 @@ pub struct Workspace { pub(super) assistant_available: Cell, #[property(get)] pub(super) can_refresh: Cell, + #[property(get)] + pub(super) creation_menu: RefCell>, pub(super) key: OnceCell, // File sessions and saved connections must use the editor save's identity. diff --git a/linux/crates/app/src/ui/workspace/mod.rs b/linux/crates/app/src/ui/workspace/mod.rs index e8f9be2bcf..67f1db119d 100644 --- a/linux/crates/app/src/ui/workspace/mod.rs +++ b/linux/crates/app/src/ui/workspace/mod.rs @@ -919,6 +919,7 @@ impl Workspace { /// which titles its row and the header bars from these. fn hold(&self, model: WorkspaceModel, blockers: [Rc; 2]) { model.refresh_title(); + model.show_affordances(); model.refresh_assistant(); self.imp().model.replace(Some(model)); for blocker in blockers { @@ -943,6 +944,11 @@ impl Workspace { self.with_model(WorkspaceModel::open); } + fn show_creation_menu(&self, menu: gio::MenuModel) { + self.imp().creation_menu.replace(Some(menu)); + self.notify_creation_menu(); + } + /// The key the session is open under. pub(crate) fn key(&self) -> Option { self.imp().key.get().cloned() diff --git a/linux/crates/app/src/ui/workspace/sidebar/mod.rs b/linux/crates/app/src/ui/workspace/sidebar/mod.rs index 03bdd795c7..b4379a4a1c 100644 --- a/linux/crates/app/src/ui/workspace/sidebar/mod.rs +++ b/linux/crates/app/src/ui/workspace/sidebar/mod.rs @@ -41,6 +41,7 @@ pub(crate) use key_listing::{KeySidebar, KeysListed}; pub(super) use sidebar_affordances::SidebarAffordances; use sidebar_index::SidebarIndex; pub(super) use sidebar_view::SidebarView; +pub(super) use tree_menu::creation_menu; use super::table_naming::TableNaming; use super::{OpenMode, WorkspaceInput, WorkspaceModel, WorkspaceSender}; @@ -354,8 +355,17 @@ impl WorkspaceModel { /// The connection was replaced, perhaps by one to another server /// version, so what the sidebar offers is read again. pub(super) fn on_link_changed(&self) { - if let Some(session) = self.context.active.get() { - self.sidebar.set_affordances(SidebarAffordances::for_session(&session)); + self.show_affordances(); + } + + pub(super) fn show_affordances(&self) { + let Some(session) = self.context.active.get() else { + return; + }; + let affordances = SidebarAffordances::for_session(&session); + self.sidebar.set_affordances(affordances); + if let Some(workspace) = self.this.upgrade() { + workspace.show_creation_menu(creation_menu(&self.key, affordances).upcast()); } } } diff --git a/linux/crates/app/src/ui/workspace/sidebar/tests.rs b/linux/crates/app/src/ui/workspace/sidebar/tests.rs index 460918d87e..f17fc569ff 100644 --- a/linux/crates/app/src/ui/workspace/sidebar/tests.rs +++ b/linux/crates/app/src/ui/workspace/sidebar/tests.rs @@ -514,7 +514,7 @@ fn target(key: &SessionKey) -> Option { } /// Each menu item's action and target, sections and submenus flattened. -fn menu_items(menu: &gio::MenuModel) -> Vec<(String, Option)> { +pub(crate) fn menu_items(menu: &gio::MenuModel) -> Vec<(String, Option)> { let mut found = Vec::new(); for index in 0..menu.n_items() { if let Some(action) = menu @@ -2588,6 +2588,42 @@ fn a_search_finds_tables_under_their_schema_past_an_empty_one() { wait_until(WAIT, || shown.headings() == ["sales (Alpha)"]).expect("the table's own schema"); } +#[gtk4::test] +fn the_add_menu_offers_what_the_engine_makes_for_its_own_session() { + let key = SessionKey::Saved(Uuid::new_v4()); + let offered = |affordances| { + let menu = creation_menu(&key, affordances).upcast::(); + crate::test_support::assert_access_keys(&menu); + let targets = menu_items(&menu) + .into_iter() + .map(|(action, target)| (action, target.and_then(|target| target.get::()))) + .collect::>(); + (menu_labels(&menu), targets) + }; + + let (labels, targets) = offered(catalog_affordance()); + assert_eq!(labels, ["New _Table…", "New _Schema…", "New _Database…"]); + assert_eq!( + targets, + [ + ("win.new-table-in".to_owned(), target(&key)), + ("win.new-schema-in".to_owned(), target(&key)), + ("win.new-database-in".to_owned(), target(&key)), + ] + ); + + let mut keyspaces = catalog_affordance(); + keyspaces.catalog.database_noun = tablepro_core::ddl::DatabaseNoun::Keyspace; + keyspaces.lists_databases = true; + assert_eq!(offered(keyspaces).0, ["New _Table…", "New _Keyspace…"]); + + let read_only = SidebarAffordances { + read_only: true, + ..catalog_affordance() + }; + assert!(offered(read_only).0.is_empty(), "a read-only connection makes nothing"); +} + #[gtk4::test] fn a_connections_row_makes_and_drops_databases_and_a_databases_row_drops_its_own() { let alpha = connection("Alpha", None); diff --git a/linux/crates/app/src/ui/workspace/sidebar/tree_menu.rs b/linux/crates/app/src/ui/workspace/sidebar/tree_menu.rs index a3bd6ffb3d..6ae602d919 100644 --- a/linux/crates/app/src/ui/workspace/sidebar/tree_menu.rs +++ b/linux/crates/app/src/ui/workspace/sidebar/tree_menu.rs @@ -1,3 +1,4 @@ +use gtk4::gio::prelude::MenuModelExt; use gtk4::{gio, glib}; use tablepro_core::ddl::DatabaseNoun; use tablepro_session::SessionKey; @@ -10,6 +11,7 @@ pub(super) const SHOW_SESSION: &str = "win.show-session"; const NEW_QUERY_IN: &str = "win.new-query-in"; const REFRESH_IN: &str = "win.refresh-in"; const OPEN_DATABASE_IN: &str = "win.open-database-in"; +const NEW_TABLE_IN: &str = "win.new-table-in"; const NEW_DATABASE_IN: &str = "win.new-database-in"; const NEW_SCHEMA_IN: &str = "win.new-schema-in"; const DROP_DATABASE_IN: &str = "win.drop-database-in"; @@ -91,6 +93,33 @@ pub(super) fn session_section(key: &SessionKey, state: InWindow, affordances: Si menu } +// Empty when the engine makes none of these or the connection is read-only, which hides the Add button. +pub(crate) fn creation_menu(key: &SessionKey, affordances: SidebarAffordances) -> gio::Menu { + let target = crate::ui::session_target::to_variant(key); + let objects = gio::Menu::new(); + if affordances.offers_new_table() { + objects.append_item(&item(&crate::i18n::gettext("New _Table…"), NEW_TABLE_IN, &target)); + } + let containers = gio::Menu::new(); + if affordances.offers_new_schema() { + containers.append_item(&item(&crate::i18n::gettext("New _Schema…"), NEW_SCHEMA_IN, &target)); + } + if affordances.offers_new_database() { + let label = match affordances.catalog.database_noun { + DatabaseNoun::Database => crate::i18n::gettext("New _Database…"), + DatabaseNoun::Keyspace => crate::i18n::gettext("New _Keyspace…"), + }; + containers.append_item(&item(&label, NEW_DATABASE_IN, &target)); + } + let menu = gio::Menu::new(); + for section in [objects, containers] { + if section.n_items() > 0 { + menu.append_section(None, §ion); + } + } + menu +} + /// Whether the row of an open session offers Drop Database…. Only /// engines whose connection holds one database open another beside it, /// and a file holds no other. diff --git a/linux/crates/app/src/ui/workspace/tests/shell.rs b/linux/crates/app/src/ui/workspace/tests/shell.rs index 7d408edee7..262c6ac416 100644 --- a/linux/crates/app/src/ui/workspace/tests/shell.rs +++ b/linux/crates/app/src/ui/workspace/tests/shell.rs @@ -840,3 +840,55 @@ fn the_header_refresh_follows_the_selected_tabs_capability() { wait_until(WAIT, || shell.tab_view().n_pages() == 0).expect("all clean tabs close"); wait_until(WAIT, || !button.is_sensitive()).expect("no refresh after the last tab closes"); } + +fn postgres(script: &mut tablepro_test_support::ConnectionScript) { + script.dialect = Arc::new(tablepro_driver_postgres::PgDialect::new( + &tablepro_core::ServerInfo::new("PostgreSQL", "18.0", 18, 0, 0), + )); +} + +#[gtk4::test] +fn the_sidebar_add_menu_makes_objects_in_the_session_in_front() { + let test = TestWindow::connected_with("SidebarAdd", postgres); + let shell = shell_of(&test.workspace()); + let imp = shell.imp(); + let (bar, button) = (imp.sidebar_bar.get(), imp.sidebar_add_button.get()); + wait_until(WAIT, || bar.is_revealed()).expect("the bar under the tree"); + crate::test_support::assert_labelled(&button).expect("the Add button is named"); + let target = crate::ui::session_target::to_variant(&test.key()); + let offered = button + .menu_model() + .map(|menu| crate::ui::workspace::sidebar::tests::menu_items(&menu)) + .unwrap_or_default(); + assert_eq!( + offered, + [ + ("win.new-table-in".to_owned(), Some(target.clone())), + ("win.new-schema-in".to_owned(), Some(target.clone())), + ("win.new-database-in".to_owned(), Some(target.clone())), + ] + ); + + imp.scope_toggle.set_active_name(Some("favorites")); + assert!(!bar.is_revealed(), "the bar makes tables under Favorites"); + imp.scope_toggle.set_active_name(Some("tables")); + assert!(bar.is_revealed()); + + WidgetExt::activate_action(&button, "win.new-table-in", Some(&target)).expect("the window's action"); + wait_until(WAIT, || shell.tab_view().n_pages() == 1).expect("a new table's tab"); +} + +#[gtk4::test] +fn a_read_only_connection_has_no_add_menu() { + let test = TestWindow::connected_with("SidebarAddReadOnly", |script| { + postgres(script); + script.read_only = true; + }); + let shell = shell_of(&test.workspace()); + let imp = shell.imp(); + wait_until(WAIT, || test.workspace().creation_menu().is_some()).expect("the session's Add menu"); + + assert_eq!(test.workspace().creation_menu().map(|menu| menu.n_items()), Some(0)); + assert!(!imp.sidebar_add_button.is_visible()); + assert!(!imp.sidebar_bar.is_revealed()); +} diff --git a/linux/crates/app/src/ui/workspace/workspace_shell.rs b/linux/crates/app/src/ui/workspace/workspace_shell.rs index 5f5a1e9a04..f8435db5d9 100644 --- a/linux/crates/app/src/ui/workspace/workspace_shell.rs +++ b/linux/crates/app/src/ui/workspace/workspace_shell.rs @@ -52,6 +52,7 @@ glib::wrapper! { pub(super) fn describe_buttons(shell: &WorkspaceShell) { let imp = shell.imp(); describe_icon_button(&imp.table_search_toggle.get(), &gettext("Search"), None); + describe_icon_button(&imp.sidebar_add_button.get(), &gettext("Add"), None); describe_icon_button(&imp.safe_mode_button.get(), &gettext("Safe Mode"), None); describe_icon_button( &imp.refresh_tables_button.get(), @@ -144,6 +145,7 @@ impl WorkspaceShell { shell, move |_| shell.on_scope_changed() )); + shell.connect_sidebar_bar(); tree.follow_search(&imp.table_search); let _ = imp.tree.set(tree); crate::ui::picker::install_picker_actions(&shell, services.saved_connections.clone(), sender.clone()); @@ -386,6 +388,14 @@ impl WorkspaceShell { of_front("icon-name").bind(&icon, "icon-name", Some(self)), shows_icon.bind(&icon, "visible", Some(self)), of_front("assistant-available").bind(&imp.assistant_toggle.get(), "visible", Some(self)), + of_front("creation-menu").bind(&imp.sidebar_add_button.get(), "menu-model", Some(self)), + gtk::ClosureExpression::new::( + [of_front("creation-menu")], + glib::closure!( + |_: Option, menu: Option| menu.is_some_and(|menu| menu.n_items() > 0) + ), + ) + .bind(&imp.sidebar_add_button.get(), "visible", Some(self)), ]; if let Some(window) = imp.window.upgrade() { watches.push(of_front("window-title").bind(&window, "title", Some(self))); @@ -713,9 +723,26 @@ impl WorkspaceShell { } else { imp.table_search_bar.set_key_capture_widget(Some(&*imp.sidebar_root)); } + self.show_sidebar_bar(); self.reload_favorites(); } + fn connect_sidebar_bar(&self) { + self.imp().sidebar_add_button.connect_visible_notify(glib::clone!( + #[weak(rename_to = shell)] + self, + move |_| shell.show_sidebar_bar() + )); + } + + // Its commands make objects in the tree, which the Favorites scope does not list. + fn show_sidebar_bar(&self) { + let imp = self.imp(); + let tables = imp.scope_toggle.active_name().as_deref() != Some(FAVORITES); + imp.sidebar_bar + .set_revealed(tables && imp.sidebar_add_button.is_visible()); + } + fn follow_favorites(&self) { let imp = self.imp(); if imp.favorites_watch.borrow().is_none() diff --git a/linux/crates/app/src/ui/workspace/workspace_shell_imp.rs b/linux/crates/app/src/ui/workspace/workspace_shell_imp.rs index e2859faaba..a53301338b 100644 --- a/linux/crates/app/src/ui/workspace/workspace_shell_imp.rs +++ b/linux/crates/app/src/ui/workspace/workspace_shell_imp.rs @@ -57,6 +57,10 @@ pub struct WorkspaceShell { #[template_child] pub refresh_tables_button: TemplateChild, #[template_child] + pub sidebar_bar: TemplateChild, + #[template_child] + pub sidebar_add_button: TemplateChild, + #[template_child] pub table_search_bar: TemplateChild, #[template_child] pub table_search: TemplateChild, diff --git a/linux/data/resources/ui/workspace-shell.ui b/linux/data/resources/ui/workspace-shell.ui index 390a3b1a6e..f6a193dfd2 100644 --- a/linux/data/resources/ui/workspace-shell.ui +++ b/linux/data/resources/ui/workspace-shell.ui @@ -122,6 +122,18 @@ false + + + false + + + list-add-symbolic + up + false + + + +