-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Explore Vis]Simplify threshold logic #10909
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
base: main
Are you sure you want to change the base?
[Explore Vis]Simplify threshold logic #10909
Conversation
Signed-off-by: Qxisylolo <[email protected]>
Signed-off-by: Qxisylolo <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #10909 +/- ##
=======================================
Coverage 60.75% 60.76%
=======================================
Files 4533 4533
Lines 122206 122229 +23
Branches 20481 20491 +10
=======================================
+ Hits 74246 74267 +21
- Misses 42719 42722 +3
+ Partials 5241 5240 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| const newThreshold = threshold ?? []; | ||
|
|
||
| const newBaseColor = baseColor ?? getColors().statusGreen; | ||
| if (calculatedValue === undefined || calculatedValue < minBase) { |
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 seems we don't consider maxBase, I'm just thinking shall we also not consider minBase to make it consistent? so just make the text color solely based on thresholds.
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.
sure, updated
| result.unshift({ value: minBase, color: defaultColor }); | ||
| } | ||
|
|
||
| const valueResults: Threshold[] = []; |
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 would create another function to calculate the valueResults separately
Signed-off-by: Yulong Ruan <[email protected]>
Signed-off-by: Qxisylolo <[email protected]>
Description
this pr simplifies threshold logic
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jestyarn test:jest_integration