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.
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
Element Modifiers #811
Element Modifiers #811
Changes from all commits
2e2344c
8522fa8
b42a021
4e96097
808da75
5491ac5
cd44292
a8254e7
966f8f8
678b523
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if ember-modifier is re-exported from
@ember/modifier
? addingModifier
andmodifier
to the exports from@ember/modifier
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NullVoxPopuli this is meant by "Integrate
ember-modifier
into the@ember/modifier
package directly." in "Alternatives".I can expand that to be more specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, like, I think there are some pretty good ergonomics to that alternative, and I'm curious what others think.
Calling that out is good, I totally forgot about the similar import paths 😅
(good RFC, @SergeAstapov !!! <3)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chriskrycho may know more about the potential downsides of this approach.
From my perspective, this would be logical to have imports like
as it would follow what we do with helpers, where we have imports like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tangent, but I think the
/component/
part of the helper imports is weird 😅There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of the questions I intend to talk through at the Framework core team meeting on Friday! One of the reasons is that there is open design question going forward: should this kind of thing be in
@ember/*
or@glimmer/*
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oo, good point. probably makes more sense for
@glimmer/*
, tbh -- even though ember feels like the place to be only because it feels more maintained. 🙈There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the direction we should go in. ember-modifier's function-based modifiers feel like a stop-gap solution for the default modifier manager and it would be better to simply focus on that RFC instead. It would also be consistent with the already merged "Default helper manager" RFC and is one less thing we would have to import.
I realize adding the
modifier
function would be the modifier equivalent of the already existinghelper
function, but I think that should be deprecated once the default helper manager is shipped 😄.The scope of this RFC could then be reduced to only the class based modifier API of ember-modifier which ideally, as mentioned in the RFC and by others, would be exported from
@glimmer/modifier
or@ember/modifier
.Thanks for writing this RFC ❤️!