Repository navigation
feat(theming): backport the custom label tokens - #47
Merged
Merged
Conversation
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
1 of 6 tasks
2 of 6 tasks
lefort-a
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
Backport of apache#38679 (commit
86a260e39b) to6.2-mgdis. Ticket: PLAID-154055.In 6.2,
PublishedLabelsets the text colour of the "Published" and "Draft" labels inline, fromcolorSuccessTextandcolorPrimaryText.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
!importantcan do this, and a change ofcolorSuccesschanges every success state.This commit adds the
labelPublished*andlabelDraft*theme tokens.The MGDIS image then sets these colours in
THEME_DEFAULT, without CSS.Compatibility with 6.2:
PublishedLabelalready uses in 6.2.BEFORE/AFTER SCREENSHOTS
Target (
5.0-mgdis) and current state (6.2-mgdis), dashboard list and dashboard header:The "after" screenshot comes when the
6.2-mgdisimage includes this commit andTHEME_DEFAULTsets the tokens.TESTING INSTRUCTIONS
npm run test -- PublishedLabel DatasetTypeLabel antdTokenNameslabelPublishedBg,labelPublishedBorderColor,labelPublishedColorandlabelPublishedIconColorinTHEME_DEFAULT, then open/dashboard/list/.ADDITIONAL INFORMATION