Repository navigation
feat(event-display): allow restoring removed geometries from detector configuration - #1058
Merged
Merged
Conversation
Contributor
Author
|
@EdwardMoyse Please review the Pr when you have the free time. |
|
🚀 Preview deployed: http://phoenix-pr-1058.surge.sh Built from bc1f8b5. |
This branch was successfully deployed
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.
Closes #1056
Description
When detector geometries were removed using the "Remove" button in their configuration popup, they were permanently detached from both the Three.js scene and the Phoenix Menu, leaving users with no way to restore them without reloading the entire application or scene.
As suggested by @EdwardMoyse in #1056, this PR introduces a "Removed Geometry" section in the top-level Detector configuration panel (where the wireframe option is located) to allow restoring removed geometries back to the scene and menu.
Key Changes
Track Removed Geometries:
PhoenixMenuUI, geometries removed via the menu are tracked with their metadata (id, displayname,object, originalmenuSubfolder, and Three.jsparent3D).DatGUIMenuUIfor feature parity.Top-Level Configuration Panel UI:
Removed Geometrylabel and a directRestore <Name>button.selectdropdown listing the removed geometries, aRestore Selectedbutton, and aRestore Allbutton.Restoration Logic:
parent3Dor detector geometries group) and setsvisible = true.Supporting Core Updates:
PhoenixMenuNode: AddedremoveConfig(configOrLabel)andremoveConfigsByGroup(group)helper methods.SceneManager: AddedaddGeometry(object, parent?)and ensuredremoveGeometry(object)handles nested parents.UIManager: ExposedgetRemovedGeometries(),restoreGeometry(), andrestoreAllGeometries().PhoenixMenuItemComponent: Ensuredselectchange event updatesconfig.value.Testing
phoenix-menu-ui.test.tscovering:Restore Selected, andRestore All.clear().phoenix-menu-node.test.tsforremoveConfigandremoveConfigsByGroup.scene-manager.test.tsforaddGeometryand nested parent removal.dat-gui-ui.test.tsfor dat.GUI removal and restoration.phoenix-event-displaypass with 100%.yarn lintpasses with 0 errors and 0 warnings.phoenix-app.