Skip to content

NXT-10275: Added support for prerendering Popup/PopupTabLayout - #385

Open
daniel-stoian-lgp wants to merge 10 commits into
developfrom
feature/NXT-10275
Open

NXT-10275: Added support for prerendering Popup/PopupTabLayout#385
daniel-stoian-lgp wants to merge 10 commits into
developfrom
feature/NXT-10275

Conversation

@daniel-stoian-lgp

@daniel-stoian-lgp daniel-stoian-lgp commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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

Builds on the Enact ui/FloatingLayer prerender change to make the Popup family (specifically PopupTabLayout) renderable during a prerender pass. The first render needed two phases before, so the popup was missing from prerendered HTML (WRQ-28907).

Depends on the Enact PR enactjs/enact#3437 (ui/FloatingLayer prerender prop). Merge/publish that first.

Resolution

Popup: accept and forward prerender to FloatingLayer. Also fixes spotlight focus on a prerendered launch: with prerender, the content mounts inline before the tab layout's spotlight config is ready, so the early mount-effect spot landed on the wrong element (panel content) and was restored after relocation. The early spot is now skipped for the prerender path, so focus lands via onOpen after relocation.
PopupTabLayout: route prerender through to Popup (stripped in optimized mode).
TabLayout/RefocusDecorator: guard the orientation initializer with isWindowReady() so it doesn't read window during the prerender pass (previously threw ReferenceError: window is not defined, blocking both the prerender and optimized paths).
Tests: added unit tests and ui tests for prerender scenario
Sample: samples/qa-popuptablayout-prerender demonstrating a 4-tab PopupTabLayout prerendered on launch.

Additional Considerations

Links

NXT-10275

Comments

Enact-DCO-1.0-Signed-off-by: Daniel Stoian (daniel.stoian@lgepartner.com)

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.67%. Comparing base (eeb8437) to head (44e2fcf).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #385      +/-   ##
===========================================
+ Coverage    82.54%   82.67%   +0.13%     
===========================================
  Files          153      153              
  Lines         7579     7580       +1     
  Branches      2298     2298              
===========================================
+ Hits          6256     6267      +11     
+ Misses        1029     1021       -8     
+ Partials       294      292       -2     

☔ View full report in Codecov by Harness.
📢 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.

@alexandrumorariu alexandrumorariu 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.

Do not forget to change the branch back to develop for ci-reusable.yml before merge.

@alexandrumorariu alexandrumorariu 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.

LGTM

@daniel-stoian-lgp daniel-stoian-lgp changed the title NXT-10275 NXT-10275: Added support for prerendering PopupTabLayout Jun 29, 2026
@daniel-stoian-lgp daniel-stoian-lgp changed the title NXT-10275: Added support for prerendering PopupTabLayout NXT-10275: Added support for prerendering Popup/PopupTabLayout Jun 29, 2026
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