feat(command): add smart edit-or-drill for aggregated cells
Introduce EditOrDrill command that intelligently handles editing based on cell type. When cursor is on an aggregated pivot cell (categories on Axis::None, no records mode), it drills into the cell. Otherwise, it enters edit mode with the current displayed value. The 'i' and 'a' keys now trigger edit-or-drill instead of enter-edit-mode. Aggregated cells are styled in italic to signal that drilling is required for editing. Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
This commit is contained in:
@ -402,7 +402,13 @@ impl<'a> GridWidget<'a> {
|
||||
.to_lowercase()
|
||||
.contains(&self.search_query.to_lowercase());
|
||||
|
||||
let cell_style = if is_selected {
|
||||
// Aggregated cells (pivot view with hidden dims) are
|
||||
// not directly editable — shown in italic to signal
|
||||
// "drill to edit". Records mode cells are always
|
||||
// directly editable, as are plain pivot cells.
|
||||
let is_aggregated = !layout.is_records_mode()
|
||||
&& !layout.none_cats.is_empty();
|
||||
let mut cell_style = if is_selected {
|
||||
Style::default()
|
||||
.fg(Color::Black)
|
||||
.bg(Color::Cyan)
|
||||
@ -421,6 +427,9 @@ impl<'a> GridWidget<'a> {
|
||||
} else {
|
||||
Style::default()
|
||||
};
|
||||
if is_aggregated {
|
||||
cell_style = cell_style.add_modifier(Modifier::ITALIC);
|
||||
}
|
||||
|
||||
buf.set_string(
|
||||
x,
|
||||
|
||||
Reference in New Issue
Block a user