Skip to content

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

yoanarios
Copy link
Contributor

@yoanarios yoanarios commented Jul 18, 2025

πŸ“œ Tickets

FXIOS-12729
Github issue

FXIOS-12559
Github issue

πŸ’‘ Description

  • These are two small improvements while a long term solution is implemented.
    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

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If needed, I updated documentation and added comments to complex code
  • If needed, I added a backport comment (example @Mergifyio backport release/v120)

@yoanarios yoanarios requested a review from thatswinnie July 18, 2025 19:06
@yoanarios yoanarios requested a review from a team as a code owner July 18, 2025 19:06
@@ -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
Copy link
Contributor Author

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

@mobiletest-ci-bot
Copy link

Messages
πŸ“– Project coverage: 36.45%
πŸ“– Edited 1 files
πŸ“– Created 0 files

Client.app: Coverage: 35.28

File Coverage
TabScrollController.swift 69.11% βœ…

Generated by 🚫 Danger Swift against ff00038

Copy link
Collaborator

@thatswinnie thatswinnie left a 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) <
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants