Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RichTooltip/Popover component - hds-register-event modifier [02] #2017

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

didoo
Copy link
Contributor

@didoo didoo commented Mar 21, 2024

📌 Summary

This PR is part of a larger set of PRs: see #2016

It's mainly a porting (with cleanup/refactoring) of #1947

The reason for creating a custom register for DOM event listeners is because the native {{on}} Ember modifier can't be imported directly in the backing class (to apply it conditionally). See emberjs/ember.js#19869 (comment) / emberjs/ember.js#20629. Thanks @fivetanley for putting me on the right track ;)

🛠️ Detailed description

In this PR I have:

  • introduced a custom hds-register-event modifier to assign/remove event listeners to DOM elements
  • added a simple integration test for the modifier
    • I am totally open to ideas of what other tests I could add

🔗 External links

Jira ticket: https://hashicorp.atlassian.net/browse/HDS-3211 (Main task)


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

@didoo didoo requested a review from fivetanley March 21, 2024 12:11
Copy link

vercel bot commented Mar 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Apr 30, 2024 2:18pm
hds-website ✅ Ready (Inspect) Visit Preview Apr 30, 2024 2:18pm

@didoo didoo force-pushed the 02-popover-register-event-modifier branch from 24da3f7 to adb62ab Compare March 25, 2024 15:59
@didoo didoo changed the base branch from 00-popover-feature-branch to 01-popover-float-popover-modifier March 25, 2024 15:59
@didoo didoo force-pushed the 01-popover-float-popover-modifier branch from 6ce1166 to 043b14c Compare March 25, 2024 16:01
@didoo didoo force-pushed the 02-popover-register-event-modifier branch from adb62ab to 68dca8a Compare March 25, 2024 16:30
@didoo didoo force-pushed the 01-popover-float-popover-modifier branch 4 times, most recently from 3b89e87 to 854ab58 Compare March 26, 2024 15:14
@didoo didoo force-pushed the 02-popover-register-event-modifier branch from 68dca8a to a93e5f1 Compare March 26, 2024 15:20
@didoo didoo force-pushed the 01-popover-float-popover-modifier branch from 854ab58 to 2d1a216 Compare March 26, 2024 19:30
@didoo didoo force-pushed the 02-popover-register-event-modifier branch from a93e5f1 to c074144 Compare March 26, 2024 19:31
@didoo didoo force-pushed the 02-popover-register-event-modifier branch from c074144 to d582098 Compare March 26, 2024 19:48
@didoo didoo changed the base branch from 01-popover-float-popover-modifier to main April 30, 2024 14:17
@didoo didoo changed the base branch from main to 01-popover-float-popover-modifier April 30, 2024 14:17
Base automatically changed from 01-popover-float-popover-modifier to main April 30, 2024 15:06
@didoo didoo merged commit 9fe9fcf into main Apr 30, 2024
16 checks passed
@didoo didoo deleted the 02-popover-register-event-modifier branch April 30, 2024 15:07
@didoo
Copy link
Contributor Author

didoo commented Apr 30, 2024

Decided to merge this directly to main to speed up the adoption of the modifier in other components, if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants