Skip to content
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

Fix logical error in TimePickerDialog - the RenderObject forgets to update fields #112040

Merged
merged 1 commit into from Oct 27, 2022

Conversation

fzyzcjy
Copy link
Contributor

@fzyzcjy fzyzcjy commented Sep 21, 2022

Close #112038. Please see description there.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels. labels Sep 21, 2022
@flutter-dashboard
Copy link

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 Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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.

@fzyzcjy fzyzcjy changed the title Fix logical error in TimePickerDialog - the RenderObject forgets to update 2 fields Fix logical error in TimePickerDialog - the RenderObject forgets to update fields Sep 21, 2022
Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Hixie
Copy link
Contributor

Hixie commented Sep 22, 2022

would be good to have a test for this.

@jonahwilliams
Copy link
Member

Ahh my bad, I should have asked for a test for this one

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Sep 22, 2022

@Hixie I have tried but failed, that is why this one has no tests though others have :/ It is so deep that it is hard to construct a test, without relaxing the code visibility of the widget/renderobjects.

(I forget to ask for a test-preempt as well)

@xu-baolin xu-baolin mentioned this pull request Sep 29, 2022
@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Oct 10, 2022

@Hixie So shall I relax the code visibility of the widgets and render objects (i.e. change from private to public) in order to have a test? If so I will add it.

@Hixie
Copy link
Contributor

Hixie commented Oct 17, 2022

Tests can actually get to the private classes, they just can't use the private class name. You can cast the render object to dynamic and can call things on it blindly.

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Oct 17, 2022

@Hixie Thanks, but the problem is I cannot construct a _CupertinoDialogRenderWidget object. All its current usages does not cause this bug (but future usages may do), while this is a logical bug indeed (since by definition updateRenderObject should update the fields).

@Hixie
Copy link
Contributor

Hixie commented Oct 17, 2022

Ah, I see. Yeah, that's unfortunate. Probably fine to skip the test for now then.

test-exempt: not technically changing actual behaviour.

@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 27, 2022
@auto-submit auto-submit bot merged commit d93208a into flutter:master Oct 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RenderObject is not updated when users provide new values
4 participants