-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
Conversation
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
|
@@ -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% |
There was a problem hiding this comment.
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
(?)
There was a problem hiding this comment.
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 ...
There was a problem hiding this comment.
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!
There was a problem hiding this 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 |
---|---|---|
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.
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.
This comment was marked as resolved.
Sorry, something went wrong.
@msyavuz Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
@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`, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ....
There was a problem hiding this 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
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. |
Curious what semantic you would introduce? something like |
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). Also since user's will use Ant Design's theme editor to customize their theme, none of the options seem good enough:
So yes, design constraints seem like the easier/most straightforward option out of these |
SUMMARY
Fixes for various theming visuals
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
Before:
After:

Before:
After:

Before:
Before:
After:

Before:
After:

TESTING INSTRUCTIONS
ADDITIONAL INFORMATION