Skip to content

Allow an app to customise the items of the context menu - #24

Merged
agarny merged 2 commits into
opencor:mainfrom
agarny:issue23
Dec 1, 2026
Merged

agarny merged 2 commits into
opencor:mainfrom
agarny:issue23

Conversation

@agarny

@agarny agarny commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #23.

…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.
Copilot AI lite review requested due to automatic review settings December 1, 2026 12:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 contextMenuItems prop 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

@agarny
agarny merged commit 51b6c85 into opencor:main Dec 1, 2026
5 checks passed
@agarny
agarny deleted the issue23 branch December 1, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow an app to customise the items of the context menu

2 participants