Repository navigation
Allow an app to customise the items of the context menu - #24
Merged
Merged
Conversation
…ontext menu (e.g., to let the user choose whether the X axes of some plots are synchronised), and IDs to our context menu actions.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain, and the changes are documented with updated examples and stable action identifiers.
No open issues 🎉
What changed in this PR
Adds support for application-defined context-menu customization while preserving built-in plot actions and exposing stable action IDs.
Changes:
- Adds the
contextMenuItemsprop for customizing native and custom context menus. - Adds optional action IDs and documents the customization API.
- Updates the demo with linked-axis actions and bumps the package version.
| File | Description |
|---|---|
| src/widgets/PlotWidget.vue | Builds customizable context-menu items, assigns IDs to built-in actions, and applies the customization callback. |
| src/widgets/ContextMenuWidget.vue | Adds the optional id field to ContextMenuAction. |
| src/common/syncUtils.ts | Corrects punctuation in an existing comment. |
| README.md | Documents the context-menu customization prop, action IDs, and usage example. |
| package.json | Bumps the package patch version. |
| demo/App.vue | Demonstrates adding linked X/Y-axis actions to the context menu. |
Review effort: Lite
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.
Fixes #23.