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

FEC 155 - Upgrade all UI Kit packages to React 19 #3034

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ByronDWall
Copy link
Contributor

@ByronDWall ByronDWall commented Jan 8, 2025

🚨 🚨 🚨 DO NOT MERGE - TO BE CONSUMED AS RC VERSION IN DOWNSTREAM REPOS FOR NOW 🚨 🚨 🚨

Available on npm as version 0.0.0-fec-155-react-19-20250122185524

Copilots handling this Summary for now

This pull request includes multiple changes to upgrade the UI Kit to React 19 and to simplify the codebase. The most important changes include updating dependencies, removing unnecessary plugins, and refining type definitions.

Upgrade to React 19:

Codebase Simplification:

  • Removed babel-plugin-typescript-to-proptypes and other unnecessary plugins from babel.config.js.
  • Removed prop-types from various package.json files and updated type definitions to use TypeScript. [1] [2] [3] [4] [5] [6]

Type Definitions Refinement:

  • Refined type definitions in design-system/src/icon-utils.ts and design-system/src/theme-provider.tsx. [1] [2] [3] [4]
  • Added TIconProps type to @commercetools-uikit/design-system and updated relevant components. [1] [2] [3] [4]

Dependency Updates:

  • Updated various dependencies in package.json files, including formik, patch-package, and react-intl. [1] [2] [3]

Miscellaneous Improvements:

  • Added encoded references to the end of each change description to improve the summary of changes.
  • Added specific event handler types in packages/calendar-utils/src/calendar-body/calendar-body.tsx and packages/calendar-utils/src/calendar-header/calendar-header.tsx. [1] [2] [3] [4] [5] [6]

@ByronDWall ByronDWall added the fe-chapter-rotation Tasks coming from frontend chapter work label Jan 8, 2025
@ByronDWall ByronDWall requested a review from a team January 8, 2025 16:13
@ByronDWall ByronDWall self-assigned this Jan 8, 2025
@ByronDWall ByronDWall requested a review from a team as a code owner January 8, 2025 16:13
@ByronDWall ByronDWall requested review from stephsprinkle, jaikamat, ddouglasz, tylermorrisford and misama-ct and removed request for a team January 8, 2025 16:13
Copy link

changeset-bot bot commented Jan 8, 2025

🦋 Changeset detected

Latest commit: b6abdf9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 99 packages
Name Type
@commercetools-uikit/localized-multiline-text-field Major
@commercetools-uikit/localized-multiline-text-input Major
@commercetools-uikit/async-creatable-select-field Major
@commercetools-uikit/async-creatable-select-input Major
@commercetools-uikit/localized-rich-text-input Major
@commercetools-uikit/selectable-search-input Major
@commercetools-uikit/spacings-inset-squish Major
@commercetools-uikit/secondary-icon-button Major
@commercetools-uikit/creatable-select-field Major
@commercetools-uikit/creatable-select-input Major
@commercetools-uikit/localized-money-input Major
@commercetools-uikit/localized-text-field Major
@commercetools-uikit/multiline-text-field Major
@commercetools-uikit/localized-text-input Major
@commercetools-uikit/multiline-text-input Major
@commercetools-uikit/search-select-field Major
@commercetools-uikit/search-select-input Major
@commercetools-uikit/accessible-button Major
@commercetools-uikit/async-select-field Major
@commercetools-uikit/async-select-input Major
@commercetools-uikit/secondary-button Major
@commercetools-uikit/search-text-input Major
@commercetools-uikit/spacings-inline Major
@commercetools-uikit/dropdown-menu Major
@commercetools-uikit/date-range-field Major
@commercetools-uikit/date-range-input Major
@commercetools-uikit/primary-action-dropdown Major
@commercetools-uikit/spacings-inset Major
@commercetools-uikit/spacings-stack Major
@commercetools-uikit/primary-button Major
@commercetools-uikit/date-time-field Major
@commercetools-uikit/date-time-input Major
@commercetools-uikit/rich-text-input Major
@commercetools-uikit/rich-text-utils Major
@commercetools-uikit/password-field Major
@commercetools-uikit/checkbox-input Major
@commercetools-uikit/password-input Major
@commercetools-uikit/flat-button Major
@commercetools-uikit/icon-button Major
@commercetools-uikit/link-button Major
@commercetools-uikit/number-field Major
@commercetools-uikit/select-field Major
@commercetools-uikit/number-input Major
@commercetools-uikit/select-input Major
@commercetools-uikit/select-utils Major
@commercetools-uikit/toggle-input Major
@commercetools-uikit/collapsible-motion Major
@commercetools-uikit/data-table-manager Major
@commercetools-uikit/money-field Major
@commercetools-uikit/radio-field Major
@commercetools-uikit/input-utils Major
@commercetools-uikit/money-input Major
@commercetools-uikit/radio-input Major
@commercetools-uikit/accessible-hidden Major
@commercetools-uikit/collapsible-panel Major
@commercetools-uikit/date-field Major
@commercetools-uikit/text-field Major
@commercetools-uikit/time-field Major
@commercetools-uikit/date-input Major
@commercetools-uikit/text-input Major
@commercetools-uikit/time-input Major
@commercetools-uikit/loading-spinner Major
@commercetools-uikit/field-warnings Major
@commercetools-uikit/notifications Major
@commercetools-uikit/quick-filters Major
@commercetools-uikit/view-switcher Major
@commercetools-uikit/field-errors Major
@commercetools-uikit/progress-bar Major
@commercetools-uikit/collapsible Major
@commercetools-uikit/constraints Major
@commercetools-uikit/field-label Major
@commercetools-uikit/data-table Major
@commercetools-uikit/pagination Major
@commercetools-uikit/messages Major
@commercetools-uikit/filters Major
@commercetools-uikit/tooltip Major
@commercetools-uikit/avatar Major
@commercetools-uikit/icons Major
@commercetools-uikit/label Major
@commercetools-uikit/stamp Major
@commercetools-uikit/card Major
@commercetools-uikit/grid Major
@commercetools-uikit/link Major
@commercetools-uikit/text Major
@commercetools-uikit/calendar-utils Major
@commercetools-uikit/tag Major
visual-testing-app Major
@commercetools-uikit/spacings Major
@commercetools-uikit/buttons Major
@commercetools-uikit/hooks Major
@commercetools-uikit/utils Major
@commercetools-uikit/fields Major
@commercetools-uikit/inputs Major
@commercetools-frontend/ui-kit Major
@commercetools-uikit/design-system Major
@commercetools-local/storybook Major
@commercetools-uikit/calendar-time-utils Major
@commercetools-uikit/localized-utils Major
@commercetools-uikit/i18n Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jan 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ui-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 6:49pm

'@commercetools-local/storybook': major
---

Upgrade UI Kit to React 19
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know this should probably more descriptive, suggestions on how much more descriptive are welcome.

Copy link
Contributor

@CarlosCortizasCT CarlosCortizasCT Jan 8, 2025

Choose a reason for hiding this comment

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

I think it's fine to keep it like this for now. We can come back to it when we are about to release the breaking change version and provide hints with what we will be learning migrating MC applications.

Copy link
Contributor

@CarlosCortizasCT CarlosCortizasCT left a comment

Choose a reason for hiding this comment

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

I did a first review and added some comments.

There are also some topics we might want to mark as relevant:

  • We're also forcing consumers to update their react-intl dependency to a new major version
  • We're introducing many changes in tests regarding some type of events (blur, focus,...)
  • We're updating Downshift to a new major version
  • We would need to think about how we type icon props in our components

Apart from that, there are also some formatting changes that introduce some noise while reviewing that would be great to avoid.

package.json Outdated Show resolved Hide resolved
packages/calendar-utils/package.json Show resolved Hide resolved
design-system/src/theme-provider.tsx Outdated Show resolved Hide resolved
packages/components/avatar/src/avatar.tsx Outdated Show resolved Hide resolved
packages/components/inputs/password-input/package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@ddouglasz ddouglasz left a comment

Choose a reason for hiding this comment

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

🙌🏽

Copy link
Contributor

@ddouglasz ddouglasz left a comment

Choose a reason for hiding this comment

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

Great work. Took a second look and it look great to me.

Copy link
Contributor

@kark kark left a comment

Choose a reason for hiding this comment

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

Big thanks for migrating the components so quickly! 🚀
I'll review everything tomorrow, if that's alright.

In the meantime, as discussed, could I ask for addressing this one regression:

Could we make the scale prop optional?

Many thanks!

Copy link
Contributor

@kark kark left a comment

Choose a reason for hiding this comment

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

Everything looks great on my end! Thanks a ton. 🙌

@ByronDWall
Copy link
Contributor Author

[preview_deployment]

@ct-changesets
Copy link
Contributor

ct-changesets bot commented Jan 16, 2025

Release workflow succeeded ✅\nSee details: Workflow Run

…ry/react, etc to v19 or relevant react 19 flavored version, update peerDependencies of react and react-dom from 17.x to 19.x in all affected packages, update test/setup-test-framework to import directly from @testing-library/jest-dom instead of subfolder
@ByronDWall
Copy link
Contributor Author

[preview_deployment]

@ct-changesets
Copy link
Contributor

ct-changesets bot commented Jan 17, 2025

Release workflow succeeded ✅\nSee details: Workflow Run

…-system dep from fields and prop-types dep from other components makes rebasing less of a chore in the future
…t maintained anymore, use @hello-pangea/dnd because it is a maintained drop-in replacement for react-beautiful-dnd
@ByronDWall
Copy link
Contributor Author

[preview_deployment]

@ct-changesets
Copy link
Contributor

ct-changesets bot commented Jan 21, 2025

Release workflow succeeded ✅\nSee details: Workflow Run

@ByronDWall
Copy link
Contributor Author

[preview_deployment]

@ct-changesets
Copy link
Contributor

ct-changesets bot commented Jan 22, 2025

Release workflow succeeded ✅\nSee details: Workflow Run

…es from react-intl instead of custom props defined in components
@ByronDWall
Copy link
Contributor Author

[preview_deployment]

@ct-changesets
Copy link
Contributor

ct-changesets bot commented Jan 22, 2025

Release workflow succeeded ✅\nSee details: Workflow Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 🚨 🚨DO NOT MERGE🚨 🚨 🚨 this branch is a release candidate and should not be merged to main until tested/accepted fe-chapter-rotation Tasks coming from frontend chapter work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants