Shelf-nu / shelf.nu

shelf is open source Asset Management Infrastructure for absolutely everyone.
https://shelf.nu
GNU Affero General Public License v3.0
1.65k stars 145 forks source link

Feature - Bulk actions #1099

Closed rockingrohit9639 closed 5 days ago

rockingrohit9639 commented 1 week ago

PR - #397

DonKoko commented 1 week ago

Okey man, I took the time to make some changes to the code. I have made the new header with handling the title and the selected count and everything so we can go forward. Here is what you should do for the assets index:

DonKoko commented 6 days ago

@carlosvirreira @jurrejansen pushed to testapp and ready to be tested. I tested everything but please take a look and lmk what your feedback is. Then we can release it and look into implementing bulk actions on other views as well.

jurrejansen commented 6 days ago

https://github.com/Shelf-nu/shelf.nu/assets/76112272/76cfe68b-d0a5-4d94-bb19-028b28a8ae32

https://github.com/Shelf-nu/shelf.nu/assets/76112272/beb8fb3e-01be-444e-a89a-2aba41189a2e https://github.com/Shelf-nu/shelf.nu/assets/76112272/b5fab5eb-b1a2-42b8-ade8-dd2d115ea7d8

Screenshot 2024-07-01 at 11 21 42 Screenshot 2024-07-01 at 11 21 23

carlosvirreira commented 6 days ago

@jurrejansen

I'd leave the X as it is super practical. To be honest I did not even notice the other element. I can imagine that to move all that logic 'down there' is considerable work and will block the release.

jurrejansen commented 6 days ago

@carlosvirreira the logic is already there but I'll leave it up to y'all

https://github.com/Shelf-nu/shelf.nu/assets/76112272/24163ac8-d7a4-4031-8633-9748a067113d

carlosvirreira commented 6 days ago
DonKoko commented 6 days ago

Is the little X button that appears when using bulk selection necessary? As far I can see the same can be achieved with the checkbox at the very top and I would remove it. But maybe I am missing something and it was put there for a reason.

Yes we know it can be done via the normal button. I wanted to add an explicit action as that makes it way easier for some users.

@rockingrohit9639 can you look at the rest of the issues.

carlosvirreira commented 6 days ago

[ ]Filtering by available, selecting two pages of assets and assigning to one person generates error. https://github.com/Shelf-nu/shelf.nu/assets/12449255/0bf98832-04e6-43b4-a6c1-4d2dabe1622a

[ ] Filtering by available, selecting one page and assigning to one person works. https://github.com/Shelf-nu/shelf.nu/assets/12449255/a703091e-e4e2-4de8-8a01-8c4f91bd7c1d

jurrejansen commented 6 days ago
DonKoko commented 5 days ago

I think after performing a bulk action the entries that were selected should be deselected afterwards

Carlos gave the opposite feedback of this. I did a little research, namely i checked how supabase does it. They keep the selection so I took the decision to do it that way. I am not 100% sure if thats the best, I think its a judgement call. Lets wait and see how our users react to this. We can easy change it later.