-
Notifications
You must be signed in to change notification settings - Fork 7
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
CPLAT-10515 Preserve consumed props behavior defaults #89
Conversation
…d are a pain to update
…enience" Reverted because some tests' formatting depends on certain whitespace existing in the input. This reverts commit 33f1636.
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
@@ -387,7 +414,6 @@ void advancedPropsAndStateClassMigratorTestHelper({ | |||
'ADifferentPropsClass': 'ADifferentPropsClassMixin', | |||
}, | |||
)( | |||
expectedPatchCount: 6, |
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 removed most of the expectedPatchCount
assertions in this file, since they don't provide much value (patches are already tested via expectedOutput
) and are a pain to update.
I left the ones where the value was 0
/1`.
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.
+1
lib/src/boilerplate_suggestors/advanced_props_and_state_class_migrator.dart
Show resolved
Hide resolved
lib/src/boilerplate_suggestors/advanced_props_and_state_class_migrator.dart
Show resolved
Hide resolved
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.
QA+1 codemod ran without issues on web_skin_dart
and wdesk_sdk
@Workiva/release-management-p |
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.
+1 from RM
Motivation
Since over_react's new boilerplate will be consuming all mixed in props by defaults (via Workiva/over_react#485), we need to update the codemod to preserve the same set of consumed props when converting legacy boilerplate.
Changes
1. Update migrators to preserve this behavior via
consumedProps
impl updates:simple_props_and_state_migrator - No changes necessary.
These classes will result in only one props mixin being used, so the default behavior change still results in the single mixin being consumed.
advanced_props_and_state_migrator
Cases:
consumedProps
; do nothingconsumedProps
override that consumes no propsconsumedProps
override that consumes that mixinconsumedProps
override that consumes that mixin and add a fixmeAlso, if any of these extend from a non-base component, add a fixme to ensure that that consumedProps impl shouldn't be inherited instead of overriding it in the base class
2. Update tests, which already had all of these cases covered, to match new behavior
Release Notes
Review
Please review: @aaronlademann-wf @joebingham-wk @sydneyjodon-wk
QA Checklist
Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: