Skip to content

Conversation

@daniel-stoian-lgp
Copy link
Contributor

@daniel-stoian-lgp daniel-stoian-lgp commented Nov 5, 2025

Checklist

  • I have read and understand the contribution guide
  • A CHANGELOG entry is included
  • At least one test case is included for this feature or bug fix
  • Documentation was added or is not needed
  • This is an API breaking change

Issue Resolved / Feature Added

Resolution

  • Adapted spotlight navigation when the target item is not on the screen.
  • lastFocusedElement can be stored by its spotlightID and can be searched by spotlightID when trying to restore focus
  • tryRestoreLastFocusedElement Attempts to restore focus to an element via container's restoration callback. Otherwise it will not skip focus restoration
  • target.js - just restores code that was removed in NXT-2629: Fixed spotlight navigation on page load #3360

Additional Considerations

Links

NXT-3269

Comments

Enact-DCO-1.0-Signed-off-by: Daniel Stoian ([email protected])

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 49.15254% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.63%. Comparing base (3e67908) to head (e7379bb).

Files with missing lines Patch % Lines
packages/spotlight/src/container.js 46.80% 18 Missing and 7 partials ⚠️
packages/spotlight/src/spotlight.js 0.00% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3365      +/-   ##
===========================================
+ Coverage    82.54%   82.63%   +0.09%     
===========================================
  Files          153      153              
  Lines         7154     7209      +55     
  Branches      1892     1913      +21     
===========================================
+ Hits          5905     5957      +52     
- Misses         980      982       +2     
- Partials       269      270       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants