-
Notifications
You must be signed in to change notification settings - Fork 160
Description
Motivation
When users add multiple tags to dashboards, charts, or saved queries, the tags currently display in an unpredictable order. This creates a poor user experience because users cannot quickly scan for specific tags or understand the organization of their content.
Current Behavior
Tags are displayed in the order they are received from the backend or stored in state, which appears random to users.
Reproduction Steps:
- Navigate to a dashboard, chart, or saved query in Superset
- Add multiple tags to the item (e.g., "Zebra", "Apple", "Marketing", "Beta")
- Save and view the item
- Observe: The tags display in a non-alphabetical order that may change between page loads or different items
- Compare the same tags on different items
- Observe: The ordering is inconsistent across different views
Expected Behavior
Tags should be displayed in alphabetical order (case-insensitive) wherever they appear in the application. The ordering should be consistent across all views and should remain stable across page reloads.
Acceptance Criteria:
- Tags are sorted alphabetically (case-insensitive)
- The sorting is applied consistently across all instances where tags are displayed
- The sorting implementation uses memoization to avoid unnecessary re-computation
- The tag display order remains stable across page reloads and different views
Steps to Test
- Add multiple tags with different names (including mixed case) to a dashboard or chart
- Verify that the tags display in alphabetical order
- Reload the page and confirm the order remains consistent
- Check tags on multiple different items to ensure consistent ordering
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx