Skip to content

Commit

Permalink
fix(menubar): name ActionFormattingHelp as NcActionButton to support …
Browse files Browse the repository at this point in the history
…NcActions

Signed-off-by: Grigorii K. Shartsev <[email protected]>
  • Loading branch information
ShGKme committed Feb 1, 2024
1 parent e851f88 commit 9d31390
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/components/Menu/ActionFormattingHelp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,30 @@
-
-->
<template>
<NcActionButton close-after-click
<NextcloudVueNcActionButton close-after-click
data-text-action-entry="formatting-help"
v-on="$listeners">
<template #icon>
<Help />
</template>
{{ t('text', 'Formatting help') }}
</NcActionButton>
</NextcloudVueNcActionButton>
</template>

<script>
import { defineComponent } from 'vue'
import { NcActionButton } from '@nextcloud/vue'
import { NcActionButton as NextcloudVueNcActionButton } from '@nextcloud/vue'
import { Help } from '../icons.js'
export default defineComponent({
name: 'ActionFormattingHelp',
// This component is used as a direct child of NcActions.
// Even if it actually renders NcActionButton, NcActions cannot see it due to rendering limitations in Vue.
// Though it works in general, NcActions doesn't handle it correctly. See NcActions docs for details.
// Hotfix - rename the component to NcActionButton because it represents and renders it.
// eslint-disable-next-line vue/match-component-file-name
name: 'NcActionButton',
components: {
NcActionButton,
NextcloudVueNcActionButton,
Help,
},
})
Expand Down

0 comments on commit 9d31390

Please sign in to comment.