Conversation
…"data"-menu by including the `id` field in parantheses. Also, improve the info-box.
There was a problem hiding this comment.
Pull request overview
This PR fixes the data menu labeling issue where different TransmissionModes were not properly distinguished, addressing issue #32. The fix includes all non-AbstractElement/Nothing elements as indices in square brackets in the data menu labels, and expands TransmissionModes in the info box.
Key changes:
- Modified label creation to use square brackets for indices instead of parentheses for resources
- Enhanced info box expansion to handle
TransmissionModes specifically - Added test coverage for data menu labeling functionality
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/utils_GUI/results_axis_utils.jl | Updated create_label to use square brackets for non-AbstractElement indices |
| src/utils_GUI/info_axis_utils.jl | Refactored print_nested_structure! into type-specific methods and added Expandable type alias |
| ext/EMGExt/EMGExt.jl | Added TransmissionMode vector printing support and simplified mode retrieval |
| src/utils_GUI/GUI_utils.jl | Enhanced select_data! to support selection filtering |
| test/test_interactivity.jl | Added test case for data menu labeling with transmission modes |
| test/utils.jl | Added fetch_element helper function for tests |
| test/EMI_geography_2.jl | Added H2_Transport_50MW_OT transmission mode to test data |
| src/utils_gen/structures_utils.jl | Updated get_resource_colors to use unique(vcat(inputs(l), outputs(l))) |
| NEWS.md | Documented the bugfix and enhancements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
espenfb
left a comment
There was a problem hiding this comment.
This fixes the issue with distincion of the parameters for different transmission modes nicely. The implementation looks good and I have no comments.
The print in the info-box could be a bit more styled, it is a bit long and some details could probably be skipped. But this should be done in a seperate Issue (it's the same for other elements such as nodes etc.).
Fix missing distinction between different
TransmissionModes in the "data"-menu by including theidfield in square brackets (actually, all nonAbstractElement/Nothingelements are now included as indices in square brackets). Also expandTransmissionModes in the info-box.This PR Fixes #32