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

Counter visualization: formatting not applied to target value #4035

Merged
merged 1 commit into from
Aug 4, 2019

Conversation

kravets-levko
Copy link
Collaborator

@kravets-levko kravets-levko commented Aug 2, 2019

What type of PR is this? (check all applicable)

  • Refactor
  • Bug Fix

Description

Refactor:

  • extracted formatting logic to a function (and revisited it) - so it will be easier later move it to db migration (added TODO to explain it);
  • fixed some edge case handling (e.g. when target value column selected but it's not a number - previously counter highlighted "trend negative" value and showed an empty target value);
  • replaced underscore.string/numberFormat with numeral and removed underscore.string dependency - it was the only file that used it;
  • replaced AngularJS number filter with numeral (for consistency and to simplify future React migration); added tooltipFormat options that currently just matches number filter behavior; added TODO to implement this option in editor.

Related Tickets & Documents

Fixes #4031

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Before:
image

After:
image

@kravets-levko
Copy link
Collaborator Author

@susodapop You're welcome to test the fix as well 🙇‍♂️

@susodapop
Copy link
Contributor

image
Yeah it works properly on my example!

@@ -1,5 +1,5 @@
import numberFormat from 'underscore.string/numberFormat';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@ranbena ranbena left a comment

Choose a reason for hiding this comment

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

LGTM

@ranbena
Copy link
Contributor

ranbena commented Aug 2, 2019

image
Yeah it works properly on my example!

Damn @susodapop you don't got Roboto on your system. Until we fix it, can you install it on your OS (for the vids)?

@arikfr arikfr merged commit 9eabf89 into master Aug 4, 2019
@arikfr arikfr deleted the counter-target-value-format branch August 4, 2019 12:22
@susodapop
Copy link
Contributor

@ranbena You are way better at spotting fonts than I am! I downloaded Roboto to my system. Previous to that the counter was rendered in San Francisco.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Counter Target Value formatting doesn't match Counter Value
4 participants