codyml opened a new pull request, #21970: URL: https://github.com/apache/superset/pull/21970
<!--- 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 updates native filter dividers to display correctly when native filters are rendered as a horizontal bar, which will be supported in a future PR. In this PR, the divider is factored out into its own component, `FilterDivider`, which now supports three view modes: - **Vertical**: Same as current; displays full title and full description, if set. - **Horizontal**: Displays title, subject to truncation. If title is truncated or if there is a description set, an icon appears with a tooltip showing the full title (if truncated) and/or the description (if set). - **Horizontal overflow**: Displays title and description, if set, both subject to truncation. Hovering over truncated description or title will show full text. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> Vertical (same as before): <img width="315" alt="Screen Shot 2022-10-28 at 4 27 49 PM" src="https://user-images.githubusercontent.com/13007381/198752602-9d62db8a-074f-4d34-871a-9ca313eb79a7.png"> Horizontal: <img width="348" alt="Screen Shot 2022-10-28 at 4 27 59 PM" src="https://user-images.githubusercontent.com/13007381/198752611-0d303a78-60bd-49f6-a47b-acae3b8fccde.png"> <img width="310" alt="Screen Shot 2022-10-28 at 4 28 09 PM" src="https://user-images.githubusercontent.com/13007381/198752616-04943b0a-cb4d-4e41-a196-7829c2b83b7f.png"> <img width="263" alt="Screen Shot 2022-10-28 at 4 28 26 PM" src="https://user-images.githubusercontent.com/13007381/198752618-e9ad4221-4453-4ebf-bd57-113139267d5a.png"> <img width="285" alt="Screen Shot 2022-10-28 at 4 28 37 PM" src="https://user-images.githubusercontent.com/13007381/198752622-db2decc9-87bc-4f01-89d7-1e8b4d280e33.png"> Horizontal overflow: <img width="314" alt="Screen Shot 2022-10-28 at 4 28 44 PM" src="https://user-images.githubusercontent.com/13007381/198752631-1dbdc499-dc79-49b4-b4a2-14a35bf35c79.png"> <img width="277" alt="Screen Shot 2022-10-28 at 4 28 56 PM" src="https://user-images.githubusercontent.com/13007381/198752633-ecacd0ef-05c7-4b1c-a22e-ec61a1ac65e8.png"> <img width="314" alt="Screen Shot 2022-10-28 at 4 29 10 PM" src="https://user-images.githubusercontent.com/13007381/198752644-811004aa-e5ec-4d35-8754-327416220bc1.png"> ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> - Check that current native filters dividers look and work the same as they currently do. - Run Storybook locally off of this PR and open the `FilterDivider` component, which should contain **Vertical Filter Divider**, **Horizontal Filter Divider**, and **Horizontal Overflow Filter Divider**. Check that all three behave as expected with: - Short title - Long title - No description - Short description - Long description ### 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]
