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

Large category picker in bulk filter modal #24378

Merged
merged 1 commit into from
Aug 1, 2022
Merged

Conversation

iethree
Copy link
Contributor

@iethree iethree commented Jul 27, 2022

Description

Instead of hiding category selections behind a big select button, we'll show the tokens inline, but still keep selection in a popover - aligning the styles with the FieldValuesWidget

Implementation

  • Splits existings SimpleCategoryFilterPicker into its own file (used for up to 12 distinct values)
  • Creates a new LargeCategoryFilterPicker for list selection for fields with more than 12 distinct values

Screen Shot 2022-07-26 at 12 50 51 PM

The component is responsive to viewport height

. .
large Screen Shot 2022-07-26 at 10 22 44 AM
small Screen Shot 2022-07-26 at 10 22 32 AM

Testing

  • You should be able to add and remove values from long lists (the State Field in the People table is a good one to test) for is/is not operators
  • Styling should look good on the FieldValuesWidget as well (any text field in the filter modal or in the column header popovers)
  • Token Styling should be responsive to window height such that the inputs toggle between 40px and 56px high

@iethree iethree requested a review from a team July 27, 2022 23:54
@iethree iethree self-assigned this Jul 27, 2022
@iethree iethree added the backport Automatically create PR on current release branch on merge label Jul 28, 2022
@codecov
Copy link

codecov bot commented Jul 28, 2022

Codecov Report

Merging #24378 (558598b) into master (8e1f765) will decrease coverage by 0.00%.
The diff coverage is 62.96%.

@@            Coverage Diff             @@
##           master   #24378      +/-   ##
==========================================
- Coverage   65.24%   65.24%   -0.01%     
==========================================
  Files        2771     2774       +3     
  Lines       84951    84966      +15     
  Branches    10490    10492       +2     
==========================================
+ Hits        55424    55433       +9     
- Misses      25203    25213      +10     
+ Partials     4324     4320       -4     
Flag Coverage Δ
front-end 46.43% <62.96%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...dals/InlineCategoryPicker/InlineCategoryPicker.tsx 78.37% <33.33%> (+0.11%) ⬆️
...InlineCategoryPicker/LargeCategoryFilterPicker.tsx 60.00% <60.00%> (ø)
...nlineCategoryPicker/SimpleCategoryFilterPicker.tsx 60.00% <60.00%> (ø)
...lineCategoryPicker/InlineCategoryPicker.styled.tsx 100.00% <100.00%> (ø)
...nents/filters/modals/InlineCategoryPicker/utils.ts 100.00% <100.00%> (ø)
...odals/BulkFilterSelect/BulkFilterSelect.styled.tsx 36.36% <0.00%> (-9.10%) ⬇️
...lters/modals/BulkFilterSelect/BulkFilterSelect.tsx 45.45% <0.00%> (-6.07%) ⬇️
.../src/metabase-lib/lib/queries/structured/Filter.ts 76.80% <0.00%> (+2.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e1f765...558598b. Read the comment docs.

@kulyk kulyk requested a review from daltojohnso July 28, 2022 11:32
Base automatically changed from extract-tokenFieldItem-component to master July 29, 2022 14:04
@iethree iethree merged commit 55352ab into master Aug 1, 2022
@iethree iethree deleted the large-category-picker branch August 1, 2022 19:13
github-actions bot pushed a commit that referenced this pull request Aug 1, 2022
metabase-bot bot added a commit that referenced this pull request Aug 1, 2022
* Create Large Category Picker (#24378)

* prettier fix

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
@iethree iethree mentioned this pull request Aug 2, 2022
61 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants