Skip to content

fix(theming): Theming visual fixes #34253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 22, 2025
Merged

Conversation

msyavuz
Copy link
Member

@msyavuz msyavuz commented Jul 21, 2025

SUMMARY

Fixes for various theming visuals

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

  1. Filters overlapping with action buttons:
    Before:
image After: image
  1. UploadDataModal fixes to titles, collapse sizes and remove metadata
    Before:
image

After:
image

  1. Secondary buttons contrast
    Before:
image

After:
image

  1. Delete modal spacing
    Before:
image After: image
  1. Async Ace Editor
    Before:
image

After:
image

  1. Explore columns and metrics
    Before:
image

After:
image

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue: Fixes Dark Mode: Text formatting and Visibility Issue in UI #34260
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

Copy link

korbit-ai bot commented Jul 21, 2025

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

@@ -75,13 +74,9 @@ const verticalStyle = (theme: SupersetTheme, width: number) => css`

background: linear-gradient(
${rgba(theme.colors.grayscale.light5, 0)},
${theme.colors.grayscale.light5} 60%
${theme.colors.grayscale.light5} 20%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use one of the colorBg.* for this. Guessing colorBgLayout or colorBgContainer (?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we still have the task to deprecate all theme.colors.* in the repo ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, this file has some more of those. I might as well touch them while at it. Done!

@rusackas rusackas requested a review from geido July 21, 2025 17:44
@rusackas rusackas added review:draft review:checkpoint Last PR reviewed during the daily review standup labels Jul 21, 2025
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jul 21, 2025
@msyavuz msyavuz marked this pull request as ready for review July 21, 2025 20:55
@dosubot dosubot bot added the global:theming Related to theming Superset label Jul 21, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Readability Unexplained Magic Number in Gradient ▹ view 🧠 Not in scope
Files scanned
File Path Reviewed
superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.stories.tsx
superset-frontend/src/features/databases/UploadDataModel/styles.ts
superset-frontend/packages/superset-ui-core/src/components/Modal/types.ts
superset-frontend/packages/superset-ui-core/src/components/DeleteModal/index.tsx
superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx
superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx
superset-frontend/src/components/ImportModal/index.tsx
superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx
superset-frontend/src/features/databases/UploadDataModel/index.tsx

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Comment on lines 75 to 78
background: linear-gradient(
${rgba(theme.colors.grayscale.light5, 0)},
${theme.colors.grayscale.light5} 60%
${rgba(theme.colorBgLayout, 0)},
${theme.colorBgElevated} 20%
);

This comment was marked as resolved.

@msyavuz msyavuz requested a review from mistercrunch July 22, 2025 15:14
@michael-s-molina michael-s-molina removed the review:checkpoint Last PR reviewed during the daily review standup label Jul 22, 2025
Copy link
Contributor

@msyavuz Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments

Copy link
Contributor

@msyavuz Ephemeral environment spinning up at http://34.222.10.23:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.

@@ -134,6 +133,11 @@ export function Button(props: ButtonProps) {
'& > span > :first-of-type': {
marginRight: firstChildMargin,
},
':not(:hover)': effectiveButtonStyle === 'secondary' && {
// Increase contrast for secondary buttons
backgroundColor: `${tinycolor(theme.colorPrimaryBg).darken(2).toHexString()} !important`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally here we use colorPrimary.* instead of darken/lighten

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use these?

Image

Copy link
Member Author

@msyavuz msyavuz Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into this but using colorPrimaryHover or Border for the background of secondary button seemed off semantically. Do you think it's better than using lighten/darken? Nevermind saw the comment below

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to move forward with this, could extend the framework with extra semantics for color.*Bg{something} if there's a clear need for more semantics ....

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment on leveraging colorPrimary.* tokens instead of lighten/darken, but approving regadless. Please use the right tokens if they exist or the best one as proxy if they don't

@mistercrunch
Copy link
Member

One option would be to add a TODO or NOTE of some kind when we abuse the semantics for a particular shade by using a proxy.

@msyavuz
Copy link
Member Author

msyavuz commented Jul 22, 2025

What i am finding out now is that we don't really have a good option when it comes to contrast for secondary button:

image

I went with the lightest and darkest here, which is slightly better than what we had before. I think we might need to extend the framework for buttons specifically since we are customizing it so much to our needs. Altering the algorithm for our default themes also should work.

@mistercrunch
Copy link
Member

mistercrunch commented Jul 22, 2025

I think we might need to extend the framework for buttons specifically since we are customizing it so much to our needs.

Curious what semantic you would introduce? something like colorPrimaryBgSecondary? Noting that it might be a bit of a mess since the darkAlgorithm is what generates a lot of the shading with builtin logic. Might be better to establish design constraints, telling @kasiazjc she has to work with the shades/tokens in the framework (?)

@msyavuz
Copy link
Member Author

msyavuz commented Jul 22, 2025

If we need a secondary button we can introduce seed tokens for it and extend the algorithm to produce necessary map tokens (in the default themes). colorSecondary colorSecondaryBg etc. It will mean diversion from Antd but we already do that.

Also since user's will use Ant Design's theme editor to customize their theme, none of the options seem good enough:

  1. Introduce colorSecondary as a seed token: Doesn't exist on the theme editor
  2. Use semantically incorrect tokens: Unexpected colors that doesn't reflect in theme editor.
  3. Lighten/Darken: Same thing as the first one but smaller impact.

So yes, design constraints seem like the easier/most straightforward option out of these

@msyavuz msyavuz merged commit 1df5e59 into master Jul 22, 2025
56 checks passed
@msyavuz msyavuz deleted the msyavuz/fix/theming-visual-bugs branch July 22, 2025 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dark Mode: Text formatting and Visibility Issue in UI
4 participants