-
Notifications
You must be signed in to change notification settings - Fork 88
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
Fix single button action icon attribute #3006
Fix single button action icon attribute #3006
Conversation
Signed-off-by: Vincent Petry <[email protected]>
Signed-off-by: Vincent Petry <[email protected]>
the old button on stable5 was rendered directly and using the class https://github.com/nextcloud/nextcloud-vue/blob/stable5/src/components/Actions/Actions.vue#L181-L182 so this fix also passes the icon attribute if the icon slot is not used |
At least from my side, this is a "planned regression" aka breaking change. When moving the
From my side, the proper solution is to populate the icon slot of the ActionElements (i.e. The other approach would be to re-implement icon-classes for the I would like to hear what @skjnldsv things about this. |
the icon classes still seem to be working when inside the menu, so probably they were not fully removed from my understanding the reason we wanted the new Actions impl was because it was the only way to also fix the infinite loop related to floating vue, and we definitely want floating vue on the server for accessibility reasons, but don't have time yet to adjust all apps to move away from using icons so I'm not sure if now is the right time to remove the icon classes ? let's see what others say |
and thanks for clarifying! |
as we need to move forward a bit quickly, I've merged this now I've raised #3007 to continue the discussion and to plan the removal of icon support |
Since #3006 removes the breaking part of #2911, it was moved to enhancements Signed-off-by: Vincent Petry <[email protected]>
I guess the solution is simple enough to have it implemented, so fine with me. But what still does not work is multiple actions with custom icon class:
|
@raimund-schluessler it worked on this PR, this is why I modified one of the examples to use an attr icon, see: and also it was working on nextcloud/server#33508 (comment) from the dropdown menus which also use icon attributes: https://github.com/nextcloud/server/blob/update-nextcloud-vue-6.0.0-beta.1/apps/files_sharing/src/components/SharingEntryLink.vue#L285 |
... and because it was working it made me wonder if something got omitted/forgotten during the Actions port to render function |
bad screenshot, the slot is populated, will do another one |
I've updated the screenshot in #3006 (comment) with the styleguide from master where I unpopulated the slot and use only attr for inside the menu |
I removed the |
I will provide a PR later today. |
@raimund-schluessler thanks a lot for bringing this up, clarifying and looking forward to your PR :-) |
Actual:
Expected:
The icon should appear.
It already works with this format when inside the popover, it's only when there's only a single action that it doesn't.
The component is used that way in many places in the server, see nextcloud/server#33508 (comment)