Skip to content

[ROMM-1780] Random game button #2091

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

Merged
merged 3 commits into from
Jul 18, 2025
Merged

[ROMM-1780] Random game button #2091

merged 3 commits into from
Jul 18, 2025

Conversation

gantoine
Copy link
Member

Description
Explain the changes or enhancements you are proposing with this pull request.

This PR adds a random game button to the filter bar on platform, collection and search views. The selected game is based on the selection platform, collection or search term + the list of active filters. We make 1 request to get the total number of games, and another with a random offset and 1 returned game.

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Screenshots

Screenshot 2025-07-18 at 9 39 38 AM

@gantoine gantoine requested review from zurdi15 and Copilot July 18, 2025 13:41
Copy link

trunk-io bot commented Jul 18, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

Copilot

This comment was marked as outdated.

@gantoine gantoine requested a review from Copilot July 18, 2025 15:31
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a random game button to the filter bar on platform, collection, and search views. The button allows users to get a random game based on their current context (platform, collection, or search term) and active filters.

  • Adds a new ContextualRandomBtn component that makes API calls to get a random game
  • Updates the gallery app bar to include the random button
  • Refactors navigation button components to use utility CSS classes instead of custom styles
  • Adds internationalization support for the "random" text across all supported languages

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
frontend/src/components/Gallery/AppBar/common/ContextualRandomBtn.vue New component implementing the random game functionality
frontend/src/components/Gallery/AppBar/Base.vue Integrates the random button into the gallery app bar
frontend/src/components/common/Navigation/*.vue Refactors button styling to use utility classes
frontend/src/locales/*/common.json Adds "random" translation key across all supported languages
frontend/src/components/common/Navigation/MainAppBar.vue Updates tabindex ordering and button positioning

@gantoine gantoine merged commit a323721 into master Jul 18, 2025
9 checks passed
@gantoine gantoine deleted the random-game-btn branch July 18, 2025 15:41
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.

1 participant