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

Formless search #750

Merged
merged 3 commits into from
May 5, 2020
Merged

Formless search #750

merged 3 commits into from
May 5, 2020

Conversation

tmeyer2115
Copy link
Collaborator

Allow SearchBar to be created without form as submission context.

This PR allows the SearchBar to be configured to not use a form as the query
submission context. By default, a form is used, unless a client sets the new
'useForm' config option to false. This was done to support clients that wanted
to use a SearchBar on an ASP.NET page.

J=SPR-2175
TEST=manual

Tested the following scenarios for SearchBars set to useForm true and false:

  • Entering text and hitting enter.
  • Entering text and hitting the submit button.
  • Entering text and clearing.
  • Clicking autocomplete option.
  • Using keys to navigate to and select an autocomplete option.
  • Clear button appears in the correct situations.
  • Search animation works as expected.
  • Near me query works as expected.

In the above scenarios, made sure Analytics worked correctly, if applicable.

This PR allows the SearchBar to be configured to not use a form as the query
submission context. By default, a form is used, unless a client sets the new
'useForm' config option to false. This was done to support clients that wanted
to use a SearchBar on an ASP.NET page.

J=SPR-2175
TEST=manual

Tested the following scenarios for SearchBars set to useForm true and false:

- Entering text and hitting enter.
- Entering text and hitting the submit button.
- Entering text and clearing.
- Clicking autocomplete option.
- Using keys to navigate to and select an autocomplete option.
- Clear button appears in the correct situations.
- Search animation works as expected.
- Near me query works as expected.

In the above scenarios, made sure Analytics worked correctly, if applicable.
Copy link
Contributor

@alexisgrow alexisgrow left a comment

Choose a reason for hiding this comment

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

Overall this LGTM! Definitely out of scope of this item, but for the future - do we want to do the same thing for QA, Geolocation, and Direct Answer components?

Copy link
Contributor

@alexisgrow alexisgrow left a comment

Choose a reason for hiding this comment

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

LGTM!

@tmeyer2115
Copy link
Collaborator Author

Overall this LGTM! Definitely out of scope of this item, but for the future - do we want to do the same thing for QA, Geolocation, and Direct Answer components?

Yep, I imagine we will. SearchBar is the most common problem child for now, but will probably be good to offer formless options for all.

@tmeyer2115 tmeyer2115 merged commit 179478e into v1.0.2 May 5, 2020
@tmeyer2115 tmeyer2115 deleted the formless-search branch May 5, 2020 14:33
@tmeyer2115 tmeyer2115 restored the formless-search branch May 5, 2020 15:46
tmeyer2115 added a commit that referenced this pull request May 5, 2020
This PR allows the SearchBar to be configured to not use a form as the query
submission context. By default, a form is used, unless a client sets the new
'useForm' config option to false. This was done to support clients that wanted
to use a SearchBar on an ASP.NET page.

J=SPR-2175
TEST=manual

Tested the following scenarios for SearchBars set to useForm true and false:

- Entering text and hitting enter.
- Entering text and hitting the submit button.
- Entering text and clearing.
- Clicking autocomplete option.
- Using keys to navigate to and select an autocomplete option.
- Clear button appears in the correct situations.
- Search animation works as expected.
- Near me query works as expected.

In the above scenarios, made sure Analytics worked correctly, if applicable.
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

2 participants