Skip to content

UnitControl : Deprecate 36px default size - #66791

Merged
mirka merged 12 commits into
WordPress:trunkfrom
hbhalodia:fix/issue-65751-deprecation-unitControl
Nov 29, 2024
Merged

mirka merged 12 commits into
WordPress:trunkfrom
hbhalodia:fix/issue-65751-deprecation-unitControl

Conversation

@hbhalodia

Copy link
Copy Markdown
Contributor

Part of #65751

What?

Deprecate the 36px default size in UnitControl.

Testing Instructions

  • Unit tests pass
  • Storybook stories should not log console warnings
  • All code snippets in documentation (JSDoc, Storybook, README) should have the __next40pxDefaultSize prop enabled

@hbhalodia
hbhalodia requested a review from ajitbohra as a code owner November 6, 2024 11:42
@github-actions

github-actions Bot commented Nov 6, 2024 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@hbhalodia hbhalodia mentioned this pull request Nov 6, 2024
24 of 25 tasks
@hbhalodia

Copy link
Copy Markdown
Contributor Author

Hi @mirka, Some of this unit test are failing because, this UnitControl component is used inside BoxControl component, So once we add this PR - #66704, then I guess then it would have __next40pxdefaultsize prop being passed with component as prop drill and unit test would not fail.

Let me know if we have some other approach to handle this case?

Thank You,

@hbhalodia
hbhalodia requested a review from mirka November 28, 2024 05:59
@hbhalodia

Copy link
Copy Markdown
Contributor Author

Hi @mirka, Some of this unit test are failing because, this UnitControl component is used inside BoxControl component, So once we add this PR - #66704, then I guess then it would have __next40pxdefaultsize prop being passed with component as prop drill and unit test would not fail.

Let me know if we have some other approach to handle this case?

Thank You,

This is now fixed, checked the comment - #65751 (comment), and updated the PR to not log warning from the child component used.

Thank You,

@mirka mirka added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components Needs Dev Note Requires a developer note for a major WordPress release cycle labels Nov 28, 2024
Comment thread packages/components/CHANGELOG.md Resolved
@hbhalodia
hbhalodia requested a review from mirka November 29, 2024 05:28
@hbhalodia

Copy link
Copy Markdown
Contributor Author

Hi @mirka, Updated the PR with requested changes and the suggestions 🙇.

@mirka mirka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the meticulous work! I'm just going to revert the changes on font-size-picker/index.native.js, because *.native.js files are for the mobile app and are mostly unrelated to the normal component code we're working on.

@mirka
mirka enabled auto-merge (squash) November 29, 2024 14:46
@hbhalodia

Copy link
Copy Markdown
Contributor Author

Thank you for the meticulous work! I'm just going to revert the changes on font-size-picker/index.native.js, because *.native.js files are for the mobile app and are mostly unrelated to the normal component code we're working on.

Got the point 👍

@mirka
mirka merged commit edd6328 into WordPress:trunk Nov 29, 2024
@github-actions github-actions Bot added this to the Gutenberg 19.9 milestone Nov 29, 2024
im3dabasia pushed a commit to im3dabasia/gutenberg that referenced this pull request Dec 4, 2024
* Add the console warning for 36px size variation

* Add the changelog for the deprecation

* Update the unit test for the unitcontrol to use default 40px size

* Use __shouldNotWarnDeprecated36pxSize to not throw redundant warning from parent component used

* Add the missing prop for __next40pxDefaultSize on the index file and updated readme as well

* Add changelog to unreleased section

* Add __shouldNotWarnDeprecated36pxSize prop to supress console warning from child component

* Update tools panel storybook and docs to use __next40pxDefaultSize for UnitControl

* Updated the unit test to minimise the file changes

* Revert changes on mobile FontSizePicker

---------

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
michalczaplinski pushed a commit that referenced this pull request Dec 5, 2024
* Add the console warning for 36px size variation

* Add the changelog for the deprecation

* Update the unit test for the unitcontrol to use default 40px size

* Use __shouldNotWarnDeprecated36pxSize to not throw redundant warning from parent component used

* Add the missing prop for __next40pxDefaultSize on the index file and updated readme as well

* Add changelog to unreleased section

* Add __shouldNotWarnDeprecated36pxSize prop to supress console warning from child component

* Update tools panel storybook and docs to use __next40pxDefaultSize for UnitControl

* Updated the unit test to minimise the file changes

* Revert changes on mobile FontSizePicker

---------

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
@Mamaduka Mamaduka mentioned this pull request Mar 12, 2025
45 of 49 tasks
@hbhalodia
hbhalodia deleted the fix/issue-65751-deprecation-unitControl branch November 17, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Dev Note Requires a developer note for a major WordPress release cycle [Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants