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

feat(manage): add achievement relation manager for games #2516

Merged

Conversation

wescopeland
Copy link
Member

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.

Brave.Browser.mp4

@Jamiras
Copy link
Member

Jamiras commented Jul 17, 2024

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).

@wescopeland
Copy link
Member Author

I'm having trouble reproducing this issue on your account. Do you have the developer role assigned?

Screenshot 2024-07-17 at 5 30 36 PM

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.

@Jamiras
Copy link
Member

Jamiras commented Jul 17, 2024

I've had to add that role for other features. This is what I currently look like locally:
image

@wescopeland
Copy link
Member Author

wescopeland commented Jul 17, 2024

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.

@Jamiras
Copy link
Member

Jamiras commented Jul 17, 2024

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)

@wescopeland
Copy link
Member Author

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.

@Jamiras
Copy link
Member

Jamiras commented Jul 17, 2024

User error. You have to click the
image
before reordering is allowed.

It acts like things can be dragged before clicking it.

@wescopeland
Copy link
Member Author

Latest includes a slight change to the reorder button to hopefully improve its usability.

Screenshot 2024-07-17 at 8 16 57 PM

@wescopeland wescopeland merged commit f30819d into RetroAchievements:master Jul 21, 2024
5 checks passed
@wescopeland wescopeland deleted the game-achievement-manager branch July 21, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants