feat(review-reminders): prep for edge to edge - #21588
Conversation
The study options containers are padded with the system bar insets, consuming them means they will not be applied twice. Non-functional prep for removing FragmentHost.supportsEdgeToEdge. Part of 17334 Part of 21519 Assisted-by: Claude Fable 5
Helper for Insets which provides the initial insets to the lambda Issue 17334 Assisted-by: Claude Fable 5
Issue 17334 Assisted-by: Claude Fable 5
Issue 17334, 21519 Assisted-by: Claude Fable 5
Issue 17334, 21519 - edge to edge Assisted-by: Claude Fable 5
|
Snapshot diff report vs
All 10 changed screenshotsReviewRemindersScreenshotTest
|
ericli3690
left a comment
There was a problem hiding this comment.
Awesome! Thanks for all your work here, I know first-hand how wacky it is to support all of ScheduleReminders' FragmentHosts. Feel free to ping me on the follow-up PR once it's undrafted and I'll take a look as soon as possible.
Just a note on the screenshot tests, I'm not sure if this is intentional but some of the screenshots look a little wonky, maybe it's just Robolectric being Robolectric. For example (see left edge, top edge, bottom edge):
| * top notch is rotated to landscape | ||
| */ | ||
| @SuppressLint("RtlHardcoded") // insets and cutouts are physical: not layout-direction relative | ||
| private fun Activity.simulateSystemBars(cutoutLeft: Dp = 0.dp) { |
There was a problem hiding this comment.
nit: This function seems to be somewhat general-purpose; consider moving it to a more centralized location than the bottom of ReviewRemindersScreenshotTest, especially as more edge-to-edge test code is written? I might be misreading this code though
| } | ||
|
|
||
| /** Inserts [count] reminders so the list has content to render behind the simulated bars */ | ||
| private fun insertReminders(count: Int) { |
There was a problem hiding this comment.
Nice; FYI, I plan on adding a few more screenshot tests for cases like deleted review reminders, toggled-off review reminders, no review reminders, etc. shortly
|
Thanks!! The issues in the screenshots are intentional, to generate the "before" screenshots. They are too be fixed in the drafted PR |
Baseline captures across the FragmentHosts, with simulated system bars: the edge-to-edge fixes then show up as image diffs. Adds an id to the troubleshooting scroll view so the test can scroll it. Issue 17334, 21519 Assisted-by: Claude Fable 5
bc5b320 to
a2537e2
Compare
|
I'm going to merge as this is test-only to move the following along: |
Note
Assisted-by: Claude Fable 5
Issues
ScheduleRemindersFragment#21519Approach
Various refactors, then add tests: both insets and screenshots
How Has This Been Tested?
This is effectively test-only. Screenshot tests will expose issues
Checklist