-
Notifications
You must be signed in to change notification settings - Fork 28.8k
resolved the issue of indeterminate CircularProgressIndicator.adaptive on Darwin #140947
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
Conversation
resolved issue of cicularactivityindicator
Update progress_indicator.dart
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
please review my code |
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.
Code looks good to me, with a small nit. This will need a test however. Probably one that gives a CircularProgressIndicator.adaptive
a value, then checks to see if a CupertinoActivityIndicator
is rendered with the expected value.
} | ||
|
||
return CupertinoActivityIndicator.partiallyRevealed( | ||
key: widget.key, color: tickColor, progress: val); |
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.
Formatting nit: move each property to a new line since this line is already long:
return CupertinoActivityIndicator.partiallyRevealed(
key: widget.key,
color: tickColor,
progress: val
);
nit changes
@MitchellGoodwin, sir please check now i have made the necessary changes and all test cases have passed |
} | ||
|
||
return CupertinoActivityIndicator.partiallyRevealed( | ||
key: widget.key, |
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.
Nit: this has an extra indent that should be removed.
Per our policy on test coverage, this change still needs a test added to it. Could you please add one? It just needs to check if |
yes i will add the test guide me |
i have tried a code for testing here it is: void main() {
}); |
The test should be added in |
@MitchellGoodwin, sir i have updated the test case as at first it was unable to extract the value hence i have taken the return type so that it don't get lost and all test cases have been passed, please review my code |
@MitchellGoodwin Sir, please have a look |
tester.widget<CircularProgressIndicator>( | ||
find.byType(CircularProgressIndicator)).value, | ||
0.5, | ||
); |
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 test should be left alone. Instead, it would be better to add a new one. So you can copy the existing test as it was and put it below, then change it to look for the adaptive value logic. This makes it so that if either test fails in the future it will be easier to see what logic is broken.
Also, it would be better to try and get the value of progress
of CupertinoActivityIndicator
to check that the adaptive logic is working.
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.
Sir i got the first part, but i am confused with the last part, you are saying that it should test on the value provided by the user not the default value that i have set to 0.5, am I right ?
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.
You should test that if CircularProgressIndicator.adaptive
is given a value
of something, in this case 0.5, then a CupertinoActivityIndicator
is rendered with a progress
of 0.5.
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.
Code looks good to me. Thank you for righting the test. I just have some formatting nits.
}, | ||
variant: const TargetPlatformVariant(<TargetPlatform> { | ||
TargetPlatform.iOS, | ||
TargetPlatform.macOS, | ||
}), | ||
); |
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.
Nit: tab these lines to the left.
Co-authored-by: Mitchell Goodwin <58190796+MitchellGoodwin@users.noreply.github.com>
I updated the PR description with a link to the original issue, and put the checklist. I checked off what I could see was done. Check the top three if you've read those resources. If not, I would encourage you to look over them. This PR does not need documentation, so that can be left blank. |
Yes sir, I have checked the top three resources, and i have read them, now i have understood the significance of trailing spaces, Thankyou Sir. |
Sir, any suggestions for me its my first PR which is going to merge and i haven't entered the software industry yet i am trying to get a job |
Sir, please review my code |
I have two outstanding nits. Address those and this will be done, I think. |
@nikkivirtuoso thank you so much for your contribution! But please refrain from pinging your PR, @MitchellGoodwin is in the process of reviewing it and has many things to do, in addition to reviewing this. Our contribution guide says:
So if it's been more than a week, please reach out! Thanks again! |
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. Thank you for responding to all my feedback. The next step is to get a second approval. I'll ask around to see if I can get someone to take a look.
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 with some nits. Thanks a lot for the contribution:)!
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.
Thanks for fixing this bug! LGTM with some small style changes below.
@@ -705,7 +705,18 @@ class _CircularProgressIndicatorState extends State<CircularProgressIndicator> w | |||
|
|||
Widget _buildCupertinoIndicator(BuildContext context) { | |||
final Color? tickColor = widget.backgroundColor; | |||
return CupertinoActivityIndicator(key: widget.key, color: tickColor); | |||
final double? val = widget.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.
val
should be value
per the styleguide: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-abbreviations
Or just use the full widget.value
directly.
home: const Scaffold( | ||
body: Material( | ||
child: CircularProgressIndicator.adaptive( | ||
value:0.5, |
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.
Space after the colon here.
final double actualProgress =tester.widget<CupertinoActivityIndicator>( | ||
find.byType(CupertinoActivityIndicator)).progress; |
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.
final double actualProgress = tester.widget<CupertinoActivityIndicator>(
find.byType(CupertinoActivityIndicator),
).progress;
Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
Thank you for the guidance! I appreciate your consideration and will refrain from further pings. I'll patiently wait for the review and, if needed, will follow up after a week. Thanks for your time and support! |
….adaptive on Darwin (flutter/flutter#140947)
flutter/flutter@126302d...b840a60 2024-01-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3269fd84460d to b361a60ae224 (1 revision) (flutter/flutter#141271) 2024-01-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from a5d446da5495 to 3269fd84460d (1 revision) (flutter/flutter#141264) 2024-01-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3ccf66bed335 to a5d446da5495 (2 revisions) (flutter/flutter#141252) 2024-01-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from e57e418c02ae to 3ccf66bed335 (1 revision) (flutter/flutter#141241) 2024-01-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7e6f3d847e01 to e57e418c02ae (1 revision) (flutter/flutter#141240) 2024-01-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1cf2e0a603c7 to 7e6f3d847e01 (1 revision) (flutter/flutter#141237) 2024-01-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 32bbf8be8d2c to 1cf2e0a603c7 (1 revision) (flutter/flutter#141232) 2024-01-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5b9d2132b7cd to 32bbf8be8d2c (1 revision) (flutter/flutter#141229) 2024-01-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 941f268fc8bb to 5b9d2132b7cd (1 revision) (flutter/flutter#141228) 2024-01-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 542fea9edae4 to 941f268fc8bb (3 revisions) (flutter/flutter#141224) 2024-01-10 Michal-MK@users.noreply.github.com `NestedScrollView`'s outer scrollable jumping with `BouncingScrollPhysics` due to `double` precision errors (flutter/flutter#138319) 2024-01-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8c1501f3956d to 542fea9edae4 (1 revision) (flutter/flutter#141217) 2024-01-10 polinach@google.com Fix or except leaks. (flutter/flutter#141081) 2024-01-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 693af0c699c5 to 8c1501f3956d (1 revision) (flutter/flutter#141215) 2024-01-09 cbobbe@zulip.com TextStyle: In copyWith, stop ignoring debugLabel when receiver has none (flutter/flutter#141141) 2024-01-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from a35e3b026e1d to 693af0c699c5 (5 revisions) (flutter/flutter#141209) 2024-01-09 stuartmorgan@google.com Replace deprecated `exists` in podhelper.rb (flutter/flutter#141169) 2024-01-09 kevmoo@users.noreply.github.com Correctly handle null case in ProcessText.queryTextActions (flutter/flutter#141205) 2024-01-09 polinach@google.com Add environment variable to leak tracking bots. (flutter/flutter#141137) 2024-01-09 goderbauer@google.com Reapply "Dynamic view sizing" (#140165) (flutter/flutter#140918) 2024-01-09 89970141+SharbelOkzan@users.noreply.github.com Introduce new Form validation method (flutter/flutter#135578) 2024-01-09 tessertaha@gmail.com Update `RouteObserver` example and fix an error thrown (flutter/flutter#141166) 2024-01-09 polinach@google.com Upgrade leak_tracker. (flutter/flutter#141153) 2024-01-09 chillers@google.com [ci.yaml] Do not run packaging test on presubmit (flutter/flutter#141192) 2024-01-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 036b39fa47fa to a35e3b026e1d (6 revisions) (flutter/flutter#141191) 2024-01-09 15619084+vashworth@users.noreply.github.com Run tests on iOS 16 or iOS 17 (flutter/flutter#141178) 2024-01-09 polinach@google.com Remove conditions that depend on order. (flutter/flutter#141183) 2024-01-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from b3c8597df0e2 to 036b39fa47fa (1 revision) (flutter/flutter#141179) 2024-01-09 148634283+nikkivirtuoso@users.noreply.github.com resolved the issue of indeterminate CircularProgressIndicator.adaptive on Darwin (flutter/flutter#140947) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC camillesimon@google.com,rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Fixes #140574
Passes the value from
CircularProgressIndicator
to the Cupertino version so that functionality is not lost on Apple devices.Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.