NXT-20290: ContextualPopupDecorator: Fixed hole punch scrim to reposition with the popup when the wrapped component is updated - #433
Open
bongsok wants to merge 1 commit into
Conversation
6 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/1.11.x.develop #433 +/- ##
=========================================================
Coverage ? 82.74%
=========================================================
Files ? 153
Lines ? 7634
Branches ? 2322
=========================================================
Hits ? 6317
Misses ? 1023
Partials ? 294 ☔ 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-1.11.x
branch
from
September 14, 2026 09:30
7a3d8a0 to
806fe58
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 #426 (NXT-19858). That change 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-20290 (follow-up to #426)
Comments
Targets
release/1.11.x.develop. An equivalent PR is opened againstdevelop.