feat: group create and append menu elements into categories#88
Draft
AlekseyManetov wants to merge 1 commit into
Draft
feat: group create and append menu elements into categories#88AlekseyManetov wants to merge 1 commit into
AlekseyManetov wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reorganizes the create/append popup menu entries into a nested, drill-in category structure (with descriptions and icons), and adjusts element-template integration and tests to work with the new nested entries format.
Changes:
- Introduces a shared
buildMenuEntriesutility to generate nested (drill-in) popup menu entries from a category/options tree. - Replaces the previous flat
CREATE_OPTIONSlist with a categorizedCREATE_OPTIONS_TREE(including per-entry descriptions and event sub-categories). - Wraps element template entries under a dedicated “Templates” drill-in group and updates tests/helpers to locate nested entries.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/TestHelper.js | Adds findMenuEntry helper to locate nested (drill-in) menu entries by id. |
| test/spec/element-templates/create-menu/ElementTemplatesCreateProvider.spec.js | Updates create-menu template tests to work with nested menu entries and Templates drill-in group. |
| test/spec/element-templates/append-menu/ElementTemplatesAppendProvider.spec.js | Updates append-menu template tests to trigger actions via nested entry lookup. |
| test/spec/create-append-anything/create-menu/CreateMenuProvider.spec.js | Adds assertions for grouped create-menu structure and updates triggering to use nested entries. |
| test/spec/create-append-anything/append-menu/AppendMenuProvider.spec.js | Updates append-menu action triggering to use nested entry lookup. |
| lib/util/PopupMenuEntriesUtil.js | New shared utility to build nested popup menu entries from a category/options tree. |
| lib/util/CreateOptionsUtil.js | Adds descriptions and introduces CREATE_OPTIONS_TREE with event sub-categories; removes old flat grouping approach. |
| lib/element-templates/util/entryBuilder.js | Adds a Templates drill-in wrapper (templatesGroup) with an SVG icon. |
| lib/element-templates/create-menu/ElementTemplatesCreateProvider.js | Wraps template entries under a Templates drill-in group. |
| lib/element-templates/append-menu/ElementTemplatesAppendProvider.js | Wraps template entries under a Templates drill-in group. |
| lib/create-append-anything/create-menu/CreatePaletteProvider.js | Widens the create menu UI (300 → 360). |
| lib/create-append-anything/create-menu/CreateMenuProvider.js | Switches create menu entries to be generated from CREATE_OPTIONS_TREE via buildMenuEntries. |
| lib/create-append-anything/append-menu/AppendMenuProvider.js | Switches append menu entries to be generated from CREATE_OPTIONS_TREE via buildMenuEntries with filtering. |
| lib/create-append-anything/append-menu/AppendContextPadProvider.js | Widens the append menu UI (300 → 360). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
40
to
42
| * @param {djs.model.Base} element | ||
| * | ||
| * @return {Array<Object>} a list of menu entry items |
Comment on lines
49
to
52
| * @param {djs.model.Base} element | ||
| * | ||
| * @return {Array<Object>} a list of menu entry items | ||
| */ |
Comment on lines
+74
to
+88
| export function findMenuEntry(entries, id) { | ||
| for (const key in entries) { | ||
| if (key === id) { | ||
| return entries[key]; | ||
| } | ||
|
|
||
| const found = entries[key].entries && findMenuEntry(entries[key].entries, id); | ||
|
|
||
| if (found) { | ||
| return found; | ||
| } | ||
| } | ||
|
|
||
| return null; | ||
| } |
Comment on lines
+58
to
+62
| return buildMenuEntries(CREATE_OPTIONS_TREE, { | ||
| idPrefix: 'append', | ||
| translate: this._translate, | ||
| filter: (option) => this._includeOption(option), | ||
| createAction: (option) => this._createEntryAction(element, option.target) |
Contributor
Author
6 tasks
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.

Proposed Changes
Related to camunda/camunda-modeler#6037
The create and append popup menus previously showed every element in one long, flat list. This reorganizes them into clear, browsable categories so users can find the right element faster and understand what each one does.
Screen.Recording.2026-07-10.at.16.44.35.mov
Try it:
Checklist
Ensure you provide everything we need to review your contribution:
Closes {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}@bpmn-io/srtool