Skip to content

[GTK4] Expand and collapse Tree rows with Left and Right - #3694

Merged
akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:gtk4-tree-arrow-expand
Oct 7, 2026
Merged

akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:gtk4-tree-arrow-expand

Conversation

@akurtakov

Copy link
Copy Markdown
Member

The Left and Right bindings added to the GtkTreeView class came after GtkTreeView's own move-cursor bindings, which handle the keys first, so they never ran. Handle the keys in the key press handler instead, as on GTK3: expand or collapse the cursor row when it has children, otherwise let GtkTreeView move the cursor.

Assisted-by: Anthropic Claude Code (claude-opus-5-5[1m])

The Left and Right bindings added to the GtkTreeView class came after
GtkTreeView's own move-cursor bindings, which handle the keys first, so
they never ran. Handle the keys in the key press handler instead, as on
GTK3: expand or collapse the cursor row when it has children, otherwise
let GtkTreeView move the cursor.

Assisted-by: Anthropic Claude Code (claude-opus-5-5[1m])

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The corrected GTK4 keyboard behavior lacks regression coverage.

1 open finding
What changed in this PR

Updates GTK4 Tree keyboard handling so Left/Right expand or collapse parent rows before GtkTreeView processes cursor movement.

Changes:

  • Removes ineffective GTK4 class-level key bindings.
  • Handles Left/Right directly while preserving modifiers, RTL behavior, search input, and leaf navigation.
File Description
Tree.java Implements GTK4 row expansion and collapse keyboard handling.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (linux)

  115 files  ±0    115 suites  ±0   14m 38s ⏱️ +42s
4 658 tests ±0  4 423 ✅ ±0  235 💤 ±0  0 ❌ ±0 
3 545 runs  ±0  3 456 ✅ ±0   89 💤 ±0  0 ❌ ±0 

Results for commit 4b13e80. ± Comparison against base commit a33de32.

@akurtakov
akurtakov merged commit f87da9a into eclipse-platform:master Oct 7, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants