-
Notifications
You must be signed in to change notification settings - Fork 3
Change/upgraded to react18 CMEM-6639 #335
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
base: develop
Are you sure you want to change the base?
Conversation
# Conflicts: # src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx
| danger: EdgeBezier, | ||
| }; | ||
|
|
||
| const nodeTypes: Record<GRAPH_NODE_TYPES, React.ReactNode /*& ComponentType<NodeProps>*/> = { |
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.
We need to check this change from the LTS version because this is used for both supported react flow versions.
| danger: EdgeStep, | ||
| }; | ||
|
|
||
| const nodeTypes: Record<LINKING_NODE_TYPES, React.ReactNode /*& ComponentType<NodeProps>*/> = { |
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.
same here.
| danger: EdgeStep, | ||
| }; | ||
|
|
||
| const nodeTypes: Record<WORKFLOW_NODE_TYPES, React.ReactNode /*& ComponentType<NodeProps>*/> = { |
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.
same here.
| children: React.ReactNode; | ||
| className?: string; | ||
| onToggle?: any //todo change later | ||
| } |
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.
Looks like a hack, also React.HTMLAttributes<HTMLElement> was taken out. We need to check for the reasons.
| : depiction instanceof HTMLElement | ||
| ? <>{depiction.outerHTML}</> | ||
| : depiction} | ||
| </span> |
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.
Why should land a HTMLElement here?
| const originalChild = child as React.ReactElement; | ||
| if (originalChild && originalChild.type && originalChild.type === PropertyValuePair) { | ||
| return React.cloneElement(originalChild, { singleColumn: true }); | ||
| return React.cloneElement(originalChild as React.ReactElement<{singleColumn: boolean}>, { singleColumn: true }); |
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.
Type i set earlier, why need this be overwritten here?
| const originalChild = child as React.ReactElement; | ||
| if (originalChild.type && (originalChild.type === PropertyName || originalChild.type === PropertyValue)) { | ||
| return React.cloneElement(originalChild, { nowrap: true }); | ||
| return React.cloneElement(originalChild as React.ReactElement<{nowrap: boolean}>, { nowrap: true }); |
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.
Same here.
| ({ children, edgeCenter, resizeTimeout = -1, ...otherForeignObjectProps }: EdgeLabelObjectProps) => { | ||
| const containerCallback = React.useCallback( | ||
| (containerRef) => { | ||
| (containerRef:any) => { |
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.
There is probably another type for refs.
| }; | ||
|
|
||
| const onResize = React.useCallback((_0, _1, _2, d) => { | ||
| const onResize = React.useCallback((_0:any, _1:any, _2:any, d:any) => { |
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.
Should be probably the same like in line 759?
Made refactors to adapt for version 18 and even version 19.