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

Contextual modifiers and helpers not supported? #1018

Closed
simonihmig opened this issue Nov 12, 2021 · 9 comments
Closed

Contextual modifiers and helpers not supported? #1018

simonihmig opened this issue Nov 12, 2021 · 9 comments

Comments

@simonihmig
Copy link
Collaborator

Ember 3.27 introduced the (modifier) and (helper) helper counterparts to (component). Using (modifier) in an addon to yield a contextual modifier works in non-Embroider and the "safe" scenario, but fails in "optimized" mode with Missing helper: modifier.

It seems this new feature is not properly supported yet? I guess we need similar special treatment for these as we have for the component helper?

@ef4
Copy link
Contributor

ef4 commented Nov 12, 2021

Yes, we need to make them work almost exactly the same as the component helper, just resolving to slightly different paths.

Along with this we also still need a staticModifiers mode. None of it is very different from staticHelpers and staticComponents.

@simonihmig
Copy link
Collaborator Author

Yes, we need to make them work almost exactly the same as the component helper, just resolving to slightly different paths.

Thanks for confirming!

Along with this we also still need a staticModifiers mode. None of it is very different from staticHelpers and staticComponents.

Yup, I raised this already here: #603 🙂

Maybe I can find some time for this, but no promises...

@rahulk94
Copy link

rahulk94 commented Dec 8, 2021

Looks like this has been added now so we can close this now?

@ef4 ef4 closed this as completed Dec 8, 2021
@Windvis
Copy link
Collaborator

Windvis commented Dec 9, 2021

AFAIK this hasn't been implemented yet? The PR which is referenced here only added the staticModifiers option.

I can give it a try this weekend if someone else hasn't by then.

@simonihmig
Copy link
Collaborator Author

I think you are right, so I reopened this issue!

@simonihmig simonihmig reopened this Dec 9, 2021
@rahulk94
Copy link

rahulk94 commented Dec 9, 2021

Woops my bad 🤦🏾‍♂️ sorry team

@Windvis
Copy link
Collaborator

Windvis commented Dec 22, 2021

@ef4 Forgive my ignorance but do we also need to add ensureSafeHelper and ensureSafeModifier utils to fully support these helpers?

@ef4
Copy link
Contributor

ef4 commented Dec 22, 2021

I think "no", because I'm pretty sure the newly added helper-helper and modifier-helper never accepted dynamic values. They only accept string literals.

So it's not possible to write a component that accepts a helper as an argument "the wrong way", by accepting the string name of the helper, rather than the helper itself.

@Windvis
Copy link
Collaborator

Windvis commented Mar 7, 2022

As of the 1.4.0 release both these helpers should now be fully supported. 🎉

@Windvis Windvis closed this as completed Mar 7, 2022
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

No branches or pull requests

4 participants