-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
update(ripple): remove deprecated speed factor option #12258
update(ripple): remove deprecated speed factor option #12258
Conversation
@jelbourn I know the update tool needs to be updated to work for v6.x.x to v7.0.0, but in the meanwhile we can still have those rules in the repository. I wasn't sure whether an auto-migration would be desired here, but it was pretty fun to do, so I'm fine removing them if they are not needed. Can also submit in a separate PR to keep this one smaller. |
e47473a
to
336814a
Compare
336814a
to
a3976bb
Compare
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.
Would you be interested in updating the schematics code to be ready for going from v6 to v7? Right now everything under update/
is specifically for v5 -> v6, and it could probably be organized better
[propertyNameReplacement, rightExpressionReplacement]); | ||
} else { | ||
// In case the speed factor is dynamically calculated or passed to the assignment, we just | ||
// print the failure and notify about the breaking change. |
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.
Could you just treat the entire expression as the "value"?
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.
Not sure what you mean with that? Do you say we should just create the actual calculation instead of executing it?
r.speedFactor = mySpeedFactor
// --->
r.animation = {enterDuration: (450 / mySpeedFactor)};
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.
That's pretty much what I was thinking
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.
We can totally do that, but not sure how much that would help with upgrading. That's more like a workaround to just make the upgrade succeed.
My goal with the rules would be to generate code that can actually stay in long-term, and in that specific situation, people should switch their whole (not just the assignment) code-base from speed factor to the new animation config.
I'm fine going any way here. Don't feel strong about this approach either.
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 it's nicer to make the update and add a TODO
rather than fail the update. The ideal scenario with ng update
is that you run it and your app works exactly the same way as before.
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.
That makes sense. I will make the change but cannot guarantee about the TODO
because it's not clear how the actual assignment is placed in the file. If that won't work, I will either print a message, or just do an inline TODO.
e.g. r.animation = /** TODO: Remove speed factor */ {enterDuration: (450 / mySpeedFactor)};
9f602dd
to
1def6cc
Compare
@jelbourn Sure! I've been having a look on the update tool since yesterday and I'm already trying to clean it up a bit (style-wise for now; linting etc.) We should chat more about this. I'm not sure whether we want to keep the old migration data for example? |
@jelbourn Done. Thanks for the good idea for treating non-analyzable expressions. Now, I think the ripple upgrade is fully covered and it's pretty advanced for something that isn't really that commonly used 😄. Please have another look |
ce824db
to
dd5b5c1
Compare
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.
LGTM
dd5b5c1
to
9c7986b
Compare
Hi @devversion! This PR has merge conflicts due to recent upstream merges. |
* Removes the deprecated `[matRippleSpeedFactor]` and global `baseSpeedFactor` option. * Adds update rules that can automatically switch to the new API (as much as possible) and even calculate the new durations based on the previously specified speed factor. BREAKING CHANGE: deprecated `[matRippleSpeedFactor]` and `baseSpeedFactor` for the ripples have been removed. Use the new animation config instead.
… for rule version constraints
9c7986b
to
1d8e392
Compare
* update(ripple): remove deprecated speed factor option. * Removes the deprecated `[matRippleSpeedFactor]` and global `baseSpeedFactor` option. * Adds update rules that can automatically switch to the new API (as much as possible) and even calculate the new durations based on the previously specified speed factor. BREAKING CHANGE: deprecated `[matRippleSpeedFactor]` and `baseSpeedFactor` for the ripples have been removed. Use the new animation config instead. * Add test case; fix NodeJS version target circular dependency; Support for rule version constraints
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
[matRippleSpeedFactor]
and globalbaseSpeedFactor
option.BREAKING CHANGE: deprecated
[matRippleSpeedFactor]
andbaseSpeedFactor
for the ripples have been removed. Use the new animation config instead.