-
Notifications
You must be signed in to change notification settings - Fork 851
RecordMeterBar Component: Adds a prop to display legend count after label #24474
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
Conversation
|
Caution: This PR has changes that must be merged to WordPress.com |
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. |
bad7743 to
6aa5c4a
Compare
1b0415e to
f14112f
Compare
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.
Looks good! Marking for wider review.
projects/js-packages/components/components/record-meter-bar/style.scss
Outdated
Show resolved
Hide resolved
projects/js-packages/components/components/record-meter-bar/style.scss
Outdated
Show resolved
Hide resolved
manzoorwanijk
left a comment
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.
Looks great.
|
Great news! One last step: head over to your WordPress.com diff, D81297-code, and deploy it. Thank you! |
| /** | ||
| * The formatting style for legend item display. If not provided, it defaults to showing legend label after count | ||
| */ | ||
| showLegendLabelBeforeCount: boolean; |
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.
This should have been marked as optional for backward compatibility. It breaks TS types for existing consumer components.
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.
Sorry we both missed this in review @manzoorwanijk!
Would you like us to spin up a PR to address this specifically or are you happy to cover it in #24329?
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.
Sorry we both missed this in review @manzoorwanijk!
Yeah, that's why there are those CI checks in place to eliminate human error.
Would you like us to spin up a PR to address this specifically or are you happy to cover it in #24329?
I already added a fix for it in #24329. Thank you.
* Add TS check to build step for js-packages/components * Use tsconfig in order to use tsc * Add TS check to build step for plugins/jetpack * Fix TS errors * Add changelog files * Tell TS that we are not passing 'external-link' as variant to WPButton * [not verified] Revert "Tell TS that we are not passing 'external-link' as variant to WPButton" This reverts commit 36b7295. * Add global declaration file to avoid adding it at too many places * Remove unused module that results in TS error * Add TS check to build step for plugins/boost * Fix versions * Fix the types broken in #24474
|
r246578-wpcom |


This PR alters the RecordMeterBar component to take an optional legend formatting prop. When passed in as true, the legend displays with the count after the label instead of before.
Does this pull request change what data or activity we track or use?
no
Testing instructions:
cd projects/js-packages/storybook && npm run storybook:devand confirm that you see RecordMeterBar component in Storybook.You can also run the unit tests for js-packages/components by running
jetpack test.