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

fix(native-filters): allowClear only when required not checked #14353

Merged
merged 2 commits into from
Apr 26, 2021

Conversation

villebro
Copy link
Member

SUMMARY

Rephrase "Allow empty filter" to be inline with Filter Box "Required" control. Also change behavior so that allowClear is set to false when "Required" is set to true.

The control has been renamed and the description updated:
image

When in the dashboard view, the selection can't be cleared when in single select mode:
image

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Apr 26, 2021

Codecov Report

Merging #14353 (670d1b2) into master (7ff35df) will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14353      +/-   ##
==========================================
- Coverage   77.18%   77.14%   -0.04%     
==========================================
  Files         954      954              
  Lines       48134    48140       +6     
  Branches     5985     5987       +2     
==========================================
- Hits        37151    37139      -12     
- Misses      10786    10804      +18     
  Partials      197      197              
Flag Coverage Δ
javascript 72.02% <ø> (-0.08%) ⬇️

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

Impacted Files Coverage Δ
...c/filters/components/Select/SelectFilterPlugin.tsx 84.90% <ø> (ø)
...tend/src/filters/components/Select/controlPanel.ts 63.63% <ø> (ø)
...d/src/dashboard/components/FiltersBadge/Styles.tsx 54.05% <0.00%> (-43.25%) ⬇️
...src/dashboard/components/FiltersBadge/selectors.ts 76.92% <0.00%> (-1.65%) ⬇️
...nd/src/dashboard/components/FiltersBadge/index.tsx 100.00% <0.00%> (+4.00%) ⬆️

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 7ff35df...670d1b2. Read the comment docs.

@villebro villebro merged commit 8a0d321 into apache:master Apr 26, 2021
@junlincc junlincc added the dashboard:native-filters Related to the native filters of the Dashboard label Apr 26, 2021
amitmiran137 pushed a commit that referenced this pull request Apr 27, 2021
* fix(native-filters): allowClear only when required not checked

* Update superset-frontend/src/filters/components/Select/controlPanel.ts

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
(cherry picked from commit 8a0d321)
amitmiran137 pushed a commit that referenced this pull request Apr 28, 2021
* fix(native-filters): allowClear only when required not checked

* Update superset-frontend/src/filters/components/Select/controlPanel.ts

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
(cherry picked from commit 8a0d321)
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
…e#14353)

* fix(native-filters): allowClear only when required not checked

* Update superset-frontend/src/filters/components/Select/controlPanel.ts

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>

Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels dashboard:native-filters Related to the native filters of the Dashboard preset-io size/XS test:case v1.2 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants