Skip to content
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

Merged
merged 10 commits into from
Jan 20, 2023
Merged

Conversation

aaranadev
Copy link
Contributor

@aaranadev aaranadev commented Jan 19, 2023

Description

This PR contains an improved ComparativeFormulaUI props interface with simplification and improvement of docs and tests.

Type of change

  • Fix
  • Refactor

Basic checklist

  • Good PR name
  • Changelog entry
  • Just one issue per PR
  • Proper status & reviewers
  • Tests
  • Documentation

@aaranadev aaranadev self-assigned this Jan 19, 2023
@aaranadev aaranadev changed the title Fix/comparative formula UI Improved Comparative Formula UI Jan 19, 2023
@coveralls
Copy link
Collaborator

coveralls commented Jan 19, 2023

Pull Request Test Coverage Report for Build 3966439936

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 71.823%

Totals Coverage Status
Change from base Build 3951081443: 0.02%
Covered Lines: 1895
Relevant Lines: 2445

💛 - Coveralls

Copy link
Contributor

@juandjara juandjara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +62 to +66
.map((d, i) => ({
...d,
color: getColor(colors, i)
}))
.filter((d) => d.value !== undefined),
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@VictorVelarde VictorVelarde self-assigned this Jan 19, 2023
Copy link
Contributor

@VictorVelarde VictorVelarde left a 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

@VictorVelarde VictorVelarde merged commit 34a04db into master Jan 20, 2023
@VictorVelarde VictorVelarde deleted the fix/ComparativeFormulaUI branch January 20, 2023 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants