-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add FXIOS-12510 [HNT - Search Bar] tapping on search bar experience #27505
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
This pull request has conflicts when rebasing. Could you fix it @cyndichin? 🙏 |
3b98044
to
1d11ac1
Compare
Client.app: Coverage: 35.35
Generated by 🚫 Danger Swift against 911cf80 |
@yoanarios seems like I get the unit test message even though I do have tests. Looks like it gets triggered for new files, it makes sense if we can remove that line of code and keep the ones with 0 test coverage? |
This pull request has conflicts when rebasing. Could you fix it @cyndichin? 🙏 |
zeroSearchDimmingView.trailingAnchor.constraint(equalTo: contentContainer.trailingAnchor) | ||
]) | ||
|
||
UIView.animate(withDuration: 0.3) { |
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.
Kept constant here instead of UX struct since it's easier to make changes here when doing design review. Happy to move it to struct in future if that's preferred.
@@ -1111,7 +1118,22 @@ class BrowserViewController: UIViewController, | |||
) | |||
} | |||
|
|||
/// If we are showing the homepage search bar, then we should hide the address toolbar | |||
private func shouldHideToolbar() -> Bool { |
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.
@thatswinnie I didn't see a state for showing / hiding the toolbar, so I added this method and checks directly here in BVC. Let me know if there's a better place otherwise! We can do this in a follow up PR since I'll need to do a follow up PR to show the toolbar when we aren't in homepage.
Tried to keep this smaller, but it's a bit hard to test the UI end to end without the refactoring on the state and addition to middleware. |
I've opened a PR to remove the check if the file is not found, which was added for the edge case where the file was not added in XCTResults with no lines of code which shouldn't happened in the project |
thank you so much! 🔥 |
@mergify backport release/v141 |
✅ Backports have been created
|
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 great @cyndichin, very nice!
Just one issue/question
private func switchToolbarIfNeeded() { | ||
guard !shouldHideToolbar() else { | ||
addressToolbarContainer.isHidden = true |
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.
I am not seeing where we unhide the address toolbar on orientation change (to landscape), I'm only seeing that we unhide it when showing the zero search view
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.
thanks for reviewing!! This may change since I have a separate ticket for showing / hiding the address toolbar - https://mozilla-hub.atlassian.net/browse/FXIOS-12632
Any issue with keeping this ticket specific to tapping on search middle bar shows the new zero state and then can address this in the other ticket avoid this PR from getting to large?
I'm planning on pairing with Winnie to see if we can modify the toolbar state instead - #27505 (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.
works for me 👍
@mergify rebase |
❌ Base branch update has failedGit reported the following error:
|
087d23e
to
354d45f
Compare
Unable to rebase via mergify due to conflict with main in feature flag config with stories redesign. Rebase locally. |
📜 Tickets
Jira ticket
Github issue
Jira ticket
Github issue
💡 Description
Add tapping on homepage search bar shows a scrim layer for zero search state. Deleting any text or going back to the zero state, should show the scrim. This scrim only appears when tapping on the search bar and not any other zero search state experience (this is TBD).
Also refactor how we configure showing the search bar by adding the check in the homepage middleware.
Note: Please use the debug option to verify that this experience works as expected. You may need to relaunch to switch between experiences. UI tests and a11y will come after requirements are more defined.
🎥 Demos
Simulator.Screen.Recording.-.iPhone.16.-.2025-06-23.at.10.01.52.mp4
📝 Checklist
@Mergifyio backport release/v120
)