Skip to content

Conversation

@goderbauer
Copy link
Member

Migration guide for flutter/flutter#48541.

@googlebot googlebot added the cla: yes Contributor has signed the Contributor License Agreement label Jan 10, 2020
@goderbauer goderbauer requested review from Hixie and dnfield January 10, 2020 21:01

## Context

Prior to this change a ParentDataWidget was bound to a specific RenderObjectWidget type as ancestor.
Copy link
Contributor

Choose a reason for hiding this comment

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

class names should be marked with ``

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@Hixie
Copy link
Contributor

Hixie commented Jan 10, 2020

LGTM, cc @sfshaza2

Prior to this change a `ParentDataWidget` was bound to a specific `RenderObjectWidget` type as
ancestor. For example, a `Positioned` widget could only be used within a `Stack` widget. With this
change, a `ParentDataWidget` can be used with any `RenderObjectWidget` type as ancestor as long as
the `RenderObject` of said R`enderObjectWidget` sets up the correct `ParentData` type. In this new
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo in RenderObjectWidget

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

## Description of change

The generic type argument of `ParentDataWidget` has been changed from `RenderObjectWidget` to
`ParentData` and a new debug property `debugTypicalAncestorWidgetClass` has been added to
Copy link
Contributor

@dnfield dnfield Jan 10, 2020

Choose a reason for hiding this comment

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

ParentData, and

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

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

Overall, looks good! Just a few requested tweaks.

* [TextInputClient currentTextEditingValue]
* [TestTextInput]
* [Scrollable AlertDialog]
* [Generic type of ParentDataWidget changed to ParentData]
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you move this up, so that it's an alphabetical list? I think. :)

Copy link
Member Author

@goderbauer goderbauer Jan 10, 2020

Choose a reason for hiding this comment

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

I did move this up. Although, I am wondering if this list should be in "chronological" order instead. When I look at the list, I am probably only interested in the latest guides ("what requires migration since my last upgrade of Flutter?") and don't want to scroll through the guides that are 25 versions old?

description: The ParentDataWidget is now bound to the ParentData type.
---

# Generic type of `ParentDataWidget` changed to `ParentData`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you pull the latest into your repo? I just landed a PR that updates the template. We don't want a level 1 header, since the website generates that automatically. Instead, I'd like to see a level 2 "Summary" header.


## Context

Prior to this change a `ParentDataWidget` was bound to a specific `RenderObjectWidget` type as
Copy link
Contributor

Choose a reason for hiding this comment

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

THANKS FOR WRITING IN PAST TENSE!!! You are the first one to do that :)

## Description of change

The generic type argument of `ParentDataWidget` has been changed from `RenderObjectWidget` to
`ParentData`, and a new debug property `debugTypicalAncestorWidgetClass` has been added to
Copy link
Contributor

Choose a reason for hiding this comment

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

Add commas before and after debugTypicalAncestorWidgetClass. (And thanks for code fonting!)

## References

API documentation:
* https://api.flutter.dev/flutter/widgets/ParentDataWidget-class.html
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you tweak?

API documentation:
* [`ParentDataWidget`]

Relevant PR:
* [Make ParentDataWidget usable with different ancestor RenderObjectWidget types]

[Make ParentDataWidget usable with different ancestor RenderObjectWidget types]: {{site.github}}/flutter/flutter/pull/48541
[`ParentDataWidget`]: {{site.api}}/flutter/widgets/ParentDataWidget-class.html

@sfshaza2
Copy link
Contributor

Since I just landed a PR for this directory, you'll need to pull in the changes and fix the conflicts. Thanks!

@goderbauer
Copy link
Member Author

Thanks for the review, @Sfshaza. I addressed all comments, PTAL.

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

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

LGTM

@goderbauer goderbauer merged commit 35b91cb into flutter:master Jan 10, 2020
@goderbauer goderbauer deleted the parentdatamigration branch January 10, 2020 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Contributor has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants