-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[ReorderableListView] Add footer
#92086
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
[ReorderableListView] Add footer
#92086
Conversation
darrenaustin
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.
Thanks for the contribution @TahaTesser. Sorry for the delay in reviewing this.
Overall it looks good. I am confused as to why so many people want this feature. It seems odd to me to want a header or footer for a list that scrolls with the items. We don't have these properties on other lists, so having them only on ReorderableListView is inconsistent and complicates the implementation. When we reimplemented the ReorderableListView we had to keep the header as we didn't want to break backwards compatibility. So I guess if we are going to keep that it makes sense to add a footer.
All that said, the code here looks good. Nicely done and thanks for including tests!
I did have a comment about the implementation below. Please let me know what you think.
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 interaction of this new footer with the existing header, padding and reverse settings explodes the code here quite a bit.
I wonder if a simpler way to express this would be to start with the listPadding set to the given padding. Then check to see if the header is present. If it is remove the appropriate side from the listPadding and set the headerPadding accordingly. Then do the same thing for the footer. That way you wouldn't need cases for header only/footer only/both header and footer. They could be handled independently. Not sure that is much simpler, perhaps this is just inherently complicated.
bd0181d to
4952da3
Compare
|
Gold has detected about 1 new digest(s) on patchset 3. |
|
Gold has detected about 1 new digest(s) on patchset 4. |
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. Changes reported for pull request #92086 at sha 930e92de72d1d561c0f4f132c02f11c8580c8871 |
|
@darrenaustin |
|
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
If I understand correctly, the answer to @darrenaustin's question is that the difference between this list and others is that this list is normally re-orderable, whereas sometimes you specifically don't want the headers and footers to be able to change position. |
darrenaustin
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.
930e92d to
2ccd11f
Compare

Fixes #21195
minimal code sample
Screen.Recording.2021-10-19.at.2.38.43.PM.mov
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.