-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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(dashboard): Add edit button to dashboard native filters filter cards #22364
Conversation
Add an option to jump directly to editing the selected filter in the dashboard view
/testenv up FEATURE_HORIZONTAL_FILTER_BAR=true |
@kgabryje Ephemeral environment spinning up at http://34.219.222.117:8080. Credentials are |
21ae71f
to
a3ec2a3
Compare
Codecov Report
@@ Coverage Diff @@
## master #22364 +/- ##
==========================================
- Coverage 66.86% 66.76% -0.10%
==========================================
Files 1847 1847
Lines 70559 70573 +14
Branches 7736 7744 +8
==========================================
- Hits 47180 47119 -61
- Misses 21378 21453 +75
Partials 2001 2001
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
superset-frontend/src/dashboard/components/nativeFilters/FilterCard/FilterCard.test.tsx
Outdated
Show resolved
Hide resolved
@@ -204,6 +205,13 @@ jest.mock('@superset-ui/core', () => ({ | |||
}), | |||
})); | |||
|
|||
jest.mock( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need that? I think that testing icons didnt require hacks before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this is what you had to add to avoid act
warnings when running tests – without it all of the tests output a bunch of act
icon errors. @michael-s-molina I know you worked on this, is this still the best solution to avoiding those test warnings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that our icons load asynchronously, you can either mock the icons as you did or wait for them to render. We generally mock them when they're not the focus of the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 tiny non-blocking nits, otherwise looks great!
@kasiazjc Fixed icon size: |
Perfect, thank you! 😌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
This PR adds an Edit button (pencil icon next to title) to the filter cards that appear when hovering over a native filter in either vertical or horizontal mode. The Edit button only appears in situations when the primary Add/Edit Filters button appears (when the user has edit dashboard permissions for the current dashboard). Clicking the Edit button opens the Add/Edit Filters dashboard with the specified filter already selected.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before, admin/owner:
Before, viewer:
After, admin/owner:
After, viewer:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION