Skip to content

feat(tree): move focus to the parent node on repeated arrow left (#DS-4750) - #1852

Open
lskramarov wants to merge 2 commits into
mainfrom
feat/DS-4750
Open

feat(tree): move focus to the parent node on repeated arrow left (#DS-4750)#1852
lskramarov wants to merge 2 commits into
mainfrom
feat/DS-4750

Conversation

@lskramarov

Copy link
Copy Markdown
Contributor

No description provided.

@lskramarov lskramarov self-assigned this Aug 5, 2026
@lskramarov lskramarov added the enhancement New feature or request label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit d05d66a):

https://koobiq-next--prs-1852-ai6hk0fx.web.app

(expires Sat, 08 Aug 2026 17:07:23 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Tree / TreeSelect keyboard behavior so that repeated ArrowLeft moves focus up to the parent node when the current node is already collapsed (or is a leaf), aligning component behavior with expected tree navigation patterns.

Changes:

  • Updated KbqTreeSelection ArrowLeft handling to collapse expanded nodes, otherwise move focus to the nearest enabled ancestor.
  • Ensured KbqTreeSelect keeps the caret in the search input after ArrowLeft/ArrowRight handling inside the panel.
  • Updated Tree keyboard navigation documentation (EN/RU) and added/expanded unit tests covering the new ArrowLeft behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/public_api_guard/components/tree-select.api.md Updates public API snapshot for panelKeydownHandler return type to void.
packages/components/tree/tree.ru.md Documents updated ArrowLeft behavior in Russian keyboard shortcuts table.
packages/components/tree/tree.en.md Documents updated ArrowLeft behavior in English keyboard shortcuts table.
packages/components/tree/tree-selection.component.ts Implements ArrowLeft “move to parent” behavior when not collapsing an expanded node.
packages/components/tree/tree-selection.component.spec.ts Adds coverage for ArrowLeft collapse vs. focus-to-parent behavior, including disabled ancestor/toggle cases.
packages/components/tree-select/tree-select.component.ts Restores focus to the search input after ArrowLeft/ArrowRight can move active option focus.
packages/components/tree-select/tree-select.component.spec.ts Adds regression coverage ensuring caret remains in the search field after ArrowLeft/ArrowRight.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +769 to +773
const options = this.renderedOptions.toArray();

let level = activeOption.level;

for (let index = options.indexOf(activeOption) - 1; index >= 0; index--) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants