Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add extension point for application menu items #11258

Merged
merged 3 commits into from
Jul 24, 2024

Conversation

JammingBen
Copy link
Collaborator

Description

Adds an extension point for adding items in the top left application switcher menu.

AppMenuItemExtension's can either link to an internal page (via path), an external page (via url) or have a button handler (via handler). Please refer to the docs for more information.

This deprecates the applicationMenu property of the appinfo object.

Also removes ancient menu logic from oC10 times, such as the user menu.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

@JammingBen JammingBen self-assigned this Jul 23, 2024
Copy link

update-docs bot commented Jul 23, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@JammingBen JammingBen force-pushed the feat/app-menu-item-extension-point branch 7 times, most recently from 41f1472 to 6f95ef8 Compare July 23, 2024 11:54
@JammingBen JammingBen marked this pull request as ready for review July 23, 2024 12:53
@JammingBen
Copy link
Collaborator Author

This currently only supports remix icons. Do we need support for icon urls?

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

When I do a production build there is a vue-router error when navigating into an embedded wikipedia.com. doesn't happen with vite 🤔 (tested together with a production build of owncloud/web-extensions#13 in my ocis apps folder)

Adds an extension point for adding items in the top left application switcher menu.

`AppMenuItemExtension`'s can either link to an internal page (via `path`), an external page (via `url`) or have a button handler (via `handler`). Please refer to the docs for more information.

This deprecates the `applicationMenu` property of the appinfo object.

Also removes ancient menu logic from oC10 times, such as the user menu.
@JammingBen JammingBen force-pushed the feat/app-menu-item-extension-point branch from 6f95ef8 to 5819b2b Compare July 24, 2024 06:24
@JammingBen
Copy link
Collaborator Author

When I do a production build there is a vue-router error when navigating into an embedded wikipedia.com. doesn't happen with vite 🤔 (tested together with a production build of owncloud/web-extensions#13 in my ocis apps folder)

Huh, there was an issue with the way I've added the router component. I don't get why this didn't pop up in dev mode... anyway, now it should work (although you need to edit your server's CSP rules to allow an external site being embedded via an iFrame).

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

Hmmm... did I overlook something or is an isVisible callback missing? There are apps, e.g. the admin-settings app, which are only visible to certain users.

docs/extension-system/extension-types/app-menu-items.md Outdated Show resolved Hide resolved
docs/extension-system/extension-types/app-menu-items.md Outdated Show resolved Hide resolved
docs/extension-system/extension-types/app-menu-items.md Outdated Show resolved Hide resolved
@JammingBen
Copy link
Collaborator Author

Hmmm... did I overlook something or is an isVisible callback missing? There are apps, e.g. the admin-settings app, which are only visible to certain users.

Do we need it though? Since it will be the app's duty to register menu items, it can just not register an item if the user doesn't have permissions to see it.

@kulmann
Copy link
Member

kulmann commented Jul 24, 2024

Hmmm... did I overlook something or is an isVisible callback missing? There are apps, e.g. the admin-settings app, which are only visible to certain users.

Do we need it though? Since it will be the app's duty to register menu items, it can just not register an item if the user doesn't have permissions to see it.

Hm true...

Copy link

sonarcloud bot commented Jul 24, 2024

@JammingBen JammingBen merged commit d34db45 into master Jul 24, 2024
3 checks passed
ownclouders pushed a commit that referenced this pull request Jul 24, 2024
…point

feat: add extension point for application menu items
@micbar micbar mentioned this pull request Jul 30, 2024
20 tasks
@kulmann kulmann deleted the feat/app-menu-item-extension-point branch September 5, 2024 19:49
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.

2 participants