-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
update: Replace reactflow with @xyflow/react and Update Dependencies #8940
Conversation
- Added `@xyflow/react` as a dependency and replaced imports from `reactflow` with `@xyflow/react` in multiple components. - Removed `reactflow` dependency and its related code from the project. - Updated type definitions for nodes and edges to align with the new library. - Minor refactoring for improved code clarity and consistency in `SettingsDataModelOverview`, `SettingsDataModelOverviewEffect`, `SettingsDataModelOverviewField`, and `SettingsDataModelOverviewObject` components. - Updated `package.json` and `yarn.lock` to reflect the changes in dependencies.
Log
|
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.
PR Summary
This pull request migrates the data model visualization from 'reactflow' to '@xyflow/react', maintaining API compatibility while improving type safety and dependency management.
- Updated imports from 'reactflow' to '@xyflow/react' across all graph overview components in
/packages/twenty-front/src/modules/settings/data-model/graph-overview/
- Added explicit type annotations for Node and Edge generics in
SettingsDataModelOverview.tsx
for better type safety - Added optional chaining for edge.data access in graph components to prevent potential runtime errors
- Added key prop to mapped IconButton components in
IconButtonGroup.tsx
for React rendering optimization - Upgraded to @xyflow/react v12.3.5 in package.json while removing the reactflow dependency
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
7 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
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.
Thanks for your work, @pradeepkaswan. Your changes removes one dependency from the project, that's awesome. We can merge!
@Devessier , the PR is ready to be merged, but I don't have write access. Can you assist in resolving this or merging the PR if appropriate? |
Description:
This pull request includes the following changes:
Dependency Update:
@xyflow/react
as a dependency.reactflow
with@xyflow/react
in multiple components.Dependency Removal:
reactflow
dependency and its related code from the project.Type Definitions Update:
Code Refactoring:
SettingsDataModelOverview
SettingsDataModelOverviewEffect
SettingsDataModelOverviewField
SettingsDataModelOverviewObject
Dependency Files Update:
package.json
andyarn.lock
to reflect the changes in dependencies.Additional Notes:
@xyflow/react
library instead ofreactflow
.Testing:
Checklist:
@xyflow/react
as a dependency.reactflow
imports with@xyflow/react
.reactflow
dependency.package.json
andyarn.lock
.Related Issue
Fixes #6662