-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add dependentKeyCompat to isValid/isInvalid #509
Conversation
Aha! Are there any other places that this needs to be added? |
That is a good question. Added |
Trying to get a release out. npm is giving me a 404... |
Super cool! Thanks for digging into it @snewcomer. I already refactored my code into native getters, but I’ll try out reverting that tomorrow and see if it works again! |
|
Doesn't seem like this worked for me 😦 I updated the PR I'm working on to If I log out the property defined using However, what would be correct for this test -- and what happens with the native getters -- is three updates. Initial computation when there are no errors, an update when one becomes invalid, and then another update when it becomes valid again This is the relevant code from our app -- one computed property that generates changesets from an argument, and then another that is a filtered sub-set of those changesets @map('deps', function (dependency) {
return new Changeset(
dependency,
lookupValidator(this.dependencyValidations),
this.dependencyValidations
);
})
dependencyChangesets;
@filterBy('dependencyChangesets', 'isInvalid', true) dependenciesWithErrors; It's really interesting me that |
Sad :(. There are a lot of moving parts. We probably reached the boundary of what we can do in the These macro decorators may help for certain situations to get one off of these computed property macros. |
I'm sorry to hear that... I'm trying to get my app upgraded to Ember 3.13+ and ran into issues with |
Seems like we need to get an Ember core team person involved here. According to the docs this should work |
Just for my own sanity, I added a failing test to Talking briefly to @pzuraq on Discord, it seems like adding Where the base class also defines these: Chris's recommendation was to create a wrapper class that handles the "tracked" behavior, which I'm playing with locally right now. |
If that is what we need, then happy to accept a PR!! |
Cool -- I'm going to see if I can break apart my Ember 3.13+ upgrade from the |
@snewcomer |
@arenoir Just to stress test it, does it work without the computed macro? |
No it doesn't work with any computed properties. I added a couple more computed property tests. |
"Without" I meant to be just plain getters... |
I accidentally (@)mentioned you. I meant to ask @alexlafroscia on his progress with wrapping the tracked properties. As it stands now a Changeset does not work with computed properties. I created a separate issue and a test demonstrating it. |
I didn't end up getting into it -- our codebase is still using the older release of |
close #455
https://api.emberjs.com/ember/3.15/functions/@ember%2Fobject%2Fcompat/dependentKeyCompat