NXT-19858: ContextualPopupDecorator: Fixed hole punch scrim to reposition with the popup when the wrapped component is updated - #434
Open
bongsok wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #434 +/- ##
===========================================
+ Coverage 83.24% 83.29% +0.05%
===========================================
Files 155 155
Lines 7824 7832 +8
Branches 2413 2417 +4
===========================================
+ Hits 6513 6524 +11
+ Misses 1019 1016 -3
Partials 292 292 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…tion with the popup when the wrapped component is updated The holeBounds were measured once in an effect keyed on the (effectively constant) holepunch flag, so the scrim's hole never followed the popup when it repositioned after a wrapped-component update. Measure holeBounds inside positionContextualPopup from the same rect used to position the popup so the hole stays in sync on every reposition. Enact-DCO-1.0-Signed-off-by: Bongseok Choi (bongseok13.choi@lge.com)
bongsok
force-pushed
the
feature/NXT-19858-holepunch
branch
from
September 14, 2026 09:31
b1371b8 to
2718e14
Compare
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
Follow-up to #425 / #426 (NXT-19858). Those changes restored popup (menu) repositioning when the wrapped/activator component is updated, but the hole punch scrim was not addressed: its hole stayed at the position measured on the initial open and no longer lined up with the popup after a reposition.
The
holeBoundswere measured once in auseEffectkeyed on theholepunchflag (which is effectively constant), sosetHoleBoundsnever ran again when the activator moved or resized — on observer-driven repositions or a wrapped-component update the hole drifted out of alignment.Resolution
holeBoundsare now measured insidepositionContextualPopup, reusing the same activatorgetBoundingClientRect()already taken to position the popup. BecausepositionContextualPopupruns on open, on theResizeObserver/MutationObservercallbacks, and on the reposition effect, the scrim hole now stays in sync with the popup on every reposition. A change guard (functionalsetHoleBoundsupdate) skips the state update when the bounds are unchanged so observer ticks don't cause needless re-renders.Additional Considerations
Added a guard test
should keep the hole punch scrim hole applied when the wrapped component is updatedthat opens withscrimType="holepunch", asserts the scrim's computed--hole-*CSS custom properties are applied, updates the wrapped component, and re-asserts.Verified on this branch:
enact lint --strict— passes (no output)ContextualPopupDecoratorsuite — 28/28 passing, including the new hole punch scrim guard testLinks
NXT-19858 (follow-up to #425 / #426)
Comments
Targets
develop. An equivalent backport PR (#433) is opened againstrelease/1.11.x.develop.