Repository navigation
NXT-21173: Migrated DebounceDecorator and OptimizedFocusDecorator components to functional - #467
Open
daniel-stoian-lgp wants to merge 1 commit into
Open
daniel-stoian-lgp wants to merge 1 commit into
daniel-stoian-lgp wants to merge 1 commit into
Conversation
daniel-stoian-lgp
marked this pull request as ready for review
October 30, 2026 10:13
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #467 +/- ##
===========================================
+ Coverage 83.54% 83.62% +0.07%
===========================================
Files 158 158
Lines 7908 7907 -1
Branches 2446 2442 -4
===========================================
+ Hits 6607 6612 +5
+ Misses 1011 1008 -3
+ Partials 290 287 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Issue Resolved / Feature Added
internal/DebounceDecoratorand theOptimizedFocusDecoratorinPopupTabLayoutwere still class components. The goal is to convert them to functional components.Resolution
Converted
internal/DebounceDecorator/DebounceDecorator.jsandPopupTabLayout/PopupTabLayout.js→OptimizedFocusDecoratorto functional components with hooks. Behavior is unchanged.DebounceDecoratorJobis created once withuseMemoand stopped on unmount.this.propsdid before.handleEventandhandleCancelare wrapped inuseCallbackwith stable dependencies, soTabGroupchildren receive handlers with the same reference on every render.OptimizedFocusDecoratoruseStatelazy initializer instead ofuseMemo, so the React Compiler can still optimize the component (react-hooks/preserve-manual-memoization).useLayoutEffectonopenreplacescomponentDidMountandcomponentDidUpdate, with the same timing. It resumes Spotlight and focuses the container on mount, and focuses it again when the layout reopens.display: nonewhen closed in optimized mode.Additional Considerations
Links
NXT-21173
Comments
Enact-DCO-1.0-Signed-off-by: Daniel Stoian (daniel.stoian@lgepartner.com)