-
Notifications
You must be signed in to change notification settings - Fork 525
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
feat: basic theme builder layout with qualitative scale customization #2926
feat: basic theme builder layout with qualitative scale customization #2926
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
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.
few small questions. no blockers!
.writeText(JSON.stringify(config, null, 2)) | ||
.then(() => { | ||
setCopyStatus("Copied successfully."); | ||
return "Theme config copied to clipboard"; |
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.
Does this string get used at all?
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.
It does not 😬 but the linter complains about .then() not returning anything, so I just put that in there.
</div> | ||
<h2>Theme Config Preview</h2> | ||
<pre style={codeStyles}>{JSON.stringify(config, null, 2)}</pre> | ||
<button onClick={handleClose} style={closeButtonStyles}> |
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.
maybe an aria-label here 🤔
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'll fix this in my next PR
|
||
const ThemeBuilder = () => { | ||
const [activeTheme, setActiveTheme] = React.useState<ThemeOption>(themes[0]); | ||
const [activeColorScale] = React.useState<ColorScalePropType | undefined>( |
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.
can this state be removed? doesn't look like it's being changed anywhere
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'm going to add a handler for adjusting the color scale in my next PR so I added this for now so that the charts could read from this state.
Description
This adds some basic functionality and layout updates for the theme builder app:
Screen recording:
(Doesn't show the native color picker UI dropdown 🥲)
Type of Change
How Has This Been Tested?
Tested on Chrome, desktop