Skip to content
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

feat: focus input on search tab tap #11169

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

Conversation

MounirDhahri
Copy link
Member

@MounirDhahri MounirDhahri commented Nov 21, 2024

Description

This PR adds the ability to focus on the search bar and to dismiss it after tab bar press.

Screen.Recording.2024-12-12.at.15.43.14.mov

PR Checklist

  • I have tested my changes on iOS and Android.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

  • focus input on search tab tap - mounir

iOS user-facing changes

Android user-facing changes

Dev changes

Need help with something? Have a look at our docs, or get in touch with us.

@MounirDhahri MounirDhahri self-assigned this Nov 21, 2024
@MounirDhahri MounirDhahri force-pushed the feat/focus-search-input-on-search-tap branch from f43879c to a0a096b Compare November 26, 2024 11:25
@MounirDhahri MounirDhahri force-pushed the feat/focus-search-input-on-search-tap branch from 5b71ff2 to c34ce13 Compare December 12, 2024 14:30
)
useImperativeHandle(ref, () => ({
focus: () => {
if (!debouncedIsVisible.debouncedValue) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, I am debouncing the value to make sure I don't end up opening the modal again after dismissing it.

@MounirDhahri MounirDhahri marked this pull request as ready for review December 12, 2024 14:47
@MounirDhahri MounirDhahri force-pushed the feat/focus-search-input-on-search-tap branch from c34ce13 to b972158 Compare December 12, 2024 14:47
@ArtsyOpenSource
Copy link
Contributor

This PR contains the following changes:

  • Cross-platform user-facing changes (focus input on search tab tap - mounir - MounirDhahri)

Generated by 🚫 dangerJS against b972158

Copy link
Contributor

@olerichter00 olerichter00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks you 🙏

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