From 289f0eb377b1e51a5837b7c787beb837b5cf53c5 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 3 Sep 2024 08:15:36 +0200 Subject: [PATCH] feat: support `a` as component type in actions (#11502) * feat: support a as component type in actions --- .../unreleased/enhancement-action-a-tags | 5 +++ .../extension-types/actions.md | 7 ++-- .../general/useGeneralActionsResetLogo.ts | 1 - .../general/useGeneralActionsUploadLogo.ts | 1 - .../groups/useGroupActionsCreateGroup.ts | 1 - .../actions/groups/useGroupActionsDelete.ts | 1 - .../actions/groups/useGroupActionsEdit.ts | 1 - .../users/useUserActionsAddToGroups.ts | 1 - .../actions/users/useUserActionsCreateUser.ts | 1 - .../actions/users/useUserActionsDelete.ts | 1 - .../actions/users/useUserActionsEdit.ts | 1 - .../actions/users/useUserActionsEditLogin.ts | 1 - .../actions/users/useUserActionsEditQuota.ts | 1 - .../users/useUserActionsRemoveFromGroups.ts | 1 - .../actions/useAppActionsDownload.ts | 1 - .../spaces/useSpaceActionsUploadImage.ts | 1 - .../SideBar/Actions/FileActions.spec.ts | 4 -- packages/web-app-importer/src/extensions.ts | 1 - packages/web-app-ocm/src/extensions.ts | 1 - .../components/AppTemplates/AppWrapper.vue | 5 +-- .../ContextActions/ActionMenuItem.vue | 39 ++++++++++++++----- .../actions/files/useFileActions.ts | 1 - .../actions/files/useFileActionsCopy.ts | 1 - .../files/useFileActionsCopyQuicklink.ts | 1 - .../actions/files/useFileActionsCreateLink.ts | 2 - .../files/useFileActionsCreateNewFile.ts | 1 - .../files/useFileActionsCreateNewFolder.ts | 1 - .../files/useFileActionsCreateNewShortcut.ts | 1 - .../useFileActionsCreateSpaceFromResource.ts | 1 - .../actions/files/useFileActionsDelete.ts | 2 - .../files/useFileActionsDisableSync.ts | 1 - .../files/useFileActionsDownloadArchive.ts | 1 - .../files/useFileActionsDownloadFile.ts | 1 - .../files/useFileActionsEmptyTrashBin.ts | 1 - .../actions/files/useFileActionsEnableSync.ts | 1 - .../actions/files/useFileActionsFavorite.ts | 1 - .../actions/files/useFileActionsMove.ts | 1 - .../actions/files/useFileActionsNavigate.ts | 1 - .../files/useFileActionsOpenShortcut.ts | 1 - .../files/useFileActionsOpenWithApp.ts | 1 - .../actions/files/useFileActionsPaste.ts | 1 - .../actions/files/useFileActionsRename.ts | 1 - .../actions/files/useFileActionsRestore.ts | 1 - .../actions/files/useFileActionsSetImage.ts | 1 - .../files/useFileActionsShowActions.ts | 1 - .../files/useFileActionsShowDetails.ts | 1 - .../actions/files/useFileActionsShowShares.ts | 1 - .../files/useFileActionsToggleHideShare.ts | 1 - .../actions/spaces/useSpaceActionsDelete.ts | 1 - .../actions/spaces/useSpaceActionsDisable.ts | 1 - .../spaces/useSpaceActionsDuplicate.ts | 1 - .../spaces/useSpaceActionsEditDescription.ts | 1 - .../spaces/useSpaceActionsEditQuota.ts | 1 - .../useSpaceActionsEditReadmeContent.ts | 1 - .../spaces/useSpaceActionsNavigateToTrash.ts | 1 - .../actions/spaces/useSpaceActionsRename.ts | 1 - .../actions/spaces/useSpaceActionsRestore.ts | 1 - .../actions/spaces/useSpaceActionsSetIcon.ts | 1 - .../spaces/useSpaceActionsShowMembers.ts | 1 - .../web-pkg/src/composables/actions/types.ts | 4 +- .../actions/useActionsShowDetails.ts | 1 - .../ContextActions/ActionMenuItem.spec.ts | 19 ++++++++- 62 files changed, 59 insertions(+), 81 deletions(-) create mode 100644 changelog/unreleased/enhancement-action-a-tags diff --git a/changelog/unreleased/enhancement-action-a-tags b/changelog/unreleased/enhancement-action-a-tags new file mode 100644 index 00000000000..b4903aad14f --- /dev/null +++ b/changelog/unreleased/enhancement-action-a-tags @@ -0,0 +1,5 @@ +Enhancement: Support a tags in actions + +We've added support for `a` tags in actions. This allows developers to create action extensions for e.g. opening file-specific URLs from the context menu. + +https://github.com/owncloud/web/pull/11502 diff --git a/docs/extension-system/extension-types/actions.md b/docs/extension-system/extension-types/actions.md index ea7119b37ea..0e8d86ee8e6 100644 --- a/docs/extension-system/extension-types/actions.md +++ b/docs/extension-system/extension-types/actions.md @@ -36,9 +36,9 @@ The most important configuration options are: - `icon` - The icon to be displayed, can be picked from https://owncloud.design/#/Design%20Tokens/IconList - `name` - The name of the action (not displayed in the UI) - `label` - The text to be displayed -- `route` - The string/route to navigate to, if the nav item should be a `` -- `handler` - The action to perform upon click, if the nav item should be a `