Add basic workspace context menu API#110
Merged
Merged
Conversation
3a864c7 to
7dbf5e4
Compare
7dbf5e4 to
3bd4991
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a basic API for extending CharaStudio’s workspace right‑click context menu, including ordering/grouping of items and event args describing the clicked/selected nodes.
Changes:
- Added
StudioContextMenusAPI to register workspace context menu entries with ordering and optional state checks. - Hooked
TreeNodeObject.Startto detect right-clicks on workspace nodes and open the custom context menu. - Added public docs for the new API surface (
StudioContextMenuOrder,StudioContextMenus,WorkspaceNodeClickedEventArgs) and wired new sources into the shared project items.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Shared.CharaStudio/Studio/StudioContextMenus.cs | New context menu registry + default workspace commands and menu display logic |
| src/Shared.CharaStudio/Studio/StudioContextMenuOrder.cs | New enum defining standard grouping/order bands for menu items |
| src/Shared.CharaStudio/Studio/StudioAPI.Hooks.cs | Adds right-click handler hookup for workspace nodes via IPointerClickHandler |
| src/Shared.CharaStudio/Studio/StudioAPI.cs | Initializes the new context menu system during Studio init |
| src/Shared.CharaStudio/Studio/Events/WorkspaceNodeClickedEventArgs.cs | New event args type exposing clicked node and selected nodes/objects |
| src/Shared.CharaStudio/Shared.CharaStudio.projitems | Includes new source files in the shared project items |
| doc/KKAPI.Studio.md | Documents the new API types and removes the old context menu registration entry |
| doc/Home.md | Adds links to the new documentation sections |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.