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: Selectable dropdown triggered by icon component #21955

Merged
merged 3 commits into from
Oct 31, 2022

Conversation

geido
Copy link
Member

@geido geido commented Oct 27, 2022

SUMMARY

This PR implements a selectable dropdown menu that can be opened through an icon. This is useful for the implementation of the horizontal filter bar and has been included in the header of the filter bar for that reason.

AFTER

Screenshot 2022-10-27 at 19 07 48

TESTING INSTRUCTIONS

  1. Open the filter bar in a Dashboard
  2. Click on the gear icon
  3. The dropdown should appear with two options, vertical and horizontal

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

@geido geido requested review from kgabryje, michael-s-molina and rusackas and removed request for kgabryje October 27, 2022 16:35
@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

Merging #21955 (ca43b97) into master (a02a778) will decrease coverage by 0.16%.
The diff coverage is 86.66%.

@@            Coverage Diff             @@
##           master   #21955      +/-   ##
==========================================
- Coverage   66.98%   66.82%   -0.17%     
==========================================
  Files        1808     1809       +1     
  Lines       69289    69304      +15     
  Branches     7407     7410       +3     
==========================================
- Hits        46412    46311     -101     
- Misses      20968    21083     +115     
- Partials     1909     1910       +1     
Flag Coverage Δ
hive ?
javascript 53.41% <86.66%> (+0.01%) ⬆️
mysql 78.35% <ø> (ø)
postgres 78.41% <ø> (ø)
presto ?
python 81.17% <ø> (-0.35%) ⬇️
sqlite 76.90% <ø> (ø)
unit 51.16% <ø> (ø)

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

Impacted Files Coverage Δ
superset-frontend/src/components/Menu/index.tsx 100.00% <ø> (ø)
...omponents/nativeFilters/FilterBar/Header/index.tsx 91.30% <50.00%> (-8.70%) ⬇️
...nd/src/components/DropdownSelectableIcon/index.tsx 100.00% <100.00%> (ø)
superset/db_engines/hive.py 0.00% <0.00%> (-85.19%) ⬇️
superset/db_engine_specs/hive.py 71.14% <0.00%> (-16.21%) ⬇️
superset/db_engine_specs/presto.py 81.05% <0.00%> (-6.73%) ⬇️
superset/models/sql_lab.py 72.83% <0.00%> (-1.97%) ⬇️
superset/connectors/sqla/models.py 90.31% <0.00%> (-0.70%) ⬇️
superset/db_engine_specs/base.py 89.38% <0.00%> (-0.32%) ⬇️
superset/models/core.py 89.55% <0.00%> (-0.24%) ⬇️
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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

@@ -86,6 +91,24 @@ const Header: FC<HeaderProps> = ({ toggleFiltersBar }) => {
<Wrapper>
<TitleArea>
<span>{t('Filters')}</span>
<DropdownSelectableIcon
Copy link
Member

Choose a reason for hiding this comment

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

Can you put it behind a feature flag please?

Copy link
Member

@kgabryje kgabryje Oct 31, 2022

Choose a reason for hiding this comment

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

And restrict access to users with dashboard edit permission

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.

Can you put adding the gear icon to filter bar behind feature flag HORIZONTAL_FILTER_BAR?

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

@kgabryje kgabryje merged commit 5c27aaf into master Oct 31, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the feat/horizontal-filter-bar-gearmenu branch March 26, 2024 16:11
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/L 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants