codyml opened a new pull request, #22364: URL: https://github.com/apache/superset/pull/22364
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY <!--- Describe the change below, including rationale and design decisions --> 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 <!--- Skip this if not applicable --> Before, admin/owner: <img width="914" alt="Screen Shot 2022-12-07 at 2 45 13 PM" src="https://user-images.githubusercontent.com/13007381/206303450-b5d75e90-c30f-48ba-80a9-0347a81ad073.png"> Before, viewer: <img width="924" alt="Screen Shot 2022-12-07 at 2 45 29 PM" src="https://user-images.githubusercontent.com/13007381/206303464-65f35c21-667f-41eb-89f5-34a40a65d67d.png"> After, admin/owner: <img width="1081" alt="Screen Shot 2022-12-07 at 2 44 49 PM" src="https://user-images.githubusercontent.com/13007381/206303509-b51c1bc4-a367-4023-9afd-5ba56adcd868.png"> After, viewer: <img width="866" alt="Screen Shot 2022-12-07 at 2 44 57 PM" src="https://user-images.githubusercontent.com/13007381/206303538-328cde4b-d328-4215-8c20-e7a8a5108781.png"> ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> - Confirm that for a user with dashboard edit preferences (admin or dashboard owner), the edit button is visible and clicking it opens the Add/Edit Filters with the specified filter selected. - Confirm that for a user without dashboard edit preferences, the card does not have an edit button. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] 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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
