-
Notifications
You must be signed in to change notification settings - Fork 29.8k
(insert|move|remove)ChildRenderObject Deprecation: Step 1 #64189
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
This deprecates the following methods: * RenderObjectElement.insertChildRenderObject * RenderObjectElement.moveChildRenderObject * RenderObjectElement.removeChildRenderObject And replace them with the following methods: * RenderObjectElement.insertRenderObjectChild * RenderObjectElement.moveRenderObjectChild * RenderObjectElement.removeRenderObjectChild The reason for the deprecation is to provide the `oldSlot` argument to the [moveRenderObjectChild] method (such an argument was missing from the now-deprecated [moveChildRenderObject] method) and the `slot` argument to the [removeRenderObjectChild] method (such an argument was missing from the now-deprecated [removeChildRenderObject] method). While no argument was added to [insertRenderObjectChild], the name change (and corresponding deprecation) was made to maintain naming parity with the other two methods. This initial step does not update or remove any of the `slotToChild` patterns that exist in the framework. This work is being separated into two commits in case something needs to be reverted to minimize the scope of each commit. See #63269 for more info
Hixie
left a comment
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.
goderbauer
left a comment
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 once all checks pass.
|
This is a breaking change. Internal chart library compilation is failing with: We need to soft land this internally and come up with a breaking change document. |
|
Soft land step is cl/327627478, and re-application of this PR is #64254 |
|
Technically, because of the google3 breakage this is a breaking change now per https://github.com/flutter/flutter/wiki/Tree-hygiene#1-determine-if-your-change-is-a-breaking-change. Maybe we should publish a quick migration guide for it on https://flutter.dev/docs/release/breaking-changes. |
) * (insert|move|remove)ChildRenderObject Deprecation: Step 1 This deprecates the following methods: * RenderObjectElement.insertChildRenderObject * RenderObjectElement.moveChildRenderObject * RenderObjectElement.removeChildRenderObject ...and replaces them with the following methods: * RenderObjectElement.insertRenderObjectChild * RenderObjectElement.moveRenderObjectChild * RenderObjectElement.removeRenderObjectChild The reason for the deprecation is to provide the `oldSlot` argument to the `moveRenderObjectChild` method (such an argument was missing from the now-deprecated `moveChildRenderObject` method) and the `slot` argument to the `removeRenderObjectChild` method (such an argument was missing from the now-deprecated `removeChildRenderObject` method). While no argument was added to `insertRenderObjectChild`, the name change (and corresponding deprecation) was made to maintain naming parity with the other two methods. This initial step does not update or remove any of the `slotToChild` patterns that exist in the framework. This work is being separated into two commits in case something needs to be reverted to minimize the scope of each commit. See flutter#63269 for more info
…utter#64189)" (flutter#64249) This reverts commit 21cfed3.
…lutter#64189)" (flutter#64254) This reverts commit ce40de6. (this re-applies flutter#64189 by reverting flutter#64249)
) * (insert|move|remove)ChildRenderObject Deprecation: Step 1 This deprecates the following methods: * RenderObjectElement.insertChildRenderObject * RenderObjectElement.moveChildRenderObject * RenderObjectElement.removeChildRenderObject ...and replaces them with the following methods: * RenderObjectElement.insertRenderObjectChild * RenderObjectElement.moveRenderObjectChild * RenderObjectElement.removeRenderObjectChild The reason for the deprecation is to provide the `oldSlot` argument to the `moveRenderObjectChild` method (such an argument was missing from the now-deprecated `moveChildRenderObject` method) and the `slot` argument to the `removeRenderObjectChild` method (such an argument was missing from the now-deprecated `removeChildRenderObject` method). While no argument was added to `insertRenderObjectChild`, the name change (and corresponding deprecation) was made to maintain naming parity with the other two methods. This initial step does not update or remove any of the `slotToChild` patterns that exist in the framework. This work is being separated into two commits in case something needs to be reverted to minimize the scope of each commit. See flutter#63269 for more info
…utter#64189)" (flutter#64249) This reverts commit 21cfed3.
…lutter#64189)" (flutter#64254) This reverts commit ce40de6. (this re-applies flutter#64189 by reverting flutter#64249)
Description
This deprecates the following methods:
... and replaces them with the following methods:
The reason for the deprecation is to provide the
oldSlotargument tothe
moveRenderObjectChildmethod (such an argument was missing fromthe now-deprecated
moveChildRenderObjectmethod) and theslotargument to the
removeRenderObjectChildmethod (such an argument wasmissing from the now-deprecated
removeChildRenderObjectmethod). Whileno argument was added to
insertRenderObjectChild, the name change (andcorresponding deprecation) was made to maintain naming parity with the
other two methods.
This initial step does not update or remove any of the
slotToChildpatterns that exist in the framework. This work is being separated
into two commits in case something needs to be reverted to minimize
the scope of each commit.
Related Issues
See #63269 for more info
Tests
I added the following tests:
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read [Handling breaking changes].