-
Notifications
You must be signed in to change notification settings - Fork 58
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
[OLD] FED 2299 Utilize new ReactNode typedef #893
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
257b1b7
to
5e84679
Compare
e65c049
to
5b00b97
Compare
16adf08
to
374ab79
Compare
…99_ReactNode_typedef # Conflicts: # test/mockito.mocks.dart
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.
Just a couple comments, otherwise looks good!
lib/src/component/prop_mixins.dart
Outdated
|
||
/// The children that were passed in to this component when it was built. | ||
List<dynamic>? get children { | ||
List<ReactNode>? get children { |
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.
Unfortunately this is a breaking change, since consumers will no longer be able to dynamically invoke methods on children (which they probably shouldn't be doing, and instead using proper type checks).
And I think it might mess up implicit casting in some cases too, not 100% sure.
I'd just be surprised if there aren't some usages out there that would be broken.
So, I'd say either we revert this change, or if we really wanted to, perhaps we could do some consumer static analysis testing to see if it affects anything.
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.
Kicked off a static analysis check
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.
The check did not do well. I'll revert this.
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.
@@ -67,11 +67,11 @@ mixin SuspensePropsMixin on UiProps { | |||
/// The actual UI you intend to render. If children suspends while rendering, the Suspense boundary will | |||
/// switch to rendering fallback. | |||
@override | |||
/*ReactNode*/ List<dynamic>? get children; | |||
List<ReactNode>? get children; |
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.
Similar to above, the changes to props in this component are technically breaking changes, but I think we could get away with these in particular since, by comparison, there should be almost no components that read the children/fallback props from this props mixin.
…99_ReactNode_typedef # Conflicts: # pubspec.yaml
908bfdf
to
e258dac
Compare
e258dac
to
c5119ff
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.
+10
Rosie is not picking up the build even after closing/re-opening. Closing in favor of a new PR |
Motivation
Workiva/react-dart#384 adds a new typedef that is an alias for
Object?
. We should use it!Changes
Use it where appropriate
Release Notes
Review
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review:
QA Checklist
Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: