Skip to content

fix(navbar-vertical): focus and active state handling#1512

Open
dauriamarco wants to merge 1 commit intomainfrom
fix/navbar-active-state
Open

fix(navbar-vertical): focus and active state handling#1512
dauriamarco wants to merge 1 commit intomainfrom
fix/navbar-active-state

Conversation

@dauriamarco
Copy link
Member

@dauriamarco dauriamarco commented Feb 12, 2026

Closes #1511.


@dauriamarco dauriamarco self-assigned this Feb 12, 2026
@dauriamarco dauriamarco requested review from a team as code owners February 12, 2026 11:34
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several improvements to focus and active state handling within the vertical navigation bar. The changes to si-navbar-vertical-group-trigger.directive.ts and si-navbar-vertical-group.component.ts correctly manage focus when flyouts are used and update to more modern Angular patterns. The critical issue identified in si-navbar-vertical-item.component.ts regarding the incorrect active state logic for 'action' type items has been retained as it does not contradict any existing rules and is a valid concern. A specific comment with a suggested fix for this issue is included.

@dauriamarco dauriamarco force-pushed the fix/navbar-active-state branch from 4beae6f to 062047d Compare February 12, 2026 11:48
@dauriamarco dauriamarco force-pushed the fix/navbar-active-state branch from 062047d to 1b42630 Compare February 12, 2026 12:23
@github-actions
Copy link

Code Coverage

@github-actions
Copy link

@spike-rabbit
Copy link
Member

I think the focus handling is a general problem of the tooltip. Please have a look at #1517

@dauriamarco
Copy link
Member Author

I think the focus handling is a general problem of the tooltip. Please have a look at #1517

@spike-rabbit Thank you, I like the solution proposed in #1517 👍 but I see it more as an alternative to #1514, which I opened to address more or less the same thing.

Independently of the tooltip itself, the navbar issues still remain, including the incorrect focus behavior. The tooltip was mainly making the problem more visible, because it highlighted that focus was being restored to the wrong element. But even without showing the tooltip, the focus handling in the navbar as well as the active state are still not correct, at least from what I can see.

@dauriamarco dauriamarco added the bug Something isn't working label Feb 13, 2026
@dauriamarco dauriamarco added this to the 49.x milestone Feb 13, 2026
Copy link
Member

@spike-rabbit spike-rabbit left a comment

Choose a reason for hiding this comment

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

The changes around active I understand. But I think the focus handling we can keep as is.

Those changes only have impact when using a mouse, but in those cases we don't really care where the focus is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

navbar-vertical: active/focus state is not updated correctly when switching items

2 participants