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

[NcActions] Proposal: submenu support #6066

Open
ShGKme opened this issue Sep 9, 2024 · 0 comments · May be fixed by #6209
Open

[NcActions] Proposal: submenu support #6066

ShGKme opened this issue Sep 9, 2024 · 0 comments · May be fixed by #6209
Assignees
Labels
enhancement New feature or request feature: actions Related to the actions components

Comments

@ShGKme
Copy link
Contributor

ShGKme commented Sep 9, 2024

Currently sub menus are implemented almost manually via:

  • <template v-if>
  • <NcActionButton is-menu>

It works, but:

  • Not great in a11y, including lack of attributes and focus movement
  • Not very semantic for developers
  • Requires manual implementing of menu/submenu state, the back button

Proposal: allow to use slots for additional menus like

<NcActions>
  <template #default>
    <NcActionButton menu="foo">
      Sub-menu foo
    </NcActionButton>
  </template>
  
  <template #menu-foo>
    <!-- Content -->
  </template>
</NcActions>

So that:

  • Formal is-menu buttons actually switch to another slot (just renders other buttons)
  • We have a better separation between sub-menus
  • We can implement it internally with a11y

The only thing I don't like here, is that we still have to check for the default slot for inline buttons...

What do you think?

@ShGKme ShGKme added enhancement New feature or request feature: actions Related to the actions components labels Sep 9, 2024
@ShGKme ShGKme self-assigned this Sep 9, 2024
@ShGKme ShGKme changed the title [NcActions] Proposal: submenu [NcActions] Proposal: submenu support Sep 9, 2024
@ShGKme ShGKme linked a pull request Nov 12, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature: actions Related to the actions components
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant