Skip to content

Conversation

aaronrobertshaw
Copy link
Contributor

@aaronrobertshaw aaronrobertshaw commented Feb 2, 2022

Related: #37769

Description

The UnitControl passes through props to an underlying InputControl component. The InputControl accepts an __unstabledInputWidth prop while the UnitControl types omit this.

This PR adds __unstableInputWidth to the UnitControlProps type.

Testing Instructions

  1. Confirm the __unstableInputWidth prop's type for the UnitControl matches the InputControl's.
  2. Check there are no errors when running npm run build:package-types
  3. Test that the UnitControl continues to function in the Storybook: npm run storybook:dev

Types of changes

Bug fix.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).
  • I've updated related schemas if appropriate.

@aaronrobertshaw aaronrobertshaw added [Type] Bug An existing feature does not function as intended [Feature] UI Components Impacts or related to the UI component system labels Feb 2, 2022
@aaronrobertshaw aaronrobertshaw self-assigned this Feb 2, 2022
Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

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

Good catch, thanks @aaronrobertshaw! This is a property we need exposed on the UnitControl component, so adding it in here makes good sense to me 👍

✅ Confirmed the __unstableInputWidth prop's type for the UnitControl matches the InputControl's.
✅ Checked there are no errors when running npm run build:package-types
✅ Tested that the UnitControl continues to function in the Storybook: npm run storybook:dev and in real world usage in the editor (e.g. padding / cover block min height)

LGTM!

@aaronrobertshaw aaronrobertshaw merged commit 696f33c into trunk Feb 3, 2022
@aaronrobertshaw aaronrobertshaw deleted the add/unstable-input-width-to-unit-control-types branch February 3, 2022 00:04
@github-actions github-actions bot added this to the Gutenberg 12.6 milestone Feb 3, 2022
@aaronrobertshaw
Copy link
Contributor Author

Changelog for this will be added via: #38469

@ciampo ciampo added the [Package] Components /packages/components label Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants