Skip to content

Conversation

@ChristophWurst
Copy link
Member

Fixes

[Vue warn]: It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.

found in

---> <NcPopover>
       <NcActions>
         <RouterLink>
           <EnvelopeSkeleton> at src/components/EnvelopeSkeleton.vue
             <Envelope> at src/components/Envelope.vue
               <TransitionGroup>
                 <EnvelopeList> at src/components/EnvelopeList.vue
                   <Mailbox> at src/components/Mailbox.vue
                     <NcAppContentList>
                       <Pane>
                         <Splitpanes>
                           <NcAppContent>
                             <MailboxThread> at src/components/MailboxThread.vue
                               <NcContent>
                                 <Home> at src/views/Home.vue
                                   <App> at src/App.vue
                                     <Root>

after page load

From https://nextcloud-vue-components.netlify.app/#/Components/NcPopover

If you are using your own custom button as a trigger make sure to bind attrs from the trigger slot props.

<template #trigger>
<NcButton variant="tertiary-no-background" :aria-label="t('mail', 'Help')">
<template #trigger="{ attrs }">
<NcButton variant="tertiary-no-background" :aria-label="t('mail', 'Help')" v-bind="attrs">
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks 👍

Why's that a custom button?

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right, it doesn't need attr binding.

When is used as a trigger, it injects required for a11y attributes to the button.

Copy link
Member Author

Choose a reason for hiding this comment

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

Reverted the changes for anc NcButton triggers

@ChristophWurst ChristophWurst merged commit 77f2131 into main Dec 17, 2025
44 checks passed
@ChristophWurst ChristophWurst deleted the fix/ui/popover-trigger branch December 17, 2025 12:47
@kesselb
Copy link
Contributor

kesselb commented Dec 17, 2025

Thanks a lot 🥳

I was looking into that before, but I didn't find that one place where we were not using an NcButton 🙈

Finally that warning is gone 🎉

@kesselb
Copy link
Contributor

kesselb commented Dec 17, 2025

/backport to stable5.6

@ChristophWurst
Copy link
Member Author

I was looking into that before, but I didn't find that one place where we were not using an NcButton 🙈

There was also an nc-vue-internal usage that caused the warning. It's fixed by nextcloud-libraries/nextcloud-vue#7975

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