-
Notifications
You must be signed in to change notification settings - Fork 4
Fix voltage level contextual menu in NAD #3625
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
Conversation
Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
| const studyUuid = useSelector((state: AppState) => state.studyUuid); | ||
| const currentNodeUuid = useSelector((state: AppState) => state.currentTreeNode)?.id; | ||
| const currentRootNetworkUuid = useSelector((state: AppState) => state.currentRootNetworkUuid); |
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 not pass them from use-equipment-menu?
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 better to do this way
It reduces the number of params that are necessary for the component to work anyway
| FEEDER_TYPES.GENERATOR, | ||
| ]; | ||
|
|
||
| export const equipmentsWithContextualMenu = [ |
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.
not used?
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 removed too much code with my last commit while debugging
It's now used for white listing
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 don't we need this extra fetch in the map (on main)?
| }; | ||
| }, [voltageLevel.id, studyUuid, currentNodeUuid, currentRootNetworkUuid]); | ||
|
|
||
| if (!voltageLevelInfos?.substationId || isLoading) { |
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.
isLoading redundant with voltageLevelInfos?.substationId ?
Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
antoinebhs
left a 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.
Code OK
Test OK
|
|
||
| const showEquipmentMenu = useCallback( | ||
| (svgId: string, equipmentId: string, equipmentType: string, mousePosition: Point) => { | ||
| // don't display the equipment menu in edit mode. |
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.
delete outdated comment?
Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
|



PR Summary
Before this fix, voltage level menu was displaying empty string instead of substation ID in several submenus