Import shared modification#3986
Open
Mathieu-Deharbe wants to merge 38 commits into
Open
Conversation
Signed-off-by: SOUISSI Maissa (Externe) <souissimai@gm0winl878.bureau.si.interne>
Signed-off-by: SOUISSI Maissa (Externe) <souissimai@gm0winl878.bureau.si.interne>
Signed-off-by: SOUISSI Maissa (Externe) <souissimai@gm0winl878.bureau.si.interne>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
This comment was marked as low quality.
This comment was marked as low quality.
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
# Conflicts: # src/components/dialogs/import-modification-dialog.tsx
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
# Conflicts: # src/components/dialogs/import-composite/import-modification-dialog.tsx
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/components/graph/menus/network-modifications/network-modification-node-editor.tsx (1)
1309-1320: ⚡ Quick winAlign export tooltip with the new shared-selection disable condition.
The button is disabled when
selectionContainsShared, but the tooltip only explains nesting-limit disablement. Add a shared-specific tooltip message to avoid ambiguous disabled state.Also applies to: 1322-1326
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/graph/menus/network-modifications/network-modification-node-editor.tsx` around lines 1309 - 1320, The Tooltip component in the network-modification-node-editor.tsx file currently only accounts for the isCompositeNestingLimitReached condition when displaying the tooltip title, but the button is also disabled when selectionContainsShared is true. Update the tooltip's title prop to include an additional conditional check: if selectionContainsShared is true, display a FormattedMessage with an appropriate message ID explaining that shared selections cannot be saved to Gridexplore; otherwise, keep the existing logic that checks isCompositeNestingLimitReached first, then defaults to the SaveToGridexplore message. This will align the tooltip explanation with all possible disabled states of the button.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/components/graph/menus/network-modifications/network-modification-node-editor.tsx`:
- Around line 1143-1147: The defaultSaveModificationName assignment uses
JSON.parse() on selectedNetworkModifications[0]?.messageValues without error
handling, which will crash the component if the JSON is invalid or the value is
not parseable. Wrap the JSON.parse() call in a try-catch block to safely handle
parsing errors, returning null in the catch block so the component continues to
render without breaking.
---
Nitpick comments:
In
`@src/components/graph/menus/network-modifications/network-modification-node-editor.tsx`:
- Around line 1309-1320: The Tooltip component in the
network-modification-node-editor.tsx file currently only accounts for the
isCompositeNestingLimitReached condition when displaying the tooltip title, but
the button is also disabled when selectionContainsShared is true. Update the
tooltip's title prop to include an additional conditional check: if
selectionContainsShared is true, display a FormattedMessage with an appropriate
message ID explaining that shared selections cannot be saved to Gridexplore;
otherwise, keep the existing logic that checks isCompositeNestingLimitReached
first, then defaults to the SaveToGridexplore message. This will align the
tooltip explanation with all possible disabled states of the button.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5fdce894-52da-436d-9f08-362c46bc92bb
📒 Files selected for processing (5)
src/components/dialogs/import-composite/insert-name-cell.tsxsrc/components/dialogs/import-modification-dialog.tsxsrc/components/graph/menus/network-modifications/network-modification-node-editor.tsxsrc/components/utils/field-constants.tssrc/services/study/index.ts
✅ Files skipped from review due to trivial changes (1)
- src/components/utils/field-constants.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/components/dialogs/import-modification-dialog.tsx
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For now to import modification systeml added in #3958 disables the sharing of modification.
This PR adds it, allows to visualize them and handle them (with still a lot of restrictions that will be dealt with later)