-
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
when adding a field to a graph configuration, the fields value from t… #754
Conversation
…he graph will be set as the initial configured value in the graph configuration
Reviewer's Guide by SourceryThe PR modifies how fields are added to graph configurations and fixes graph configuration initialization. Instead of simply adding fields, the implementation now preserves the field's current value when adding it to the configuration. Additionally, the creation of new graph configurations has been modified to start fresh rather than cloning an existing configuration. Sequence diagram for adding a field to graph configurationsequenceDiagram
participant User
participant ParameterTable
participant GraphConfig
User->>ParameterTable: Add field to graph configuration
ParameterTable->>GraphConfig: addValue(nodeId, fieldId, fieldValue)
GraphConfig-->>ParameterTable: Field added with value
ParameterTable-->>User: Field added to configuration
Updated class diagram for ParameterTable and GraphConfigclassDiagram
class ParameterTable {
+addValue(nodeId, fieldId, fieldValue)
}
class GraphConfig {
+addValue(nodeId, fieldId, fieldValue)
+removeField(field)
}
ParameterTable --> GraphConfig: uses
note for ParameterTable "Modified to use addValue instead of addField"
note for GraphConfig "addValue method added to preserve field value"
Updated class diagram for EagleclassDiagram
class Eagle {
+newConfig()
}
class GraphConfig {
+setId(id)
}
Eagle --> GraphConfig: creates
note for Eagle "newConfig modified to create a new GraphConfig instead of cloning"
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 - here's some feedback:
Overall Comments:
- Please update the PR description to explain the behavior change in newConfig() - it now creates an empty configuration instead of cloning the active one.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 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.
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.
Much better
when adding a field to a graph configuration, the field's value from the graph will be set as the initial configured value in the graph configuration. aka when adding a field to the config, it takes its value with it.
additionally i fixed an error when creating a new graph config when there is none added in the first place.
Summary by Sourcery
Enhance the graph configuration process by setting the field's current value as the initial value when adding a field. Fix an error in creating a new graph configuration when none exists by initializing a new GraphConfig.
Bug Fixes:
Enhancements: