Skip to content

Issue #11 - [BUG] Tags display in inconsistent order instead of alphabetically #32

@rogelio-cmj

Description

@rogelio-cmj

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:

  1. Navigate to a dashboard, chart, or saved query in Superset
  2. Add multiple tags to the item (e.g., "Zebra", "Apple", "Marketing", "Beta")
  3. Save and view the item
  4. Observe: The tags display in a non-alphabetical order that may change between page loads or different items
  5. Compare the same tags on different items
  6. 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

  1. Add multiple tags with different names (including mixed case) to a dashboard or chart
  2. Verify that the tags display in alphabetical order
  3. Reload the page and confirm the order remains consistent
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions