-
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
Add formatter to central text in PieWidgetUI #843
Conversation
Pull Request Test Coverage Report for Build 8099436624Details
💛 - Coveralls |
Visit the preview URL for this PR (updated for commit abd2547): https://cartodb-fb-storybook-react-dev--pr843-feat-add-central-nmfupptg.web.app (expires Thu, 07 Mar 2024 16:42:13 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 517cc4d31d7e09cf277774e034094b67c301cd4c |
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.
Have a look at it please @vmilan, LGTM
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.
Could you add an example of use in storybook and a new entry in the changelog? 🙏
The approach LGTM, just 2 caveats:
Thx for the help here @jantolg |
fix: remove default props formatter ui
chore: add entry to CHANGELOG.md
I've just to add an example of storybook, a new changelog entry, and a default behaviour of formatter based on useIntl.formatNumber |
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've seen a weird behavior in the storybook generated with your changes:
https://cartodb-fb-storybook-react-dev--pr843-feat-add-central-nmfupptg.web.app/?path=/docs/widgets-piewidgetui--default
master:
https://storybook-react.carto.com/?path=/docs/widgets-piewidgetui--default
At least in Storybook something is broken.
Screen.Recording.2024-03-01.at.09.49.43.mov
Please check the widget is still working properly, we use it in Builder.
I close this PR. Upon reviewing the behavior, maybe using the same formatter for units and percentage values is not a good approach, as it represents two different types of values. After discussing this issue with @aaranadev and @menusal, we believe it would be better to have a separate formatter for each type of value. I have created a new PR with these changes to avoid mixing different approaches. NOTE: It might be worth considering a standardized approach for using formatters, perhaps by unifying all formatters into a single property or something similar. This would be a good topic to open a discussion about for future C4R versions Continue in this new PR #844 |
Description
Add to central text in PieChartUI the same text formatter
Acceptance
Please describe how to validate the feature or fix