Skip to content

feat(manage/media): let some roles wipe all game screenshots#4848

Open
wescopeland wants to merge 3 commits intoRetroAchievements:masterfrom
wescopeland:clear-screenshots-action
Open

feat(manage/media): let some roles wipe all game screenshots#4848
wescopeland wants to merge 3 commits intoRetroAchievements:masterfrom
wescopeland:clear-screenshots-action

Conversation

@wescopeland
Copy link
Copy Markdown
Member

sail artisan migrate

http://localhost:64000/manage/games/44/media

This PR lets admins, game editors, and media editors invoke an action to clear/reset all screenshots for a game. This effectively soft-deletes all the game_screenshot entities associated with the game and restores the original placeholder images.

This is a destructive action buried in a new header menu:

Screenshot 2026-05-03 at 3 32 24 PM
Screenshot 2026-05-03 at 3 32 30 PM
Screenshot 2026-05-03 at 3 32 36 PM
Screenshot 2026-05-03 at 3 32 11 PM

@wescopeland wescopeland requested a review from a team May 3, 2026 22:34
->label('Deleted screenshots')
->placeholder('Current screenshots')
->trueLabel('All screenshots')
->falseLabel('Deleted screenshots'),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This filter feels wrong.

Image

I'm not viewing "Currently Deleted screenshots", I'm viewing non-deleted screenshots.

And I'm not sure that I like the way it combines with the other filter:

Image

I feel like Deleted should just be its own Status. What does it mean to have a Deleted Published screenshot?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrestled with this too when figuring out what solution I wanted to build for this functionality. My original idea was to have an "Archived" status, but that felt awfully ambiguous with "Rejected" also in the mix.

A deleted screenshot having a status of published means, on restore, the screenshot will be published again. That makes cleanly undoing the delete possible.

Here's where I've landed in latest - no more trashed entity filter. It's disguised as a Status to hopefully be more intuitive even though the underlying model is unchanged:
Screenshot 2026-05-06 at 7 44 35 PM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A screenshot cannot be re-uploaded if it's identical to a deleted one.

Image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. This is intentional, especially through the player-facing UI. Reasoning: if some back office action deleted the image, it shouldn't be reuploaded by a player again for back office review.

->modalDescription(fn (GameScreenshot $record): string => $record->is_primary
? 'This is a primary screenshot. The next published screenshot of this type will be promoted automatically, or the placeholder will be restored.'
: 'Are you sure you want to delete this screenshot?')
: 'Are you sure you want to permanently delete this screenshot?')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I get this button? I can't delete individual screenshots.

Image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the previous diff, it authorized implicitly against the deletion policy (original uploader + still Pending). I think we should remove it altogether TBH, which I've done in latest.

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