Skip to content

feat(contexts): edit the menu when creating an application - #3089

Closed
remko48 wants to merge 6 commits into
feat/noid/menu-nestingfrom
feat/noid/menu-editor
Closed

remko48 wants to merge 6 commits into
feat/noid/menu-nestingfrom
feat/noid/menu-editor

Conversation

@remko48

@remko48 remko48 commented Oct 13, 2026

Copy link
Copy Markdown

The create application dialog gets a menu editor, so an application can be created with its menu in one go.

What changes

  • MenuItemsEditor: an ordered list of menu items. Each item has an icon, a label and what it opens: a view, a page with widgets, a table or an external link. Only tables and views the user can manage are offered, since the server adds them to the application as resources. Picking a view or table fills in an empty label.
  • Ordering and nesting: entries can be dragged by their handle, and every entry has move up/down buttons plus an indent button (top-level entries) or an outdent button (child entries), so the menu can be arranged with the keyboard. A parent moves together with its children; an entry with children cannot be indented; removing a parent moves its children to the top level instead of deleting them.
  • Validation: the editor checks every entry with the same rules as the server (label, target, http/https link). Errors show once a row is left, and all of them on submit; an invalid menu blocks creating the application.
  • ApplicationIcon: shows a material icon by name, used for the menu item icons.
  • menuItems.js: the list operations of the editor, and turning its list into the API payload, including parentIndex for nested items.
  • CreateContext: sends the menu with the new application.
  • Deleting an application (existing behaviour on main, not caused by this stack): the delete removes the application first, inside a transaction that is retried, so it holds the write lock before it reads. On SQLite a delete that read first failed at once when another request wrote meanwhile.
  • Tests: a Cypress component test covers the list operations, and a unit test covers the delete order.

🖼️ Screenshots

🏚️ Before 🏡 After
|

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stableX.X
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

remko48 and others added 5 commits October 12, 2026 13:37
The create dialog gets a menu editor. Every entry opens a view, a table or
an external link, can carry an icon and can sit under the top-level entry
above it, one level deep.

- entries are reordered by dragging or with move buttons, and moved in and
  out of a parent with indent buttons, so the menu can be arranged with
  the keyboard
- a parent moves together with its children; removing a parent moves its
  children to the top level

Co-authored-by: Ruben van der Linde <ruben@conduction.nl>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
- the menu only offers tables and views the user can manage, like the resource picker
- rows with a missing label, target or a bad link are marked, and creating waits until all are valid
- the list operations are pure functions in utils/menuItems.js, covered by a component spec
- option labels are translated as one string, and the label is taken from the option's title
- only the handle starts a drag, so text in the fields stays selectable
- buttons and rows name their item for screen readers
- a slower icon load no longer replaces a newer one
- no CSS fallbacks, capitalised comments and JSDoc on every method

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
- a new menu item no longer starts red: a row shows its errors once a field of it was left
- the target error goes through the select's own helper text, so screen readers announce it
- releasing the drag handle anywhere, or a cancelled pointer, makes the row plain again

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
- deleting an application retries on a retryable database error and removes the application
  row first, so on SQLite the transaction holds the write lock before it reads and no longer
  fails when another request writes meanwhile
- Create application stays enabled: submitting shows every menu error and stops while the menu
  is invalid
- the target error is shown in the error style, like the label and link errors

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
@remko48
remko48 requested review from blizzz and enjeck as code owners October 13, 2026 14:39
@remko48
remko48 added this pull request to stack #3090 October 13, 2026 14:39
@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@rubenvdlinde

Copy link
Copy Markdown

Closing this in favour of the new stack that starts at #3131. After the review on #3075, @enjeck's design in #3099 and #3100 replaced the model these PRs were built on, so they can't be updated in place.

The backend of grid pages and application menus is now in #3131 to #3138. The frontend follows in separate PRs. @remko48 is co-author on the menu commits there. Thanks to everyone who reviewed these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants