feat(plugins): add service context menus and free-form canvases - #4038
Open
blackbartblues wants to merge 2 commits into
Open
feat(plugins): add service context menus and free-form canvases#4038blackbartblues wants to merge 2 commits into
blackbartblues wants to merge 2 commits into
Conversation
blackbartblues
marked this pull request as ready for review
August 20, 2026 21:47
Contributor
Author
2026-08-20_23-42-54-github.mp4 |
Contributor
Author
|
@ItsLemmy Could you review it? |
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
service.openContextMenu(request)x/y,zIndex,clipChildren, and inputonPressonDrop(payload, target, x, y), returning the clamped target-local preview positiondecorated = falsepanel manifest option for plugin-owned fullscreen canvasesMotivation
Plugins can already build regular context menus from direct panel pointer callbacks, but a singleton service invoked through IPC cannot currently open the same native menu at the cursor. This prevents keyboard-driven selection workflows such as selecting text, invoking a shortcut, and choosing a plugin action without opening a full panel.
Card-based plugins also need a real free-form canvas. Existing declarative drag and drop reports only the source payload and target ID, so a dropped card cannot persist its visual position. Absolute layout and target-local drop coordinates make sticky notes, dashboards, diagram nodes, spatial organizers, and similar plugin surfaces possible without plugin-specific core code.
The service popup path is compositor-independent. It does not query global cursor coordinates or call compositor IPC.
Type of Change
Related Issue
Follow-up to #3899 and the panel context-menu implementation in #3906.
Testing
just formatmeson test -C build-freeform --print-errorlogs— 90/90 passednoctalia plugins lintagainst the Clipper consumer — 0 errors, 0 warningsManual Coverage
The popup implementation itself uses generic Wayland protocols; compositor-specific coverage remains useful before marking the PR ready.
Screenshots / Videos
Live screenshots for the cursor menu and free-form Clipper canvas are available and will be attached before the draft is marked ready.
Checklist
CONTRIBUTING.md.just formatwith clang-format v22+ installed, or this PR has no code changes.assets/translations/en.json, or this PR adds no new user-facing strings.Additional Notes
API 29 intentionally groups the service-menu and free-form-canvas contracts into one cumulative plugin API level. Existing Plugin API 28 panel context menus remain unchanged.
The documentation update belongs to the separate
noctalia-docsrepository. Its follow-up needs to cover the API ledger,service.openContextMenu, absolute positioning, four-argument drop callbacks, inputonPress, and thedecoratedpanel manifest key.