-
Notifications
You must be signed in to change notification settings - Fork 4
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
typescript migration of components/diagrams #2273
typescript migration of components/diagrams #2273
Conversation
Signed-off-by: jamal-khey <myjamal89@gmail.com>
Signed-off-by: jamal-khey <myjamal89@gmail.com>
} | ||
|
||
const PositionDiagram = forwardRef((props: PositionDiagramProps, ref: Ref<HTMLDivElement>) => { | ||
// fixme : HTMLDivElement is the correct type ? |
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.
I Think it's ok do not forget to delete comment before merging?
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.
done
src/components/diagrams/singleLineDiagram/position-diagram-pane.tsx
Outdated
Show resolved
Hide resolved
src/components/diagrams/singleLineDiagram/position-diagram-pane.tsx
Outdated
Show resolved
Hide resolved
src/components/diagrams/singleLineDiagram/position-diagram-pane.tsx
Outdated
Show resolved
Hide resolved
src/components/diagrams/singleLineDiagram/single-line-diagram-content.tsx
Outdated
Show resolved
Hide resolved
src/components/diagrams/singleLineDiagram/single-line-diagram-content.tsx
Outdated
Show resolved
Hide resolved
src/components/diagrams/singleLineDiagram/single-line-diagram-content.tsx
Outdated
Show resolved
Hide resolved
src/components/diagrams/singleLineDiagram/single-line-diagram-content.tsx
Outdated
Show resolved
Hide resolved
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 thrown exception stops something we want to do.
// setBusMenu((prevState) => ({ | ||
// ...prevState,//FIXME: shloud i reset all other values ? | ||
// display: false, | ||
// })); |
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.
Remove this comment
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.
done
setModificationInProgress={function (progress: boolean): void { | ||
throw new Error('Function not implemented.'); | ||
}} |
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.
This stops the user from tripping a busbar section. To try it, open a voltage level, and right click on a busbar section (the horizontal bold line in the middle), then "Trip the busbar section".
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.
sorry i forgot about that
@@ -316,6 +365,7 @@ function SingleLineDiagramContent(props) { | |||
const displayBranchMenu = () => { | |||
return ( | |||
equipmentMenu.display && | |||
equipmentMenu.equipmentType && |
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 ?
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 the ligne below we check if equipmentMenu.equipmentType value is contained in the array.
and because the array does not contain 'null' or undefined' the includes function will return false anyway.
the main reason i changend this code is because typescript compiler is complaining about it
9722783
to
ae3bdfa
Compare
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.
i fixed the changes request
Signed-off-by: jamal-khey <myjamal89@gmail.com>
Signed-off-by: jamal-khey <myjamal89@gmail.com>
src/components/diagrams/networkAreaDiagram/network-area-diagram-content.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: jamal-khey <myjamal89@gmail.com>
Signed-off-by: jamal-khey <myjamal89@gmail.com>
|
This pull request migrates the components/diagrams directory from JavaScript to TypeScript.
this PR depend on powsybl/powsybl-network-viewer#106