-
Notifications
You must be signed in to change notification settings - Fork 85
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] doesn't support non-direct NcAction* usage #5171
Comments
The current idea:
|
@ShGKme thanks a lot for this fix! Could this issue be closed? |
Unfortunately, no, until Vue 3 migration. My hotfix only brings back an old behavior when it "works in general", but has a number of limitations, including in a11y. I only fixed a new "completely broken" state. For a full-working solution, we need to either search for |
UPDATE: Vue 3 has the same limitation |
The problem is that in
NcActions
we manually take actions from slot in render function.And some parts check, what exactly action do we have.
For example, here (1)
nextcloud-vue/src/components/NcActions/NcActions.vue
Lines 1058 to 1060 in 0b1bf86
and here (2)
nextcloud-vue/src/components/NcActions/NcActions.vue
Lines 1321 to 1327 in 0b1bf86
Because as an action name we take vnode's component instance's name:
nextcloud-vue/src/components/NcActions/NcActions.vue
Lines 1047 to 1049 in 0b1bf86
For
MyActionWrapper
it will beMyActionWrapper
even if it renders<NcActionButton>
.While (1) only results in broken
inline
feature, (2) now breaks a whole<NcActions>
when we use custom wrappers.The complex part here is that in Vue when a parent is being rendered, it has no child yet. So we cannot just make recursive
getActionName
. So during NcActions rendering we have no idea what childMyActionWrapper
way actually be.The text was updated successfully, but these errors were encountered: