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

[admin-settings] context menu shows invalid action items when multiple users are selected #8549

Closed
hurradieweltgehtunter opened this issue Mar 7, 2023 · 1 comment · Fixed by #8785
Assignees
Labels
Priority:p3-medium Normal priority Type:Bug Something isn't working

Comments

@hurradieweltgehtunter
Copy link
Contributor

Steps to reproduce

  1. Go to admin settings -> user
  2. Select multiple users
  3. Open context menu (right click on any user)
  4. Click on menu items (Edit, Delete, Details)

Expected behaviour

Not sure what I was expecting. Edit multiple users at once seems unnecessary, also opening details for multiple users at once.
Only "Delete" makes sense, and this is the only action item which works.

IMO actions items should be shown disabled or hidden, if they are not suitable in the current context.

Actual behaviour

Click on "Edit" -> nothing happens
Click on "Details" -> Nothing happens
Click on "Delete" -> Deletion prompt opens -> ok!

Environment general

https://ocis.ocis-wopi.latest.owncloud.works/

ownCloud Infinite Scale
Community
Version: 2.0.0+2bf458385
WebClient Version: 7.0.0-rc.16

@hurradieweltgehtunter hurradieweltgehtunter added the Type:Bug Something isn't working label Mar 7, 2023
@JammingBen JammingBen added the Priority:p3-medium Normal priority label Mar 21, 2023
@kulmann
Copy link
Member

kulmann commented Mar 29, 2023

In the files app the context menu differs depending on the file selection being a single file or multiple files. I'd apply the same pattern here.

Regarding implementation this means that the action composables in the admin-settings app need to take the number of items into account in their respective isEnabled method.

For examples the useUserActionsEdit composable has return resources.length > 0 as body of the isEnabled method. It should clearly be return resources.length === 1. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p3-medium Normal priority Type:Bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants