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 DateDayPicker to pass exhaustive-deps #41470

Merged
merged 3 commits into from
Jun 2, 2022

Conversation

chad1008
Copy link
Contributor

@chad1008 chad1008 commented May 31, 2022

What?

Updates the DateDayPicker component to satisfy the exhaustive-deps eslint rule (specifically by updating the ControlPoints subcomponent)

Why?

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

How?

add the day prop to the useEffect dependency array

Testing Instructions

  1. From your local Gutenberg directory, run npx eslint --rule 'react-hooks/exhaustive-deps: warn' packages/components/src/date-time
  2. Confirm that the linter returns no errors
  3. Confirm unit tests still pass
  4. Test the component in Storybook, confirm stories and/or docs still work as expected

@chad1008 chad1008 self-assigned this May 31, 2022
@chad1008 chad1008 requested review from ciampo and mirka May 31, 2022 18:52
@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 May 31, 2022
@chad1008 chad1008 marked this pull request as ready for review May 31, 2022 18:53
@chad1008 chad1008 requested a review from ajitbohra as a code owner May 31, 2022 18:53
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!

@chad1008 chad1008 force-pushed the enhance/DatePicker-exhaustive-deps branch from 148c110 to 037580c Compare June 1, 2022 17:27
@chad1008 chad1008 force-pushed the enhance/DatePicker-exhaustive-deps branch from 037580c to 6b68a6c Compare June 2, 2022 09:39
@chad1008 chad1008 merged commit 97fc302 into trunk Jun 2, 2022
@chad1008 chad1008 deleted the enhance/DatePicker-exhaustive-deps branch June 2, 2022 12:31
@github-actions github-actions bot added this to the Gutenberg 13.5 milestone Jun 2, 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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants