Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5ecc54f
feat(linux-grid): mark a field's key, edit and type in the row details
sedax90 Nov 8, 2026
d0f125b
docs(linux-grid): add the changelog entry
sedax90 Nov 8, 2026
bb9fc32
feat(linux-grid): search the row details' fields and show the edited …
sedax90 Nov 8, 2026
69e32e5
docs(linux-grid): add the changelog entry
sedax90 Nov 8, 2026
f743a96
fix(linux-grid): name a field's key and type to screen readers and dr…
datlechin Nov 8, 2026
faaf93d
Merge branch 'feat/linux-row-detail-fields' into feat/linux-row-detai…
datlechin Nov 8, 2026
d83d8ba
fix(linux-grid): add a symbolic type marker to row details
datlechin Nov 8, 2026
9e863bd
fix(linux-grid): compare accessible field text as strings
datlechin Nov 8, 2026
c3431d7
Merge branch 'feat/linux-row-detail-fields' into feat/linux-row-detai…
datlechin Nov 8, 2026
22e2078
fix(linux-grid): refresh row detail filters with their data
datlechin Nov 8, 2026
a34198c
fix(linux-grid): focus the row detail search when typing
datlechin Nov 8, 2026
4f0ee65
test(linux-grid): wait for row detail controls before tabbing
datlechin Nov 8, 2026
4ad9eca
feat(linux-grid): draw a row detail field as a name over its value, w…
sedax90 Nov 9, 2026
4f42a15
chore(linux): changelog for the row details design
sedax90 Nov 9, 2026
29d3819
feat(linux-grid): edit a row detail field in its own row
sedax90 Nov 9, 2026
cd69ecc
chore(linux): changelog for the inline row detail editor
sedax90 Nov 9, 2026
69e48b2
feat(linux-grid): a menu on every row detail field
sedax90 Nov 9, 2026
ed9b199
chore(linux): changelog for the row detail field menu
sedax90 Nov 9, 2026
f168a84
Merge remote-tracking branch 'origin/main' into feat/linux-row-detail…
datlechin Nov 9, 2026
2e485aa
fix(linux-grid): copy a row detail field's whole value through the gr…
datlechin Nov 9, 2026
a3fc9a0
Merge branch 'feat/linux-row-detail-design' into feat/linux-row-detai…
datlechin Nov 9, 2026
e47c3fd
refactor(linux-grid): seat the row detail value editor in its field's…
datlechin Nov 9, 2026
15793d6
Merge branch 'feat/linux-row-detail-inline' into feat/linux-row-detai…
datlechin Nov 9, 2026
df9997d
fix(linux-grid): hold a row detail field's menu on its own field
datlechin Nov 9, 2026
6f63a85
fix(linux-grid): hand the keyboard to a listed field when the editor'…
datlechin Nov 9, 2026
b5e51c0
Merge branch 'feat/linux-row-detail-inline' into feat/linux-row-detai…
datlechin Nov 9, 2026
78baf3d
test(linux-grid): keep the row detail copy tests clear of other open …
datlechin Nov 9, 2026
ad50ddf
Merge branch 'feat/linux-row-detail-design' into feat/linux-row-detai…
datlechin Nov 9, 2026
da8ac27
Merge branch 'feat/linux-row-detail-inline' into feat/linux-row-detai…
datlechin Nov 9, 2026
19de849
Merge remote-tracking branch 'origin/main' into feat/linux-row-detail…
datlechin Nov 10, 2026
b25a5a4
Merge commit '19de84965bbbe22ea705874e07f74fcd43c0d45b' into feat/lin…
datlechin Nov 10, 2026
454eb30
Merge commit 'b25a5a48a10e4c149075b25596e75d174b0da312' into feat/lin…
datlechin Nov 10, 2026
3df0c59
Merge remote-tracking branch 'origin/main' into feat/linux-row-detail…
datlechin Nov 10, 2026
29e8376
Merge commit '3df0c59abb8e17a0a606fccb0ca67f7a9037aaf5' into feat/lin…
datlechin Nov 10, 2026
b531464
Merge commit '29e8376aac2532d2a89f4cbcb43f911b9e559325' into feat/lin…
datlechin Nov 10, 2026
ebf7cfa
fix(linux-grid): take the copy button before the tools box moves into…
datlechin Nov 10, 2026
79b3928
Merge branch 'feat/linux-row-detail-inline' into feat/linux-row-detai…
datlechin Nov 10, 2026
934ffcc
Merge remote-tracking branch 'origin/main' into feat/linux-row-detail…
datlechin Nov 10, 2026
8418c3c
Merge commit '934ffcce507a039463f61e8e3c0e496cac24fa77' into feat/lin…
datlechin Nov 10, 2026
d6bfc0f
fix(linux-grid): list a hidden row detail field the grid opens
datlechin Nov 10, 2026
41fc309
Merge commit 'd6bfc0f9c' into feat/linux-row-detail-menu
datlechin Nov 10, 2026
e0785e8
test(linux-grid): tab past a row detail field's menu before leaving t…
datlechin Nov 10, 2026
9e33295
Merge remote-tracking branch 'origin/main' into feat/linux-row-detail…
datlechin Nov 10, 2026
8a7b64a
Merge commit '9e3329530' into feat/linux-row-detail-menu
datlechin Nov 10, 2026
6cca1cb
Merge remote-tracking branch 'origin/main' into feat/linux-row-detail…
datlechin Nov 11, 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/4158.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Each field in the row details has its own menu to set it to NULL, DEFAULT or empty, or copy it.
56 changes: 48 additions & 8 deletions linux/crates/app/src/ui/data_grid/row_detail/fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,16 @@ fn field_row() -> gtk::Box {
let copy = gtk::Button::from_icon_name(icons::EDIT_COPY);
copy.add_css_class("flat");
crate::ui::a11y::describe_icon_button(&copy, &gettext("Copy Value"), None);
let menu = gtk::MenuButton::builder().icon_name(icons::VIEW_MORE).build();
menu.add_css_class("flat");
crate::ui::a11y::describe_icon_button(&menu, &gettext("More Actions"), None);
// The value editor's pickers, while this is the picked field.
let tools = gtk::Box::builder().visible(false).build();
// Suffixes of the row, as on a libadwaita property row.
let suffix = gtk::Box::builder().valign(gtk::Align::Center).build();
suffix.append(&tools);
suffix.append(&copy);
suffix.append(&menu);
let line = gtk::Box::new(gtk::Orientation::Horizontal, 6);
line.append(&content);
line.append(&suffix);
Expand All @@ -178,6 +182,7 @@ struct FieldParts {
value: gtk::Inscription,
tools: gtk::Box,
copy: gtk::Button,
menu: gtk::MenuButton,
slot: gtk::Box,
}

Expand All @@ -198,6 +203,7 @@ fn field_parts(row: &gtk::Widget) -> Option<FieldParts> {
kind: kind.downcast().ok()?,
value: top.next_sibling()?.downcast().ok()?,
tools: tools.downcast().ok()?,
menu: copy.next_sibling()?.downcast().ok()?,
copy: copy.downcast().ok()?,
slot: line.next_sibling()?.downcast().ok()?,
})
Expand Down Expand Up @@ -334,6 +340,7 @@ impl RowDetailPane {
}
}
));
pane.connect_field_menu(&parts.menu, item);
}
item.set_child(Some(&row));
}
Expand Down Expand Up @@ -631,19 +638,52 @@ impl RowDetailPane {
.scroll_to(position, Some(&view_column), gtk::ListScrollFlags::FOCUS, None);
}

/// Run the grid's `action` on the shown row's `column`, whichever
/// field the editor holds, as a cell menu runs it on its cell.
fn act_on_field(&self, column: usize, action: &str) {
let (Some(grid), Some(row)) = (self.grid(), self.current_pin()) else {
return;
};
/// Hold the shown row's `column` as the target of the grid's actions,
/// whichever field the editor holds, as a cell menu holds its cell.
fn hold_field(&self, column: usize) -> Option<DataGrid> {
let (grid, row) = (self.grid()?, self.current_pin()?);
grid.hold_menu_target(crate::ui::data_grid::selection::Target {
cell: Some((row.clone(), column)),
rows: vec![row],
});
grid.refresh_actions();
grid.actions().activate_action(action, None);
grid.release_menu_target_soon();
Some(grid)
}

fn act_on_field(&self, column: usize, action: &str) {
if let Some(grid) = self.hold_field(column) {
grid.actions().activate_action(action, None);
grid.release_menu_target_soon();
}
}

/// The menu's items are the grid's own cell actions, held on the
/// row's field until it closes, so they act on that field while the
/// grid has no focus and the editor stays on its own.
fn connect_field_menu(&self, menu: &gtk::MenuButton, item: &gtk::ListItem) {
menu.set_menu_model(Some(&*self.imp().value_menu));
menu.set_create_popup_func(glib::clone!(
#[weak(rename_to = pane)]
self,
#[weak]
item,
move |_| {
if let Some(column) = field_of(item.item()) {
pane.hold_field(column);
}
}
));
if let Some(popover) = menu.popover() {
popover.connect_closed(glib::clone!(
#[weak(rename_to = pane)]
self,
move |_| {
if let Some(grid) = pane.grid() {
grid.release_menu_target_soon();
}
}
));
}
}

/// A header drag, a hidden column or a new column set reorders the
Expand Down
2 changes: 1 addition & 1 deletion linux/crates/app/src/ui/data_grid/row_detail/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub struct RowDetailPane {
#[template_child]
pub clock_set: TemplateChild<gtk::Button>,
#[template_child]
pub value_menu_button: TemplateChild<gtk::MenuButton>,
pub value_menu: TemplateChild<gio::Menu>,
#[template_child]
pub value_scroller: TemplateChild<gtk::ScrolledWindow>,
#[template_child]
Expand Down
1 change: 0 additions & 1 deletion linux/crates/app/src/ui/data_grid/row_detail/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ impl RowDetailPane {
self.imp().grid.set(Some(grid));
self.connect_fields(grid);
self.connect_value_editor(grid);
self.connect_value_menu(grid);
self.connect_choices();
self.connect_calendar();
self.connect_clock();
Expand Down
44 changes: 41 additions & 3 deletions linux/crates/app/src/ui/data_grid/row_detail/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ fn a_locked_cell_is_read_only_with_its_sentence() {
message(&pane),
Some(CellLock::KeyColumn.explanation(edit_parse_message))
);
pane.imp().value_menu_button.popup();
field_menu(&pane, 0).popup();
assert!(!grid.is_enabled("set-null"), "the menu offered to change a locked cell");
assert!(grid.is_enabled("copy"));
}
Expand All @@ -441,7 +441,7 @@ fn set_to_null_writes_null_into_the_field() {
take_keyboard(&grid);
grid.focus(0, 1);
pane.focus_value();
pane.imp().value_menu_button.popup();
field_menu(&pane, 1).popup();
assert!(grid.is_enabled("set-null"), "the menu does not act on the field");
assert!(!grid.is_enabled("set-default"), "a saved row offered DEFAULT");

Expand Down Expand Up @@ -489,7 +489,7 @@ fn copy_value_copies_the_field() {
}
});

pane.imp().value_menu_button.popup();
field_menu(&pane, 1).popup();
grid.activate("copy");
wait_until(WAIT, || !heard.borrow().is_empty()).expect("the copy lands");

Expand Down Expand Up @@ -575,12 +575,20 @@ fn tab_leaves_the_field_list_after_the_focused_field() {
.and_downcast::<gtk::Button>()
.is_some_and(|button| button.icon_name().as_deref() == Some(crate::ui::icons::EDIT_COPY))
};
let on_menu = || {
gtk::prelude::GtkWindowExt::focus(&grid.window)
.and_then(|focus| focus.ancestor(gtk::MenuButton::static_type()))
.and_downcast::<gtk::MenuButton>()
.is_some_and(|button| button.icon_name().as_deref() == Some(crate::ui::icons::VIEW_MORE))
};

keys.press(gdk::Key::Tab, gdk::ModifierType::empty()).expect("Tab");
wait_until(WAIT, || crate::ui::a11y::holds_focus(&list)).expect("Tab to the list");
keys.press(gdk::Key::Tab, gdk::ModifierType::empty()).expect("Tab");
wait_until(WAIT, on_copy).expect("Tab to the field's copy button");
keys.press(gdk::Key::Tab, gdk::ModifierType::empty()).expect("Tab");
wait_until(WAIT, on_menu).expect("Tab to the field's menu");
keys.press(gdk::Key::Tab, gdk::ModifierType::empty()).expect("Tab");
wait_until(WAIT, || !crate::ui::a11y::holds_focus(&list)).expect("Tab out of the list");
}

Expand Down Expand Up @@ -645,6 +653,36 @@ fn a_field_the_search_drops_while_editing_hands_the_keyboard_to_the_search() {
);
}

/// The menu button of data column `column`'s row, once the list has drawn
/// it.
fn field_menu(pane: &RowDetailPane, column: usize) -> gtk::MenuButton {
drain_main_context();
let row = drawn_field(pane, column).child().expect("the field's row");
descendants(&row)
.into_iter()
.filter_map(|widget| widget.downcast::<gtk::MenuButton>().ok())
.find(|button| button.icon_name().as_deref() == Some(crate::ui::icons::VIEW_MORE))
.expect("the field's menu")
}

#[gtk4::test]
fn a_fields_menu_acts_on_that_field_and_leaves_the_editor() {
let (grid, pane) = opened(three_text_columns(), three_text_values());
grid.focus(0, 1);
let menu = field_menu(&pane, 2);

menu.popup();
assert!(grid.is_enabled("set-null"), "the menu does not act on its field");
grid.activate("set-null");
menu.popdown();
drain_main_context();

assert_eq!(pending(&grid, 1, 2), Some(CellInput::Value(Value::Null)));
assert_eq!(pending(&grid, 1, 1), None);
assert_eq!(selected_field(&pane), Some(1), "the menu moved the editor");
assert_eq!(pane.typed_text(), "A");
}

#[gtk4::test]
fn a_field_the_search_hides_lists_again_when_the_grid_shows_it() {
let (grid, pane) = opened(three_text_columns(), three_text_values());
Expand Down
30 changes: 0 additions & 30 deletions linux/crates/app/src/ui/data_grid/row_detail/value_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use crate::services::grid::{
display_text, empty_placeholder, hex_dump,
};
use crate::ui::data_grid::edit::CHOICE_ACTIONS;
use crate::ui::data_grid::selection::Target;
use crate::ui::data_grid::{DataGrid, GridRow, PinnedRow};
use crate::ui::error_text::edit_parse_message;
use crate::ui::handler_guard::HandlerGuard;
Expand Down Expand Up @@ -449,25 +448,6 @@ impl RowDetailPane {
}
}

/// The menu's items are the grid's own cell actions, held on the
/// shown row and field until it closes, as the cell menu holds its
/// cell, so they act on the field while the grid has no focus.
pub(super) fn connect_value_menu(&self, grid: &DataGrid) {
let button = self.imp().value_menu_button.get();
button.set_create_popup_func(glib::clone!(
#[weak(rename_to = pane)]
self,
move |_| pane.arm_value_menu()
));
if let Some(popover) = button.popover() {
popover.connect_closed(glib::clone!(
#[weak]
grid,
move |_| grid.release_menu_target_soon()
));
}
}

/// The labels of the field shown, filled as the menu opens so they act
/// on that row and field.
pub(super) fn connect_choices(&self) {
Expand All @@ -494,16 +474,6 @@ impl RowDetailPane {
}
}

fn arm_value_menu(&self) {
let Some(grid) = self.grid() else {
return;
};
let cell = self.current_pin().zip(self.imp().field.get());
let rows = cell.iter().map(|(row, _)| row.clone()).collect();
grid.hold_menu_target(Target { cell, rows });
grid.refresh_actions();
}

fn follow_style_scheme(&self, grid: &DataGrid) {
let settings = grid.config().map(|config| config.settings.clone());
let paint = {
Expand Down
13 changes: 0 additions & 13 deletions linux/data/resources/ui/row-detail-pane.ui
Original file line number Diff line number Diff line change
Expand Up @@ -346,19 +346,6 @@
</property>
</object>
</child>
<child>
<object class="GtkMenuButton" id="value_menu_button">
<property name="icon-name">view-more-symbolic</property>
<property name="menu-model">value_menu</property>
<property name="tooltip-text" translatable="yes">More Actions</property>
<accessibility>
<property name="label" translatable="yes">More Actions</property>
</accessibility>
<style>
<class name="flat"/>
</style>
</object>
</child>
</object>
</child>
<child>
Expand Down
Loading