Skip to content

Refactor Button component.#10824

Merged
nfmohit merged 9 commits intodevelopfrom
enhancement/10357-refactor-button-component
Jun 14, 2025
Merged

Refactor Button component.#10824
nfmohit merged 9 commits intodevelopfrom
enhancement/10357-refactor-button-component

Conversation

@ankitrox
Copy link
Copy Markdown
Collaborator

@ankitrox ankitrox commented May 26, 2025

Summary

Addresses issue:

Relevant technical choices

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.
  • Ensure there are no unexpected significant changes to file sizes.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 26, 2025

Build files for 8995d73 have been deleted.

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 26, 2025

Size Change: +3.54 kB (+0.17%)

Total Size: 2.14 MB

ℹ️ View Unchanged
Filename Size Change
./dist/assets/css/googlesitekit-admin-css-********************.min.css 62.8 kB 0 B
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css 11.8 kB 0 B
./dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 846 B 0 B
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 8.44 kB 0 B
./dist/assets/js/32-********************.js 2.76 kB 0 B
./dist/assets/js/33-********************.js 2.25 kB 0 B
./dist/assets/js/34-********************.js 3.64 kB 0 B
./dist/assets/js/35-********************.js 936 B 0 B
./dist/assets/js/36-********************.js 893 B 0 B
./dist/assets/js/37-********************.js 1.83 kB 0 B
./dist/assets/js/38-********************.js 3.12 kB 0 B
./dist/assets/js/analytics-advanced-tracking-********************.js 903 B 0 B
./dist/assets/js/blocks/reader-revenue-manager/block-editor-plugin/editor-styles.css 124 B 0 B
./dist/assets/js/blocks/reader-revenue-manager/block-editor-plugin/editor-styles.js 492 B 0 B
./dist/assets/js/blocks/reader-revenue-manager/block-editor-plugin/index.js 8.42 kB 0 B
./dist/assets/js/blocks/reader-revenue-manager/common/editor-styles.css 307 B 0 B
./dist/assets/js/blocks/reader-revenue-manager/common/editor-styles.js 492 B 0 B
./dist/assets/js/blocks/reader-revenue-manager/contribute-with-google/index.js 9.47 kB 0 B
./dist/assets/js/blocks/reader-revenue-manager/contribute-with-google/non-site-kit-user.js 8.95 kB 0 B
./dist/assets/js/blocks/reader-revenue-manager/subscribe-with-google/index.js 9.47 kB 0 B
./dist/assets/js/blocks/reader-revenue-manager/subscribe-with-google/non-site-kit-user.js 8.96 kB 0 B
./dist/assets/js/blocks/sign-in-with-google/editor-styles.css 84 B 0 B
./dist/assets/js/blocks/sign-in-with-google/editor-styles.js 492 B 0 B
./dist/assets/js/blocks/sign-in-with-google/index.js 18.1 kB 0 B
./dist/assets/js/googlesitekit-activation-********************.js 24.3 kB -7 B (-0.03%)
./dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 57.9 kB -33 B (-0.06%)
./dist/assets/js/googlesitekit-adminbar-********************.js 37.2 kB +12 B (+0.03%)
./dist/assets/js/googlesitekit-api-********************.js 10.4 kB +1 B (+0.01%)
./dist/assets/js/googlesitekit-components-********************.js 6.81 kB +335 B (+5.18%) 🔍
./dist/assets/js/googlesitekit-consent-mode-********************.js 25.6 kB 0 B
./dist/assets/js/googlesitekit-data-********************.js 2.38 kB +1 B (+0.04%)
./dist/assets/js/googlesitekit-datastore-forms-********************.js 9.13 kB 0 B
./dist/assets/js/googlesitekit-datastore-location-********************.js 2.08 kB -1 B (-0.05%)
./dist/assets/js/googlesitekit-datastore-site-********************.js 20.8 kB -2 B (-0.01%)
./dist/assets/js/googlesitekit-datastore-ui-********************.js 10.2 kB 0 B
./dist/assets/js/googlesitekit-datastore-user-********************.js 27.2 kB -1 B (0%)
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 68.7 kB -19 B (-0.03%)
./dist/assets/js/googlesitekit-events-provider-contact-form-7-********************.js 646 B 0 B
./dist/assets/js/googlesitekit-events-provider-easy-digital-downloads-********************.js 977 B 0 B
./dist/assets/js/googlesitekit-events-provider-mailchimp-********************.js 630 B 0 B
./dist/assets/js/googlesitekit-events-provider-ninja-forms-********************.js 717 B 0 B
./dist/assets/js/googlesitekit-events-provider-optin-monster-********************.js 675 B 0 B
./dist/assets/js/googlesitekit-events-provider-popup-maker-********************.js 634 B 0 B
./dist/assets/js/googlesitekit-events-provider-woocommerce-********************.js 1.36 kB 0 B
./dist/assets/js/googlesitekit-events-provider-wpforms-********************.js 633 B 0 B
./dist/assets/js/googlesitekit-i18n-********************.js 4.16 kB 0 B
./dist/assets/js/googlesitekit-main-dashboard-********************.js 150 kB +572 B (+0.38%)
./dist/assets/js/googlesitekit-metric-selection-********************.js 56.1 kB +4 B (+0.01%)
./dist/assets/js/googlesitekit-modules-********************.js 24.1 kB -3 B (-0.01%)
./dist/assets/js/googlesitekit-modules-ads-********************.js 52.8 kB -29 B (-0.05%)
./dist/assets/js/googlesitekit-modules-adsense-********************.js 134 kB +5 B (0%)
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 210 kB +552 B (+0.26%)
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 26.6 kB +7 B (+0.03%)
./dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 49 kB -45 B (-0.09%)
./dist/assets/js/googlesitekit-modules-search-console-********************.js 75.1 kB +13 B (+0.02%)
./dist/assets/js/googlesitekit-modules-sign-in-with-google-********************.js 36.5 kB +108 B (+0.3%)
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 33.1 kB 0 B
./dist/assets/js/googlesitekit-notifications-********************.js 56 kB +439 B (+0.79%)
./dist/assets/js/googlesitekit-polyfills-********************.js 377 B 0 B
./dist/assets/js/googlesitekit-settings-********************.js 137 kB +522 B (+0.38%)
./dist/assets/js/googlesitekit-splash-********************.js 75.2 kB -45 B (-0.06%)
./dist/assets/js/googlesitekit-user-input-********************.js 48.9 kB +452 B (+0.93%)
./dist/assets/js/googlesitekit-vendor-********************.js 313 kB +152 B (+0.05%)
./dist/assets/js/googlesitekit-widgets-********************.js 113 kB +523 B (+0.47%)
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 65.2 kB +24 B (+0.04%)
./dist/assets/js/runtime-********************.js 1.32 kB 0 B

compressed-size-action

Copy link
Copy Markdown
Collaborator

@nfmohit nfmohit left a comment

Choose a reason for hiding this comment

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

Brilliant work here, thank you @ankitrox!

I've left a few minor comments for your consideration. Please let me if you have any questions or concerns, thank you!

Comment thread assets/js/googlesitekit/components-gm2/Button/index.js Outdated
Comment thread assets/js/googlesitekit/components-gm2/Button/MaybeTooltip.js Outdated
Comment thread assets/js/googlesitekit/components-gm2/Button/MaybeTooltip.js Outdated
Comment thread assets/js/googlesitekit/components-gm2/Button/SemanticButton.js
Comment thread assets/js/googlesitekit/components-gm2/Button/MaybeTooltip.test.js Outdated
Comment thread assets/js/googlesitekit/components-gm2/Button/MaybeTooltip.test.js
Comment thread assets/js/googlesitekit/components-gm2/Button/SemanticButton.test.js Outdated
Comment thread assets/js/googlesitekit/components-gm2/Button/SemanticButton.test.js Outdated
@ankitrox
Copy link
Copy Markdown
Collaborator Author

Thank you @nfmohit for reviewing the PR and adding your valuable suggestions.

I've addressed the feedback and sending it your way to review those.

Thanks again!

Copy link
Copy Markdown
Collaborator

@nfmohit nfmohit left a comment

Choose a reason for hiding this comment

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

Thank you for addressing my feedback, @ankitrox!

I've left a few last-minute comments for your consideration. Please let me know if you have any questions or concerns, thank you!

Comment thread assets/js/googlesitekit/components-gm2/Button/MaybeTooltip.js Outdated
Comment thread assets/js/googlesitekit/components-gm2/Button/SemanticButton.js Outdated
Comment thread assets/js/googlesitekit/components-gm2/Button/SemanticButton.js
@ankitrox
Copy link
Copy Markdown
Collaborator Author

Thanks @nfmohit, I have made the changes suggested above. Assigning this to you for another review.

Copy link
Copy Markdown
Collaborator

@nfmohit nfmohit left a comment

Choose a reason for hiding this comment

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

LGTM, nice work, @ankitrox! ✅

@nfmohit nfmohit merged commit 1b60477 into develop Jun 14, 2025
22 checks passed
@nfmohit nfmohit deleted the enhancement/10357-refactor-button-component branch June 14, 2025 13:31
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.

2 participants