-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix(ui): fixed table threshold bug and added option to make thresholds populate text or background #16430
Conversation
…s populate text or background
@@ -42,7 +42,7 @@ class TableCell extends PureComponent<Props> { | |||
onClick={this.handleClick} | |||
data-column-index={columnIndex} | |||
data-row-index={rowIndex} | |||
data-testID={`${data}-table-header`} | |||
data-testid={`${data}-table-header`} |
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 was to fix a lingering linter error
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.
🤦♂
@@ -57,7 +57,7 @@ const ThresholdSetting: FunctionComponent<Props> = ({ | |||
} else if (type === COLOR_TYPE_MAX) { | |||
label = 'Maximum' | |||
} else { | |||
label = 'Value is <=' | |||
label = 'Value is >=' |
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 change more accurately reflects the functionality of setting the thresholds
@@ -119,3 +119,13 @@ export const DEFAULT_THRESHOLDS_LIST_COLORS = [ | |||
value: 0, | |||
}, | |||
] | |||
|
|||
export const DEFAULT_THRESHOLDS_TABLE_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.
updated the base table color based on discussions with @alexpaxton on what would look best
@@ -88,10 +85,6 @@ export const generateThresholdsListHexs = ({ | |||
lastValueNumber | |||
) | |||
|
|||
if (cellType === 'table') { |
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.
removing these lines reverted the functionality to its original format, restoring it to what it was originally supposed to do
@@ -131,6 +132,9 @@ export class TableOptions extends Component<Props, {}> { | |||
onSetThresholds={onSetColors} | |||
/> | |||
</Grid.Column> | |||
<Grid.Column> |
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.
adds a toggle to allow users to switch between threshold colors being set to the background or text color
lgtm |
…s populate text or background (#16430) fix(ui): fixed table threshold bug and added option to make thresholds populate text or background
Closes #16309
Closes #16359
Problem
Table thresholds were automatically populating the background color rather than giving users an option.
Solution
Added option to toggle between views for table threshold so user can set background or text color. Changed the default table threshold base color to white after speaking with @alexpaxton about design and the need for a default base color.