-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(bi): Table conditional formatting #24954
Conversation
Size Change: +660 B (+0.06%) Total Size: 1.1 MB ℹ️ View Unchanged
|
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.
awesome
) | ||
} | ||
|
||
const DEFAULT_PICKER_COLORS = [ |
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.
Where do these colors come from?
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.
Hand-picked by me from some online colour palettes - they're not perfect, but we don't have any good defined colours to use that look good with a dark foreground colour (e.g., the colour of the text). Will chat to Cory at some point to define these better
source: props.query.source, | ||
}) | ||
}, | ||
style: (_, data) => { |
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.
Is this conditional formatting only meant for tables?
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.
Yep, only for Table
display
|
||
export const ConditionalFormattingTab = (): JSX.Element => { | ||
const { isDarkModeOn } = useValues(themeLogic) | ||
const { conditionalFormattingRules, conditionalFormattingRulesPanelActiveKeys } = useValues(dataVisualizationLogic) |
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.
NIT: i'm not sure what the right way to do this is but I just wonder if we should be splitting out the rules into a separate logic too so that dataVisualizationLogic doesn't continue to vacuum up responsibilities
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.
Yeah, it's a bit tough - Each rule has a keyed logic to handle its state, then I'd need a containing logic for managing the rules themselves. dataVisualizationLogic
has been taking quite the hit recently - it's just shy of 1,000 lines now. WIll look into splitting it up soon!
Changes
Screen.Recording.2024-09-12.at.18.03.27.mov
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
See video