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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Filters] Add disableQueryField Property #5832

Merged
merged 8 commits into from
May 20, 2022
Merged

Conversation

Stivaros
Copy link
Contributor

WHY are these changes introduced?

The disable property allows a developer to disable the entire component and the hideQueryField property enables a developer to hide the query field. Prior to this PR, there was no first-class way to disable the query field.

Hiding and showing a field can be a bit of a UX nightmare but sometimes we don't want users to be performing text searches.

WHAT is this pull request doing?

It adds a disableQueryField property to the Filters component which will disable the TextField (aka "query field") when set to true. Please see below video for a demo in the browser.

`disableQueryField` Demo Video https://user-images.githubusercontent.com/7734772/169001146-d3cc1e17-5672-4232-9c3c-9470a88340bc.mp4

How to 馃帺

Add disableQueryFilter={true} (or false) to any <Filters> component

馃帺 checklist

@Stivaros Stivaros requested a review from kyledurand May 18, 2022 10:18
@Stivaros Stivaros self-assigned this May 18, 2022
@changeset-bot
Copy link

changeset-bot bot commented May 18, 2022

鈿狅笍 No Changeset found

Latest commit: b7ad407

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ghost
Copy link

ghost commented May 18, 2022

馃憢 Thanks for opening your first pull request. A contributor should give feedback soon. If you haven鈥檛 already, please check out the contributing guidelines.

@kyledurand kyledurand requested a review from alex-page May 18, 2022 17:55
@github-actions
Copy link
Contributor

github-actions bot commented May 18, 2022

size-limit report 馃摝

Path Size
cjs 150.87 KB (+0.01% 馃敽)
esm 87.02 KB (+0.02% 馃敽)
esnext 136.91 KB (+0.01% 馃敽)
css 37.23 KB (0%)

@Stivaros Stivaros marked this pull request as ready for review May 19, 2022 11:09
@kyledurand kyledurand changed the title [WIP][Filters] Add disableQueryField Property [Filters] Add disableQueryField Property May 19, 2022
@Stivaros Stivaros force-pushed the feature/disable-query-field branch from 9225555 to 6f3b69b Compare May 19, 2022 12:39
Copy link
Contributor

@kyledurand kyledurand left a comment

Choose a reason for hiding this comment

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

Looks great @Stivaros 馃憦

@Stivaros Stivaros force-pushed the feature/disable-query-field branch from 6f3b69b to 6032e8b Compare May 20, 2022 13:24
@Stivaros
Copy link
Contributor Author

Rebasing due to a merge conflict in UNRELEASED.md

@kyledurand
Copy link
Contributor

We shipped a change yesterday which deleted UNRELEASED.md and now requires you to run yarn changeset. You'll have to rebase, run that command, add a quick note, and this should be good to go

@Stivaros
Copy link
Contributor Author

We shipped a change yesterday which deleted UNRELEASED.md and now requires you to run yarn changeset. You'll have to rebase, run that command, add a quick note, and this should be good to go

Ah, thanks. Are you happy with the changes introduced in 27eac2d?

@kyledurand
Copy link
Contributor

That's perfect. Alex is taking the day off today so feel free to ship when 馃煝

I'm planning to cut a 9.9.0 release early next week as well

@Stivaros
Copy link
Contributor Author

@kyledurand there's a pending change in the UI Tests check which requires manual intervention. Is that my remit or yours? It's as I expect - the query field is disabled in the screenshot.

@kyledurand
Copy link
Contributor

there's a pending change in the UI Tests check

I believe I approved that when I reviewed but you have to manually approve them on every new push. I marked it approved 馃憤

@Stivaros Stivaros merged commit d810f8e into main May 20, 2022
@Stivaros Stivaros deleted the feature/disable-query-field branch May 20, 2022 13:57
@ghost
Copy link

ghost commented May 20, 2022

馃帀 Thanks for your contribution to Polaris!

This was referenced May 20, 2022
This was referenced May 20, 2022
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