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

feat: add classNames for apply and clearAll buttons for superset filters #17554

Conversation

Nithin-George-Philips
Copy link
Contributor

@Nithin-George-Philips Nithin-George-Philips commented Nov 25, 2021

SUMMARY

Added className for applyAll and clearALL Button in filterBar
This is to move the sticky buttons from the top to the bottom making it intuitive to different customers.
Custom css can be used to move the buttons as well as change the UI associated with the buttons.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2021-11-26 at 2 28 25 PM

TESTING INSTRUCTIONS

Sample css template to get above UI

.filter-action-buttons {
 position: absolute;
 z-index:1;
 bottom: 4px;
 right: 4px;
}

.filter-clear-all-button{
 color: #0098F3;
 border: none;
 font-weight: 400;
 text-transform: lowercase
}

.filter-apply-button{
   background-color: #0098F3;
   color: white;
}
.ant-select {
 margin-bottom: 6px;
}

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • 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

@villebro
Copy link
Member

Thanks @Nithin-George-Philips - great idea. Would you mind sharing an after screenshot with associated customization instructions so others can try it out. Also, if #17505 is redundant, I suggest closing that one.

…nto add-classNames-to-superset-filter-buttons
@codecov
Copy link

codecov bot commented Nov 26, 2021

Codecov Report

Merging #17554 (fd09a5f) into master (da75028) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #17554   +/-   ##
=======================================
  Coverage   77.02%   77.02%           
=======================================
  Files        1049     1049           
  Lines       56681    56681           
  Branches     7851     7851           
=======================================
  Hits        43659    43659           
  Misses      12769    12769           
  Partials      253      253           
Flag Coverage Δ
javascript 71.09% <ø> (ø)

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

Impacted Files Coverage Δ
...omponents/nativeFilters/FilterBar/Header/index.tsx 100.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 da75028...fd09a5f. Read the comment docs.

@Nithin-George-Philips
Copy link
Contributor Author

@villebro I have provided a screenshot as well as a custom css template to obtain the same.

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.

Good idea, thanks for the contribution! 🙂

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Thanks - LGTM

…nto add-classNames-to-superset-filter-buttons
@villebro villebro merged commit 4cf429c into apache:master Nov 27, 2021
@optymystycpryme
Copy link

@Nithin-George-Philips Can you provide the code necessary to move the Apply Filters/Clear All buttons to the top of the field above the filter options? It seems that by default, they are at the bottom of the form.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 labels Mar 13, 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 size/XS 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants