feat(manage): add achievement relation manager for games
This PR ports most (all?) of the functionality from the achievement inspector to the management app.
Developers are able to:
- Drag and drop to reorder achievements.
- Toggle code columns.
- Bulk promote and demote.
- Bulk assign/remove types.
Additionally, actions are guarded using the AchievementPolicy, ensuring that Jr Devs can't update things they're not supposed to be able to.
The achievements are now listed on the game view page, eg: /manage/games/1.
I wish there was a way to pop some kind of "Success!" confirm on reordering. Unfortunately, it doesn't look like Filament supports this.
https://github.com/RetroAchievements/RAWeb/assets/3984985/1855cebb-ee1c-40ab-9ecf-a49ebde0d975
Drag and drop reorder doesn't seem to work for me. The cursor turns into a red NOT symbol (cursor doesn't appear in screenshot, so I can't really share).
I'm having trouble reproducing this issue on your account. Do you have the developer role assigned?
I recently took a fresh snapshot of prod and noticed your account didn't have the role. Upon assigning the role, I'm able to drag and drop to reorder achievements with your account.
I've had to add that role for other features. This is what I currently look like locally:
Those are the same roles my account has.
Are you able to reproduce this issue in other browsers? I'm able to successfully drag+drop with Chrome and Firefox. I've also tested with multiple user accounts and multiple roles.
Can you also try ensuring Vite is running? Can you try sail artisan cache:clear and sail artisan view:clear? I've noticed Filament seems to very aggressively lean into caching and even while doing active development I have to frequently clear Laravel's various caches.
I get the same behavior in Chrome and Edge. Firefox doesn't give me the NO sign, but it doesn't seem to actually rearrange anything either.
Output from provided commands:
jamiras@ubuntu24 pr/2516:~/source/RAWeb$ sail artisan cache:clear
INFO Application cache cleared successfully.
jamiras@ubuntu24 pr/2516:~/source/RAWeb$ sail artisan view:clear
INFO Compiled views cleared successfully.
I also see the same behavior logged in as your user (same set of roles)
Understood, thank you for trying those things.
There must be a difference between our two setups somewhere; I'm having a hard time right now thinking of what it might be. After #2502 is done using preview, maybe what would be best is to deploy this branch onto preview and see if the issue still surfaces in that environment.
User error. You have to click the
before reordering is allowed.
It acts like things can be dragged before clicking it.
Latest includes a slight change to the reorder button to hopefully improve its usability.