Skip to content

Feat/context menu and enhancement actions#1787

Closed
caduHD4 wants to merge 14 commits intohydralauncher:mainfrom
caduHD4:feat/context_menu-and-enhancement-actions
Closed

Feat/context menu and enhancement actions#1787
caduHD4 wants to merge 14 commits intohydralauncher:mainfrom
caduHD4:feat/context_menu-and-enhancement-actions

Conversation

@caduHD4
Copy link
Copy Markdown
Contributor

@caduHD4 caduHD4 commented Sep 21, 2025

When submitting this pull request, I confirm the following (please check the boxes):

  • I have read and understood the Contributor Guidelines.
  • I have checked that there are no duplicate pull requests related to this request.
  • I have considered, and confirm that this submission is valuable to others.
  • I accept that this submission may not be used and the pull request may be closed at the discretion of the maintainers.

Fill in the PR content:


Description

This PR introduces a context menu (right-click) for games in the library, providing new interaction and management options.
It also improves the repacks modal with filtering, source management, and clearer usability.


Main Changes

  • Context Menu for games

    • Implemented ContextMenu and GameContextMenu with actions:

      • Play (when installed)
      • Add to Favorites
      • Manage (open folder, view download options, remove from library, etc.)
      • Create Shortcut (Desktop, Steam, Start Menu)
    • Support for both installed and non-installed games.

    • Integrated with useGameActions to centralize all available actions.

    • Updated SidebarGameItem to open the context menu on right-click.

  • Repacks Modal

    • Added filter by source.
    • Added button to add new source if none are available.
    • Add new confirm modal for context game menu.
  • Translations

    • Added new keys for Properties and Favorites across multiple languages.

📸 Screenshots & Analysis

1. Context menu on installed game

Context menu on installed game — options: Play, Add to Favorites, Create Shortcut, Manage

When right-clicking an installed game, the context menu provides:

  • Play — launches the game directly.
  • Add to Favorites — pins the game to the favorites section in the sidebar.
  • Create Shortcut — opens a submenu with shortcut options.
  • Manage — opens a submenu with advanced management actions (see below).

2. Manage submenu

Manage submenu — Open Folder, Download Options, Remove from Library

Expands the Manage option, showing additional actions:

  • Open Folder — opens the installation folder of the game.
  • View Download Options — opens the repacks modal to choose versions or sources.
  • View Downloaded Files — lists downloaded repack files.
  • Remove from Library — removes the game entry from the library.
  • Remove Files — deletes local files from disk.

3. Shortcuts submenu

Shortcuts submenu — Create Shortcut (Desktop, Steam, Start Menu)

The Create Shortcut submenu expands to provide:

  • Desktop — create a desktop shortcut for the game.
  • Steam — add a shortcut to the Steam client.
  • Start Menu — create a Start Menu shortcut for quick access.

4. Repacks Modal with source filter

Repacks modal with source filter

Updated repacks modal featuring:

  • Source filter — quickly filter repacks by source.

5. Repacks Modal with no sources available

Repacks modal with no sources available — Add Source button

When no sources are available for a game:

  • A “No source found” message is displayed.
  • A “Add Source” button allows users to manually configure a new repack source.

6. Context menu on non-installed game

Context menu on non-installed game — Download, Favorites, Manage

For non-installed games, the context menu replaces Play with:

  • Download — opens the repacks modal to install the game.
    Other options (Favorites, Manage, Properties) remain consistent.

7. Confirmation modal before removing game

Confirmation modal — Remove game from library

Before removing a game from the library, a confirmation modal is shown with:

  • Clear warning message about the action.
  • Remove and Cancel buttons for user confirmation.

✅ Implemented

  • Full context menu for games (installed and non-installed).
  • Submenus for Manage and Shortcuts.
  • Enhanced repacks modal (filter + add source button).
  • Confirmation modal before game removal.
  • New translations for Properties and Favorites.

Developer Notes

I’m aware that there is already a generic confirmation modal available in the project, but since it is more tightly integrated with the game-options-modal, I decided to implement a separate component for this PR.

If you think it would be better to follow the existing project architecture, feel free to refactor and replace it with the standard modal.

The same applies to any other part of this implementation that may not strictly follow the existing patterns — I tried to leverage the already available game actions as much as possible. It took a bit of time to get the context menu working smoothly, but in the end it came together well.

I’d really appreciate it if this could be approved for the next update, as long as there are no merge conflicts. 🙏

I’m confident that users are going to love this feature. 🚀

- Added ContextMenu and GameContextMenu with actions (play, favorite, manage).
- Integrated useGameActions hook and updated SidebarGameItem for right-click menu.
- Enhanced game details and RepacksModal (filters, styling, disabled states).
@Altansar69
Copy link
Copy Markdown

It's something I really wanted to have. Thank you!

@Helon21
Copy link
Copy Markdown

Helon21 commented Sep 22, 2025

It turned out really well, it really is very useful, congratulations.

@Gabriel-S-O
Copy link
Copy Markdown

Nice work, that's a life changer feature

@chubbygrannychaser
Copy link
Copy Markdown
Contributor

@caduHD4 thanks for the fantastic work done here, but could you please create separate PRs for each of the features you have made? Plus, you can keep the translations to just English + your native language if you will. The community can translate the rest.

@caduHD4
Copy link
Copy Markdown
Contributor Author

caduHD4 commented Sep 25, 2025

@caduHD4 thanks for the fantastic work done here, but could you please create separate PRs for each of the features you have made? Plus, you can keep the translations to just English + your native language if you will. The community can translate the rest.

Sure, as soon as possible I'll separate them and resubmit the PRs. I added the translations for all languages, so should I just leave them in en and pt-br, or should I keep the ones I translated?

@chubbygrannychaser
Copy link
Copy Markdown
Contributor

@caduHD4 thanks for the fantastic work done here, but could you please create separate PRs for each of the features you have made? Plus, you can keep the translations to just English + your native language if you will. The community can translate the rest.

Sure, as soon as possible I'll separate them and resubmit the PRs. I added the translations for all languages, so should I just leave them in en and pt-br, or should I keep the ones I translated?

Please remove the additional ones that you have translated.
Thank you.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@caduHD4
Copy link
Copy Markdown
Contributor Author

caduHD4 commented Sep 28, 2025

@thegrannychaseroperation I made two other PRs for the features, and removed the extra languages, can I close this PR?

@chubbygrannychaser
Copy link
Copy Markdown
Contributor

Closing since it has been handled by other PRs.

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.

5 participants