-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Bugfix FXIOS-12729 #27721 β Tab/Address bar autohide/autoreveal is incredibly annoying #28069
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
base: main
Are you sure you want to change the base?
Bugfix FXIOS-12729 #27721 β Tab/Address bar autohide/autoreveal is incredibly annoying #28069
Conversation
@@ -15,6 +15,8 @@ final class TabScrollController: NSObject, | |||
static let toolbarBaseAnimationDuration: CGFloat = 0.2 | |||
static let minimalAddressBarAnimationDuration: CGFloat = 0.4 | |||
static let heightOffset: CGFloat = 14 | |||
static let minimumScrollThreshold: CGFloat = 20 | |||
static let minimumScrollVelocity: CGFloat = 100 |
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 might need 2 values for velocity I feel that hiding the toolbar is not that bad but to show it again feels like I need to scroll faster
Client.app: Coverage: 35.28
Generated by π« Danger Swift against ff00038 |
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.
π Works like a charm on an iPhone. Great job @yoanarios
|
||
// If scrollview contenSize is bigger than scrollview height scroll is enabled | ||
var hasScrollableContent: Bool { | ||
return (UIScreen.main.bounds.size.height + 2 * UIConstants.ToolbarHeight) < |
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.
Is this working with stage manager as well? Shouldn't we use the window bounds instead of the screen bounds?
π Tickets
FXIOS-12729
Github issue
FXIOS-12559
Github issue
π‘ Description
1- First added a threshold that takes into account velocity and translation to avoid toggling the toolbar from short interactions.
2- Update
hasScrollableContent
to take into account the toolbar height to fix the bug where the toolbar was not hiding for short webpages (FXIOS-12559)π₯ Demos
It's hard to see the changes, but I added a video to show that small and slow scroll actions don't trigger a show/hide toolbar. I recommend testing to get a better feeling of the change
https://github.com/user-attachments/assets/38ff0fcb-4451-4d3d-9feb-c46d86d82acf
π Checklist
@Mergifyio backport release/v120
)