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

Replace the contentFor hook with a component #258

Closed
Tracked by #358
Windvis opened this issue May 13, 2022 · 1 comment · Fixed by #361
Closed
Tracked by #358

Replace the contentFor hook with a component #258

Windvis opened this issue May 13, 2022 · 1 comment · Fixed by #361
Milestone

Comments

@Windvis
Copy link
Contributor

Windvis commented May 13, 2022

At the moment the addon adds an element to the final html file through a contentFor hook.

While it's nice to provide a "no config" setup, it has the downside that apps not using that index.html file won't be able to use the modal components. This is a common issue in the rdfa-editor addons since the editor gets embedded in other applications.

Another downside is that addons pushing content in the final html file isn't a thing for v2 addons and most likely won't ever be.

An alternative would be to create a AuWormhole or AuModalContainer or similar component that will be used as the target.

We could do this in a non-breaking way by deprecating the contentFor hook logic and read a temporary build-time only flag that can be set by apps to silence the deprecation. The deprecation message and contentFor hook logic can then be removed in the v2 release.

@Windvis
Copy link
Contributor Author

Windvis commented Aug 17, 2022

This isn't blocking for Ember v4 support, so we can probably postpone the removal to v3 and add a deprecation for it first.

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

Successfully merging a pull request may close this issue.

1 participant