Skip to content

feat(theming): backport the custom label tokens - #47

Merged
legal-s merged 1 commit into
6.2-mgdisfrom
feat/PLAID-154055-label-tokens
Nov 25, 2026
Merged

legal-s merged 1 commit into
6.2-mgdisfrom
feat/PLAID-154055-label-tokens

Conversation

@legal-s

@legal-s legal-s commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

SUMMARY

Backport of apache#38679 (commit 86a260e39b) to 6.2-mgdis. Ticket: PLAID-154055.

In 6.2, PublishedLabel sets the text colour of the "Published" and "Draft" labels inline, from colorSuccessText and colorPrimaryText.

The MGDIS theme shows "Published" in light blue and "Draft" in grey, as in 5.0-mgdis.
With 6.2, only a CSS rule with !important can do this, and a change of colorSuccess changes every success state.

This commit adds the labelPublished* and labelDraft* theme tokens.
The MGDIS image then sets these colours in THEME_DEFAULT, without CSS.

Compatibility with 6.2:

  • The cherry-pick applies without conflict. The diff is the same as the upstream diff.
  • The changed files import only modules that PublishedLabel already uses in 6.2.
  • Superset 7.0 includes this commit, so the backport goes away with the 7.0 upgrade.

BEFORE/AFTER SCREENSHOTS

Target (5.0-mgdis) and current state (6.2-mgdis), dashboard list and dashboard header:

1-dashboard-list-5 0-mgdis 2-dashboard-list-6 2-mgdis

The "after" screenshot comes when the 6.2-mgdis image includes this commit and THEME_DEFAULT sets the tokens.

TESTING INSTRUCTIONS

  • npm run test -- PublishedLabel DatasetTypeLabel antdTokenNames
  • Set labelPublishedBg, labelPublishedBorderColor, labelPublishedColor and labelPublishedIconColor in THEME_DEFAULT, then open /dashboard/list/.

ADDITIONAL INFORMATION

  • Has associated issue: PLAID-154055
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
  • Introduces new feature or API (theme tokens)
  • Removes existing feature or API

Backport of apache#38679 to 6.2-mgdis.
In 6.2, PublishedLabel sets the colour of its text inline, from the success and primary tokens.
A theme cannot give the published and draft labels other colours without a CSS rule with !important.
The labelPublished* and labelDraft* tokens let THEME_DEFAULT set these colours.
The commit applies without change, and it uses only modules that exist in 6.2.
Superset 7.0 includes this commit, so the backport goes away with the 7.0 upgrade.

(cherry picked from commit 86a260e)

PLAID-154055
@legal-s
legal-s removed the request for review from brenot-a November 25, 2026 16:33
@legal-s
legal-s merged commit 284b3a7 into 6.2-mgdis Nov 25, 2026
67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants