Skip to content

refactor(dom): restore currentTarget in slot utils#12477

Merged
jcfranco merged 3 commits intodevfrom
jcfranco/update-slotted-utils-to-use-current-target
Jul 11, 2025
Merged

refactor(dom): restore currentTarget in slot utils#12477
jcfranco merged 3 commits intodevfrom
jcfranco/update-slotted-utils-to-use-current-target

Conversation

@jcfranco
Copy link
Copy Markdown
Member

@jcfranco jcfranco commented Jul 9, 2025

Related Issue: N/A

Summary

Restores currentTarget usage in slot utils introduced in #9768, which was unintentionally removed by https://github.com/Esri/calcite-design-system/pull/9374/files#diff-289d1884a42555c239e4e403d4ea7d10b281307f0eeda6da7e9c573c9bcaffc7.

Depending on the slot structure, target will not be the expected slot (see https://codepen.io/jcfranco/pen/WbQegmz).

Noteworthy changes

  • converted dom util test suite to browser-mode spec test
  • updated getStylePixelValue logic to avoid precision errors causing test failure
  • update slotChangeGetAssignedElements and slotChangeGetAssignedNodes tests to use browser - other utils should follow suit

@github-actions github-actions bot added the refactor Issues tied to code that needs to be significantly reworked. label Jul 9, 2025
@jcfranco jcfranco added the skip visual snapshots Pull requests that do not need visual regression testing. label Jul 9, 2025
@jcfranco jcfranco marked this pull request as draft July 9, 2025 07:45
@jcfranco jcfranco marked this pull request as ready for review July 9, 2025 18:53
Copy link
Copy Markdown
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Any way we can add a test for this so it doesn't get changed again?

@jcfranco jcfranco requested a review from driskull July 11, 2025 05:59
@jcfranco
Copy link
Copy Markdown
Member Author

@driskull Test suite updated! Could you take another look?

Copy link
Copy Markdown
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@jcfranco jcfranco merged commit 44edbd1 into dev Jul 11, 2025
12 of 14 checks passed
@jcfranco jcfranco deleted the jcfranco/update-slotted-utils-to-use-current-target branch July 11, 2025 23:25
@github-actions github-actions bot added this to the 2025-07-29 - Jul Milestone milestone Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Issues tied to code that needs to be significantly reworked. skip visual snapshots Pull requests that do not need visual regression testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants