Skip to content
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

Components: refactor InputControl to pass exhaustive-deps #41601

Merged
merged 2 commits into from
Jun 14, 2022

Conversation

chad1008
Copy link
Contributor

@chad1008 chad1008 commented Jun 8, 2022

What?

Updates the InputControl component to satisfy the exhaustive-deps eslint rule

Why?

Part of the effort in #41166 to apply exhuastive-deps to the Components package

How?

Add the dragCursor prop to the dep array.

Testing Instructions

  1. From your local Gutenberg directory, run npx eslint --rule 'react-hooks/exhaustive-deps: warn' packages/components/src/input-control
  2. Confirm that the linter returns no errors
  3. Confirm unit tests still pass
  4. Run Storybook locally, confirm the components stories and/or docs still work as expected.
  5. Also in Storybook, test the NumberControl component to confirm dragging still works (NumberControl is build on InputControl and is a good place to test the dragging functionality)

@chad1008 chad1008 added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components [Feature] Component System WordPress component system labels Jun 8, 2022
@chad1008 chad1008 requested review from mirka and ciampo June 8, 2022 16:26
@chad1008 chad1008 self-assigned this Jun 8, 2022
@chad1008 chad1008 marked this pull request as ready for review June 8, 2022 16:27
@chad1008 chad1008 requested a review from ajitbohra as a code owner June 8, 2022 16:27
Copy link
Member

@mirka mirka left a comment

Choose a reason for hiding this comment

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

Looks good!

@ciampo ciampo added this to In progress (owned) ⏳ in WordPress Components via automation Jun 10, 2022
@chad1008 chad1008 force-pushed the enhance/InputControl-exhaustive-deps branch from 3adbc6b to 6e7dd22 Compare June 14, 2022 18:15
@chad1008 chad1008 merged commit de760f9 into trunk Jun 14, 2022
WordPress Components automation moved this from In progress (owned) ⏳ to Done 🎉 Jun 14, 2022
@chad1008 chad1008 deleted the enhance/InputControl-exhaustive-deps branch June 14, 2022 19:20
@github-actions github-actions bot added this to the Gutenberg 13.5 milestone Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Component System WordPress component system [Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants