Skip to content

[Snackbar] Refactor mandatory system gesture insets handling #3252

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pubiqq
Copy link
Contributor

@pubiqq pubiqq commented Feb 20, 2023

  • Fixes Snackbar flickering that occurs when the anchor view is updated off-screen and gestureInsetBottomIgnored = false.
  • Fixes Snackbar vertical offset when target parent has bottom padding.
  • Removes a double layout pass request when calling the margin update with gestureInsetBottomIgnored = false and anchorViewLayoutListenerEnabled = false.
  • Removes endless layout pass requests when calling the margin update with gestureInsetBottomIgnored = false and anchorViewLayoutListenerEnabled = true.

Fixes #3446, fixes #4326.

@drchen drchen self-assigned this Apr 19, 2023
@pubiqq pubiqq force-pushed the snackbar/remove-post-invalidate branch 2 times, most recently from b22b9c8 to d30a55f Compare July 8, 2023 13:36
@pubiqq pubiqq force-pushed the snackbar/remove-post-invalidate branch from d30a55f to 9ba37dd Compare August 24, 2023 01:59
@pubiqq pubiqq mentioned this pull request Oct 2, 2023
@drchen drchen assigned dsn5ft and unassigned dsn5ft Dec 11, 2023
@drchen
Copy link
Contributor

drchen commented Dec 11, 2023

I think we post to update gesture insets for a reason. @dsn5ft do you have an idea why we did that in the first place?

@drchen drchen assigned dsn5ft and unassigned drchen Dec 11, 2023
@dsn5ft
Copy link
Contributor

dsn5ft commented Dec 15, 2023

I don't really remember, maybe updateMargins() was originally not called as often as it is now? @pubiqq do you know why the post() is not necessary anymore and you can call calculateExtraBottomMargin() directly in updateMargins()?

@pubiqq
Copy link
Contributor Author

pubiqq commented Dec 19, 2023

I'm pretty sure .post() was added just because it was the easiest way to add mandatory system gesture inset support. There are no objective reasons to keep this approach.

@pubiqq pubiqq force-pushed the snackbar/remove-post-invalidate branch from 9ba37dd to 8daadb6 Compare February 14, 2024 22:14
@pubiqq pubiqq force-pushed the snackbar/remove-post-invalidate branch from 8daadb6 to 11854e6 Compare August 13, 2024 11:36
@pubiqq pubiqq force-pushed the snackbar/remove-post-invalidate branch from 11854e6 to b727423 Compare November 27, 2024 16:59
@pubiqq pubiqq force-pushed the snackbar/remove-post-invalidate branch from b727423 to 17d20dc Compare May 12, 2025 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants