Add editable checkbox and enable row insertion/deletion for impact categories#1589
Merged
mrvisscher merged 11 commits intomajorfrom Oct 23, 2025
Merged
Add editable checkbox and enable row insertion/deletion for impact categories#1589mrvisscher merged 11 commits intomajorfrom
mrvisscher merged 11 commits intomajorfrom
Conversation
- Added editable checkbox to impact category header to control editing state - Implemented context menu with delete option for characterization factors - Added drag-and-drop support for adding biosphere flows to impact categories - Conditional editing: amount and uncertainty fields only editable when checkbox is checked - All functionality gated behind editable state to prevent accidental modifications Co-authored-by: mrvisscher <103424764+mrvisscher@users.noreply.github.com>
- Use is_node_biosphere utility function for cleaner biosphere flow filtering - Simplify dropEvent implementation with list comprehension Co-authored-by: mrvisscher <103424764+mrvisscher@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add checkbox for editable impact assessment method
Add editable checkbox and enable row insertion/deletion for impact categories
Oct 16, 2025
10 tasks
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.
Summary
Fixes the issue where impact assessment characterization factors could be modified accidentally, and adds the ability to insert and delete rows from impact categories.
Problem
Previously, impact category characterization factors were always editable with no protection mechanism, leading to potential accidental modifications. Additionally, there was no way to add new characterization factors or remove existing ones directly from the impact category view.
Solution
This PR implements three key features:
1. Editable Checkbox for Protection
Added a checkbox labeled "Editable" to the impact category header that acts as a safety gate:
2. Row Deletion via Context Menu
When the editable checkbox is checked:
CFRemoveaction for consistency3. Row Insertion via Drag-and-Drop
When the editable checkbox is checked:
CFNewaction for consistencyImplementation Details
Files Modified:
impact_category_header.py: Added editable checkbox widget and state change callback (+17 lines)impact_category_details.py: Added state tracking, context menu, drag-drop support, and conditional editability (+65 lines)Key Design Decisions:
ABActionandABMenuinfrastructureChanges in Behavior
Usage Example
Backward Compatibility
✅ Fully backward compatible - no breaking changes:
Testing
Manual testing required to verify:
Closes #[issue_number]
Original prompt
Fixes #1588
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.