-
Notifications
You must be signed in to change notification settings - Fork 16
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
Improved Comparative Formula UI #573
Conversation
Pull Request Test Coverage Report for Build 3966439936
💛 - Coveralls |
…eact into fix/ComparativeFormulaUI
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
.map((d, i) => ({ | ||
...d, | ||
color: getColor(colors, i) | ||
})) | ||
.filter((d) => d.value !== 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.
You're doing here first .map and then .filter, vs previous .filter > .map. Is it intended @aaranadev?
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.
Yes, we need to remove the undefined values, but we need to assign the correct color index before the element is removed it.
Example:
If the second value is undefined, we need the value after the first to have the third color and not the second.
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. We can land it after your filter / map confirmation
Description
This PR contains an improved ComparativeFormulaUI props interface with simplification and improvement of docs and tests.
Type of change
Basic checklist