-
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-1310: Allow users to change node's category, even when the built-in palettes are not loaded #783
base: master
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis PR modifies the node category change functionality to work even when the built-in palettes are not loaded. The implementation now includes a fallback mechanism that uses CategoryData.cData when the built-in palette is unavailable, and the category change logic has been restructured to handle cases where template matching isn't possible. Sequence diagram for changing node category without built-in palettessequenceDiagram
actor User
participant Eagle
participant Utils
participant Palette
participant Node
User->>Eagle: Request to change node category
Eagle->>Palette: Find built-in palette
alt Palette not found
Eagle->>Utils: Show notification about missing palette
Eagle->>Utils: Get categories from CategoryData.cData
else Palette found
Eagle->>Palette: Find node prototypes for old and new categories
alt Prototypes not found
Eagle->>Utils: Log warning about missing prototypes
else Prototypes found
Node->>Node: Remove non-port fields
Node->>Node: Add new fields from new category
Node->>Node: Copy name and description if default
end
end
Eagle->>Node: Set new category
Eagle->>Eagle: Flag file as modified
Eagle->>Eagle: Check graph consistency
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 @james-strauss-uwa - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 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.
…e remaining code in Eagle a bit simpler.
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.
Its a little weird that the limitation is also an issue when simply using the setting to not load the palettes. Its not really clear to the user that using that setting will severely limit switching data nodes in that way when using it.
not sure if the correct thing to do would be to simply mention that in the tooltips or to instead have them loaded but hidden, so we can still use them for this purpose?
When the built-in palettes are not loaded. Either because the user has turned off the "Open Default Palette on Startup" setting, or because the user is offline. Previously, a list of categories to change to, could not be built.
Now as a fallback, we build the list of categories from the data in CategoryData.cData
We're unable to add/remove fields to match the template in the built-in palette, but at least it allows users' to change categories.
To test:
Summary by Sourcery
Enable users to change a node's category without relying on built-in palettes by using CategoryData.cData as a fallback. Enhance the logic for determining eligible node categories when no node is selected.
New Features:
Enhancements: