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

Allow custom afterDropdownInputFocus on FilterSearch #432

Merged
merged 9 commits into from
Mar 18, 2024

Conversation

EmilyZhang777
Copy link
Contributor

@EmilyZhang777 EmilyZhang777 commented Mar 14, 2024

This change adds a param so that callers can pass in a custom afterDropdownInputFocus method for FilterSearch's input box. This request was brought up to allow analytics event logging upon clicking on the input box.

This change also bump the version to 1.6.0-beta.432.

J=TECHOPS-11352
TEST=auto, manual

Ran npm run test. Made sure test-site still works without a custom afterDropdownInputFocus method.
Used my local search-ui-react in the client's repo. Verified clicking into the input box triggers an analytics event and selecting an option from the dropdown properly hides it.

https://drive.google.com/file/d/1-kIYMU5TQAB2CzLxhSFpfbIJFqWhRJAR/view?usp=sharing

@EmilyZhang777 EmilyZhang777 requested a review from a team as a code owner March 14, 2024 20:36
Copy link
Contributor

github-actions bot commented Mar 14, 2024

Current unit coverage is 92.20456802383316%
Current visual coverage is 79.06755470980019%
Current combined coverage is 92.70471464019852%

@coveralls
Copy link

coveralls commented Mar 14, 2024

Coverage Status

coverage: 85.425% (+0.02%) from 85.405%
when pulling 86c6c93 on dev/filter-search-on-focus
into 0479954 on develop.

Copy link
Contributor

@Jeffrey-Rhoads17 Jeffrey-Rhoads17 left a comment

Choose a reason for hiding this comment

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

LGTM! but I imagine we'll want someone from your team to review as well

src/components/FilterSearch.tsx Outdated Show resolved Hide resolved
src/components/FilterSearch.tsx Outdated Show resolved Hide resolved
src/components/FilterSearch.tsx Outdated Show resolved Hide resolved
src/components/FilterSearch.tsx Outdated Show resolved Hide resolved
src/components/FilterSearch.tsx Outdated Show resolved Hide resolved
tests/components/FilterSearch.stories.tsx Outdated Show resolved Hide resolved
tests/components/FilterSearch.test.tsx Outdated Show resolved Hide resolved
tests/components/FilterSearch.test.tsx Outdated Show resolved Hide resolved
@EmilyZhang777 EmilyZhang777 changed the base branch from hotfix/v1.5.1 to develop March 15, 2024 21:28
Copy link
Contributor

@nmanu1 nmanu1 left a comment

Choose a reason for hiding this comment

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

for the beta version, since it looks like there aren't any other commits on develop, you can either bump the version to beta in this PR or as a separate one

tests/components/FilterSearch.test.tsx Show resolved Hide resolved
Copy link
Contributor

@nmanu1 nmanu1 left a comment

Choose a reason for hiding this comment

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

can you update the PR description with the new prop name and to mention that you're cutting a beta version from this PR?

package-lock.json Show resolved Hide resolved
@EmilyZhang777 EmilyZhang777 changed the title Allow custom onFocus on FilterSearch input Allow custom afterDropdownInputFocus on FilterSearch input Mar 18, 2024
@EmilyZhang777 EmilyZhang777 changed the title Allow custom afterDropdownInputFocus on FilterSearch input Allow custom afterDropdownInputFocus on FilterSearch Mar 18, 2024
@EmilyZhang777 EmilyZhang777 merged commit 4946b76 into develop Mar 18, 2024
21 of 22 checks passed
@EmilyZhang777 EmilyZhang777 deleted the dev/filter-search-on-focus branch March 18, 2024 21:02
@sahilvaidya sahilvaidya mentioned this pull request May 15, 2024
sahilvaidya added a commit that referenced this pull request May 15, 2024
### Features
- Added a custom `afterDropdownInputFocus` prop to the `FilterSearch` component that is called after focus enters the input. This can be used, for example, to fire analytics events when a user clicks into the `FilterSearch` input. (#432)
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.

None yet

4 participants