Skip to content

Change/upgraded to react18 CMEM-6639#335

Open
arausly wants to merge 10 commits intodevelopfrom
change/upgradedToReact18-CMEM-6639
Open

Change/upgraded to react18 CMEM-6639#335
arausly wants to merge 10 commits intodevelopfrom
change/upgradedToReact18-CMEM-6639

Conversation

@arausly
Copy link
Contributor

@arausly arausly commented Sep 30, 2025

Made refactors to adapt for version 18 and even version 19.

@haschek haschek marked this pull request as draft October 1, 2025 11:47
@haschek haschek changed the base branch from next to develop December 1, 2025 13:03
danger: EdgeBezier,
};

const nodeTypes: Record<GRAPH_NODE_TYPES, React.ReactNode /*& ComponentType<NodeProps>*/> = {
Copy link
Member

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>*/> = {
Copy link
Member

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>*/> = {
Copy link
Member

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
}
Copy link
Member

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>
Copy link
Member

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 });
Copy link
Member

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 });
Copy link
Member

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) => {
Copy link
Member

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) => {
Copy link
Member

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?

@haschek haschek marked this pull request as ready for review February 5, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants