Skip to content

UI: Use correct selector for addon panel focus check#34164

Merged
Sidnioulz merged 2 commits intonextfrom
sidnioulz/10-3-fix-focus-in-addon-panel-root
Mar 17, 2026
Merged

UI: Use correct selector for addon panel focus check#34164
Sidnioulz merged 2 commits intonextfrom
sidnioulz/10-3-fix-focus-in-addon-panel-root

Conversation

@Sidnioulz
Copy link
Copy Markdown
Member

@Sidnioulz Sidnioulz commented Mar 16, 2026

10.3 QA - Keyboard focus lost when closing the addon panel via shortcuts

If you end up opening the addon panel through keyboard shortcuts, then close it via shortcuts, the keyboard focus is lost.

This is because the focus containment check targeted an element within the addon panel region instead of the whole region, which receives focus when opening the panel with the button.

Summary by CodeRabbit

  • Refactor

    • Improved internal focus-detection logic used by keyboard shortcuts and panel/navigation toggles to reduce duplication and simplify maintenance. No changes to visible behavior.
  • Chores

    • Internal code streamlined; no user-facing changes or API alterations.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Mar 16, 2026

View your CI Pipeline Execution ↗ for commit 8e90c6e

Command Status Duration Result
nx run-many -t compile -c production --parallel=1 ✅ Succeeded 6m 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-17 13:14:55 UTC

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fa693568-e70c-48df-b68d-2a7b27b05369

📥 Commits

Reviewing files that changed from the base of the PR and between 5d75f46 and 8e90c6e.

📒 Files selected for processing (1)
  • code/core/src/manager-api/modules/shortcuts.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • code/core/src/manager-api/modules/shortcuts.ts

📝 Walkthrough

Walkthrough

Introduces an internal helper wasFocusInElement(element) and refactors focus-detection in shortcuts: panel element lookup now uses addonPanel (replacing storyPanelRoot) and both panel and sidebar focus checks call the new helper; control flow behavior is unchanged.

Changes

Cohort / File(s) Summary
Focus detection & toggle flows
code/core/src/manager-api/modules/shortcuts.ts
Adds wasFocusInElement() helper; replaces direct focus containment checks with the helper for panel and sidebar branches; derives panelElement from addonPanel instead of storyPanelRoot; no change to overall control flow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sidnioulz Sidnioulz added the upgrade:10.3 Issues/PRs found during 10.3 upgrade QA and post-release regressions label Mar 16, 2026
@Sidnioulz Sidnioulz force-pushed the sidnioulz/10-3-fix-focus-in-addon-panel-root branch from 5d75f46 to c22afbb Compare March 17, 2026 12:59
@Sidnioulz Sidnioulz merged commit 985382c into next Mar 17, 2026
125 of 128 checks passed
@Sidnioulz Sidnioulz deleted the sidnioulz/10-3-fix-focus-in-addon-panel-root branch March 17, 2026 16:03
@github-actions github-actions Bot mentioned this pull request Mar 17, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug ci:normal upgrade:10.3 Issues/PRs found during 10.3 upgrade QA and post-release regressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants