-
Notifications
You must be signed in to change notification settings - Fork 1
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
Eagle 1382 #815
Eagle 1382 #815
Conversation
Reviewer's Guide by SourceryThe pull request modifies the ParameterTable component to reset the table field editor selector when switching nodes. This ensures that the field selection is cleared when a new node is selected, preventing potential confusion or errors. Sequence diagram for table field selection reset when switching nodessequenceDiagram
participant User
participant ParameterTable
participant Eagle
User->>ParameterTable: Switch node selection
ParameterTable->>Eagle: getInstance()
Eagle-->>ParameterTable: eagle instance
ParameterTable->>ParameterTable: getTableFields()
ParameterTable->>ParameterTable: resetSelection()
Note right of ParameterTable: Clear table field editor selector
ParameterTable->>Eagle: Get selected node fields
Eagle-->>ParameterTable: Updated fields
State diagram for table field editor selectionstateDiagram-v2
[*] --> HasSelection: Select field
HasSelection --> NoSelection: Switch node
NoSelection --> HasSelection: Select new field
NoSelection --> [*]
HasSelection --> [*]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @M-Wicenec - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
//resets the table field selections used for the little editor at the top of the table | ||
ParameterTable.resetSelection() |
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.
issue: Avoid side effects in computed functions - resetSelection() call should be moved elsewhere
Pure computed functions should only calculate and return values, not modify state. This could cause unexpected behavior as the function may be re-evaluated multiple times by the Knockout framework. Consider moving the resetSelection() call to a more appropriate location where state modifications are expected.
@@ -544,7 +547,7 @@ | |||
|
|||
static openTable = (mode: Eagle.BottomWindowMode, selectType: ParameterTable.SelectType) : void => { | |||
const eagle: Eagle = Eagle.getInstance(); | |||
|
|||
//if a modal is open, closed it |
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.
nitpick (typo): Typo in comment: 'closed' should be 'close'
//if a modal is open, closed it | |
//if a modal is open, close it |
clearing the table field editor selector when switching nodes
Summary by Sourcery
Clear the table field editor selector when switching nodes.
New Features:
Enhancements: