-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Deprecate redundant itemExtent in RenderSliverFixedExtentBoxAdaptor methods #143412
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
|
We have been on holiday recently, and will return to work next week! Happy Spring Festival!
…________________________________
来自TT移动邮箱 / From TT mailbox
________________________________
发件人: Kate Lovett ***@***.***>
发送时间: 2024年02月14日 08:00
收件人: flutter/flutter ***@***.***>
抄送: 徐宝林(Ava) ***@***.***>; Review requested ***@***.***>
主题: Re: [flutter/flutter] Deprecate redundant itemExtent in RenderSliverFixedExtentBoxAdaptor methods (PR #143412)
@Piinks<https://github.com/Piinks> requested your review on: #143412<#143412> Deprecate redundant itemExtent in RenderSliverFixedExtentBoxAdaptor methods.
―
Reply to this email directly, view it on GitHub<#143412 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOR66GBV3JUU3PBW6ALXBYDYTP5C3AVCNFSM6AAAAABDHL36IWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRG44TKMZSGE3TKOA>.
You are receiving this because your review was requested.Message ID: ***@***.***>
________________________________
OPPO
本电子邮件及其附件含有OPPO公司的保密信息,仅限于邮件指明的收件人(包含个人及群组)使用。禁止任何人在未经授权的情况下以任何形式使用。如果您错收了本邮件,切勿传播、分发、复制、印刷或使用本邮件之任何部分或其所载之任何内容,并请立即以电子邮件通知发件人并删除本邮件及其附件。
网络通讯固有缺陷可能导致邮件被截留、修改、丢失、破坏或包含计算机病毒等不安全情况,OPPO对此类错误或遗漏而引致之任何损失概不承担责任并保留与本邮件相关之一切权利。
除非明确说明,本邮件及其附件无意作为在任何国家或地区之要约、招揽或承诺,亦无意作为任何交易或合同之正式确认。 发件人、其所属机构或所属机构之关联机构或任何上述机构之股东、董事、高级管理人员、员工或其他任何人(以下称“发件人”或“OPPO”)不因本邮件之误送而放弃其所享之任何权利,亦不对因故意或过失使用该等信息而引发或可能引发的损失承担任何责任。
文化差异披露:因全球文化差异影响,单纯以YES\OK或其他简单词汇的回复并不构成发件人对任何交易或合同之正式确认或接受,请与发件人再次确认以获得明确书面意见。发件人不对任何受文化差异影响而导致故意或错误使用该等信息所造成的任何直接或间接损害承担责任。
This e-mail and its attachments contain confidential information from OPPO, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you are not the intended recipient, please do not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
Electronic communications may contain computer viruses or other defects inherently, may not be accurately and/or timely transmitted to other systems, or may be intercepted, modified ,delayed, deleted or interfered. OPPO shall not be liable for any damages that arise or may arise from such matter and reserves all rights in connection with the email.
Unless expressly stated, this e-mail and its attachments are provided without any warranty, acceptance or promise of any kind in any country or region, nor constitute a formal confirmation or acceptance of any transaction or contract. The sender, together with its affiliates or any shareholder, director, officer, employee or any other person of any such institution (hereinafter referred to as "sender" or "OPPO") does not waive any rights and shall not be liable for any damages that arise or may arise from the intentional or negligent use of such information.
Cultural Differences Disclosure: Due to global cultural differences, any reply with only YES\OK or other simple words does not constitute any confirmation or acceptance of any transaction or contract, please confirm with the sender again to ensure clear opinion in written form. The sender shall not be responsible for any direct or indirect damages resulting from the intentional or misuse of such information.
|
xu-baolin
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.
Looks good to me, but he google test looks unhappy : )
packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart
Outdated
Show resolved
Hide resolved
| ); | ||
| expect(layoutOffset, 6000.0); | ||
| final int minIndex = sliver.getMinChildIndexForScrollOffset( | ||
| sliver.constraints.scrollOffset, |
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.
Using a offset greater than 0 can better test the logic.
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.
Very true! Thanks! I will add additional test cases. :)
c060160 to
c81b360
Compare
Piinks
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.
We have been on holiday recently, and will return to work next week! Happy Spring Festival!
Welcome back! I hope you enjoyed the holiday!
Thanks for the review, I'll update this today! I have more ideas for yak shaving RenderSliverFixedExtentBoxAdaptor. I've been subclassing RenderSliverVariedExtentList for a SliverTree widget and keep getting ideas to improve the base class. 😆
Manual roll Flutter from 5129806 to efee280 (47 revisions) Manual roll requested by [email protected] flutter/flutter@5129806...efee280 2024-02-22 [email protected] Roll Flutter Engine from bf5c003085fd to 7eeb697687d5 (16 revisions) (flutter/flutter#143911) 2024-02-22 [email protected] Update PR template for dart fix (flutter/flutter#143879) 2024-02-22 [email protected] Re-use methods to calculate leading and trailing garbage in RenderSliverMultiBoxAdaptor (flutter/flutter#143884) 2024-02-21 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Impeller] Make impeller goldens test blocking. (#143864)" (flutter/flutter#143896) 2024-02-21 [email protected] [Impeller] Make impeller goldens test blocking. (flutter/flutter#143864) 2024-02-21 [email protected] Disable color filter sepia test for Impeller. (flutter/flutter#143861) 2024-02-21 [email protected] Roll Flutter Engine from 52ffcaadea41 to bf5c003085fd (12 revisions) (flutter/flutter#143875) 2024-02-21 [email protected] Roll Flutter Engine from 4128895d79a1 to 52ffcaadea41 (1 revision) (flutter/flutter#143862) 2024-02-21 [email protected] Deprecate redundant itemExtent in RenderSliverFixedExtentBoxAdaptor methods (flutter/flutter#143412) 2024-02-21 [email protected] Add aab as alias for appbundle (flutter/flutter#143855) 2024-02-21 [email protected] Roll Flutter Engine from e16f43eeaaa4 to 4128895d79a1 (1 revision) (flutter/flutter#143856) 2024-02-21 [email protected] Roll Packages from 8bba41b to 48048f6 (2 revisions) (flutter/flutter#143853) 2024-02-21 [email protected] Update `hourMinuteTextStyle` defaults for Material 3 Time Picker (flutter/flutter#143749) 2024-02-21 [email protected] Roll Flutter Engine from 93063f61943a to e16f43eeaaa4 (2 revisions) (flutter/flutter#143827) 2024-02-21 [email protected] Roll Flutter Engine from ed49634486e9 to 93063f61943a (1 revision) (flutter/flutter#143826) 2024-02-21 [email protected] `CalendarDatePicker` doesn't announce selected date on desktop (flutter/flutter#143583) 2024-02-21 [email protected] Roll Flutter Engine from 9100d326475a to ed49634486e9 (2 revisions) (flutter/flutter#143824) 2024-02-21 [email protected] Add `timeSelectorSeparatorColor` and `timeSelectorSeparatorTextStyle` for Material 3 Time Picker (flutter/flutter#143739) 2024-02-21 [email protected] Roll Flutter Engine from efc69946cb1e to 9100d326475a (2 revisions) (flutter/flutter#143820) 2024-02-21 [email protected] Roll Flutter Engine from 700250436e3f to efc69946cb1e (2 revisions) (flutter/flutter#143816) 2024-02-21 [email protected] Roll Flutter Engine from 3557277c575c to 700250436e3f (1 revision) (flutter/flutter#143814) 2024-02-21 [email protected] more fixes to unstable impeller goldens. (flutter/flutter#143811) 2024-02-21 [email protected] Roll Flutter Engine from cb12a8cc97a1 to 3557277c575c (2 revisions) (flutter/flutter#143807) 2024-02-21 [email protected] [flutter_tools] enable wasm compile on beta channel (flutter/flutter#143779) 2024-02-21 [email protected] Fix initialization of time in repeat on AnimationController (flutter/flutter#142887) 2024-02-21 [email protected] Disable debug banner to stabilize impeller goldens. (flutter/flutter#143794) 2024-02-21 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Changing `TextPainter.getOffsetForCaret` implementation to remove the logarithmic search (#143281)" (flutter/flutter#143801) 2024-02-20 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add UI Benchmarks (#143542)" (flutter/flutter#143798) 2024-02-20 [email protected] Avoid applying partial dartfixes on CI (flutter/flutter#143551) 2024-02-20 [email protected] Add UI Benchmarks (flutter/flutter#143542) 2024-02-20 [email protected] Roll Flutter Engine from 1ae2c10e8071 to cb12a8cc97a1 (1 revision) (flutter/flutter#143791) 2024-02-20 [email protected] Implement `_suspendedNode` fix (flutter/flutter#143556) 2024-02-20 [email protected] Change `ItemExtentBuilder`'s return value nullable (flutter/flutter#142428) 2024-02-20 [email protected] Roll Flutter Engine from 27828054f07a to 1ae2c10e8071 (6 revisions) (flutter/flutter#143783) 2024-02-20 [email protected] Roll Flutter Engine from e16a260265ad to 27828054f07a (1 revision) (flutter/flutter#143769) 2024-02-20 [email protected] [gold] Always provide host ABI to gold config (flutter/flutter#143621) 2024-02-20 [email protected] instead of exiting the tool, print a warning when using --flavor with an incompatible device (flutter/flutter#143735) 2024-02-20 [email protected] Implementing `switch` expressions: everything in `flutter/lib/src/` (flutter/flutter#143634) 2024-02-20 [email protected] Changing `TextPainter.getOffsetForCaret` implementation to remove the logarithmic search (flutter/flutter#143281) 2024-02-20 [email protected] Delete local.properties that shouldn't have been pushed (flutter/flutter#143774) 2024-02-20 [email protected] Clean leaks. (flutter/flutter#142818) 2024-02-20 [email protected] Introduce tone-based surfaces and accent color add-ons - Part 2 (flutter/flutter#138521) 2024-02-20 [email protected] Explain when and why to use CrossAxisAlignment.baseline (flutter/flutter#143632) 2024-02-20 [email protected] Roll Flutter Engine from a41da3701923 to e16a260265ad (2 revisions) (flutter/flutter#143763) ...
) Manual roll Flutter from 5129806 to efee280 (47 revisions) Manual roll requested by [email protected] flutter/flutter@5129806...efee280 2024-02-22 [email protected] Roll Flutter Engine from bf5c003085fd to 7eeb697687d5 (16 revisions) (flutter/flutter#143911) 2024-02-22 [email protected] Update PR template for dart fix (flutter/flutter#143879) 2024-02-22 [email protected] Re-use methods to calculate leading and trailing garbage in RenderSliverMultiBoxAdaptor (flutter/flutter#143884) 2024-02-21 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Impeller] Make impeller goldens test blocking. (#143864)" (flutter/flutter#143896) 2024-02-21 [email protected] [Impeller] Make impeller goldens test blocking. (flutter/flutter#143864) 2024-02-21 [email protected] Disable color filter sepia test for Impeller. (flutter/flutter#143861) 2024-02-21 [email protected] Roll Flutter Engine from 52ffcaadea41 to bf5c003085fd (12 revisions) (flutter/flutter#143875) 2024-02-21 [email protected] Roll Flutter Engine from 4128895d79a1 to 52ffcaadea41 (1 revision) (flutter/flutter#143862) 2024-02-21 [email protected] Deprecate redundant itemExtent in RenderSliverFixedExtentBoxAdaptor methods (flutter/flutter#143412) 2024-02-21 [email protected] Add aab as alias for appbundle (flutter/flutter#143855) 2024-02-21 [email protected] Roll Flutter Engine from e16f43eeaaa4 to 4128895d79a1 (1 revision) (flutter/flutter#143856) 2024-02-21 [email protected] Roll Packages from 8bba41b to 48048f6 (2 revisions) (flutter/flutter#143853) 2024-02-21 [email protected] Update `hourMinuteTextStyle` defaults for Material 3 Time Picker (flutter/flutter#143749) 2024-02-21 [email protected] Roll Flutter Engine from 93063f61943a to e16f43eeaaa4 (2 revisions) (flutter/flutter#143827) 2024-02-21 [email protected] Roll Flutter Engine from ed49634486e9 to 93063f61943a (1 revision) (flutter/flutter#143826) 2024-02-21 [email protected] `CalendarDatePicker` doesn't announce selected date on desktop (flutter/flutter#143583) 2024-02-21 [email protected] Roll Flutter Engine from 9100d326475a to ed49634486e9 (2 revisions) (flutter/flutter#143824) 2024-02-21 [email protected] Add `timeSelectorSeparatorColor` and `timeSelectorSeparatorTextStyle` for Material 3 Time Picker (flutter/flutter#143739) 2024-02-21 [email protected] Roll Flutter Engine from efc69946cb1e to 9100d326475a (2 revisions) (flutter/flutter#143820) 2024-02-21 [email protected] Roll Flutter Engine from 700250436e3f to efc69946cb1e (2 revisions) (flutter/flutter#143816) 2024-02-21 [email protected] Roll Flutter Engine from 3557277c575c to 700250436e3f (1 revision) (flutter/flutter#143814) 2024-02-21 [email protected] more fixes to unstable impeller goldens. (flutter/flutter#143811) 2024-02-21 [email protected] Roll Flutter Engine from cb12a8cc97a1 to 3557277c575c (2 revisions) (flutter/flutter#143807) 2024-02-21 [email protected] [flutter_tools] enable wasm compile on beta channel (flutter/flutter#143779) 2024-02-21 [email protected] Fix initialization of time in repeat on AnimationController (flutter/flutter#142887) 2024-02-21 [email protected] Disable debug banner to stabilize impeller goldens. (flutter/flutter#143794) 2024-02-21 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Changing `TextPainter.getOffsetForCaret` implementation to remove the logarithmic search (#143281)" (flutter/flutter#143801) 2024-02-20 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add UI Benchmarks (#143542)" (flutter/flutter#143798) 2024-02-20 [email protected] Avoid applying partial dartfixes on CI (flutter/flutter#143551) 2024-02-20 [email protected] Add UI Benchmarks (flutter/flutter#143542) 2024-02-20 [email protected] Roll Flutter Engine from 1ae2c10e8071 to cb12a8cc97a1 (1 revision) (flutter/flutter#143791) 2024-02-20 [email protected] Implement `_suspendedNode` fix (flutter/flutter#143556) 2024-02-20 [email protected] Change `ItemExtentBuilder`'s return value nullable (flutter/flutter#142428) 2024-02-20 [email protected] Roll Flutter Engine from 27828054f07a to 1ae2c10e8071 (6 revisions) (flutter/flutter#143783) 2024-02-20 [email protected] Roll Flutter Engine from e16a260265ad to 27828054f07a (1 revision) (flutter/flutter#143769) 2024-02-20 [email protected] [gold] Always provide host ABI to gold config (flutter/flutter#143621) 2024-02-20 [email protected] instead of exiting the tool, print a warning when using --flavor with an incompatible device (flutter/flutter#143735) 2024-02-20 [email protected] Implementing `switch` expressions: everything in `flutter/lib/src/` (flutter/flutter#143634) 2024-02-20 [email protected] Changing `TextPainter.getOffsetForCaret` implementation to remove the logarithmic search (flutter/flutter#143281) 2024-02-20 [email protected] Delete local.properties that shouldn't have been pushed (flutter/flutter#143774) 2024-02-20 [email protected] Clean leaks. (flutter/flutter#142818) 2024-02-20 [email protected] Introduce tone-based surfaces and accent color add-ons - Part 2 (flutter/flutter#138521) 2024-02-20 [email protected] Explain when and why to use CrossAxisAlignment.baseline (flutter/flutter#143632) 2024-02-20 [email protected] Roll Flutter Engine from a41da3701923 to e16a260265ad (2 revisions) (flutter/flutter#143763) ...
Multiple methods in
RenderSliverFixedExtentBoxAdaptorpass adouble itemExtentfor computing things like what children will be laid out, what the max scroll offset will be, and how the children will be laid out.Since
RenderSliverFixedExtentBoxAdaptorwas further subclassed to support aitemExtentBuiderinRenderSliverVariedExtentList, these itemExtent parameters became useless when using that RenderObject. Reading throughRenderSliverFixedExtentBoxAdaptor.performLayout, the remaining artifacts of passing around itemExtent make it hard to follow when it is irrelevant.RenderSliverFixedExtentBoxAdaptor.itemExtentis available from these methods, so it does not need to pass it. It is redundant API.Plus, if a bogus itemExtent is passed for some reason, errors will ensue and the layout will be incorrect. 💣 💥
Deprecating so we can remove these for a cleaner API. Unfortunately this is not supported by dart fix, but the fact that these methods are protected means usage outside of the framework is likely minimal.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.