-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(TimePicker): class -> functional component #9921
feat(TimePicker): class -> functional component #9921
Conversation
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 01e8eff 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/617c9f9aca0ffe00086935c1 😎 Browse the preview: https://deploy-preview-9921--carbon-react-next.netlify.app |
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 01e8eff 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/617c9f9a9796080008110a88 😎 Browse the preview: https://deploy-preview-9921--carbon-components-react.netlify.app |
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 01e8eff 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/617c9f9a7c2b1500079172e0 😎 Browse the preview: https://deploy-preview-9921--carbon-elements.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Just left a couple of style nits
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
packages/react/src/components/TimePicker/next/TimePicker-test.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Josh Black <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The storybook actions throw this error:
Warning: This synthetic event is reused for performance reasons. If you're seeing this, you're accessing the property
buttons
on a released/nullified synthetic event. This is set to null. If you must keep the original synthetic event around, use event.persist(). See https://fb.me/react-event-pooling for more information.
Will users accessing the onChange
, onClick
, and onBlur
get this same error message if they're using React v16?
The React v17 blog post has a brief note that event.persist()
is still available on the React event object, it just doesn't do anything in React v17.
Should we continue to use event.persist()
and wait to remove it until (if?) we remove support for React v16?
@tay1orjones I think for v11 we're going to move to |
@joshblack very exiting! I didn't know that was on your mind for v11. Totally approve. |
REF #9712
Refactored
TimePicker
into a functional component with RTL tests.evt.persist();
because it is no longer needed as of React 17. However, this causes Storybook to generate console error messages when using Actions, so I removed them.Testing / Reviewing
packages/react
yarn start:v11
to run old storybook with v11 components.TimePicker
go green.