-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
chore(explore): update Explore icons and icon colors #20612
chore(explore): update Explore icons and icon colors #20612
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20612 +/- ##
=======================================
Coverage 66.27% 66.27%
=======================================
Files 1757 1757
Lines 66955 67019 +64
Branches 7109 7129 +20
=======================================
+ Hits 44374 44417 +43
- Misses 20766 20777 +11
- Partials 1815 1825 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. |
@@ -78,12 +82,13 @@ const ControlHeader: FC<ControlHeaderProps> = ({ | |||
> | |||
{description && ( | |||
<span> | |||
<InfoTooltipWithTrigger |
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.
Remove InfoTooltipWithTrigger
import in this file
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's still used on line 96 to render the lightning bolt icon, do you think I should replace that with a plain <Tooltip>...</Tooltip>
as well?
Hi @codyml. |
Hi @EugeneTorap, The motivation for this was to not show red right away on new charts because it can make the user think they've done something wrong right from the beginning, which isn't great for user experience. But, I'm going to darken the blue color, which hopefully will make it a little more visible, and I'm also going to try to change it so it's only blue if they've never added an item to a required field on a new chart, and after that if they clear a required field on a new or existing chart it'll show the error in red. Does that sound like a good improvement? |
4223fe1
to
cf01c1f
Compare
cf01c1f
to
9f86ca0
Compare
@michael-s-molina @kasiazjc Implemented design feedback: color updated to be yellow and the label of the required field (e.g. "Metrics") stays black. "After" screen capture in PR description has been updated. |
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.
hasHadNoErrors.current = true; | ||
} | ||
|
||
return hasHadNoErrors.current |
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 tend to avoid doing this. It would be better to unpack this logic for better readability
import { | ||
ExclamationCircleOutlined, | ||
InfoCircleOutlined, | ||
} from '@ant-design/icons'; |
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 don't import icons directly from Antdesign. You need to use the Icons
component that comes with Antdesign icons built-in as well
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.
Oops thanks! I've done that a couple of other times, I can open another PR that fixes the others.
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.
If those are not too many, since we have to change them here, it might be a good idea to change them in this PR but I am happy to change the others in a separate PR as long as we fix the ones in this PR
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.
No worries I'll do it 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.
Actually, it turns out the directly-imported AntD icons render different HTML/styles from the Icons
-rendered ones: there's an extra wrapper element and it resets the font size. I found 10 or so instances of directly importing AntD icons and swapping them out caused a bunch of layout bugs. I need to look into this further to try to fix the layout bug you found above, because I think that may be caused by my inconsistently switching to direct AntD import in some places in this PR, but I think switching them out across the codebase will be a more involved process that might be better done in a different PR.
9f86ca0
to
47787d2
Compare
47787d2
to
5e3a927
Compare
/testenv up |
@rusackas Ephemeral environment spinning up at http://52.26.8.229:8080. Credentials are |
@@ -40,6 +40,16 @@ export type ControlHeaderProps = { | |||
danger?: string; | |||
}; | |||
|
|||
const iconStyles = css` |
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.
This is fine for now, but let's talk about this chunk in person sometime. I'd love to be in a state where we don't need to be adding/overriding/tweaking Icon styles in any particular use/implementation, instead adding classes/config/props on the Icon component itself to handle these needs more globally.
@@ -531,14 +588,23 @@ export const ControlPanelsContainer = (props: ControlPanelsContainerProps) => { | |||
placement="right" | |||
title={props.errorMessage} | |||
> | |||
<i className="fa fa-exclamation-circle text-danger fa-lg" /> |
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 can't tell you how happy it makes me to see these fa-* icons fading away one by one :D
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.
LGTM!!!! THANK YOU to everyone involved, especially @codyml for all the due diligence here.
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
This PR changes the info and error icons on the Explore screen to AntD icons, and makes the validation error color
blueyellow instead of red if required fields aren't filled because the user just created a new chart or selected a new viz type. If the user clears required fields that were previously filled, the validation color is still red.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
Before.mov
After:
Screen.Recording.2022-07-15.at.1.17.54.PM.mov
TESTING INSTRUCTIONS
blueyellow instead of red.blueyellow instead of red.ADDITIONAL INFORMATION