-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Implement menu options for opening the install file path and Wine prefix in the default file manager #4285
base: main
Are you sure you want to change the base?
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Sorry, to be sure, is there a reason to not use the options we already have by clicking the paths in the Also, some feedback, I don't know if we want to add more actions to the library card context menu, the idea for that menu is to have common actions that most users may need, most users don't need to open those paths in normal use of heroic |
@arielj My bad, I didn't even know you could click that "Installed Information" text, it doesn't look like a button to me at all. I would still personally prefer having those options be more accessible though, I don't often open the game detail page when I'm launching games but I do mod games often so having quick access to the game folder is nice. Maybe the current UI/UX is a little too obscure? As for using the same backend APIs, sure, this is the first time I've looked at the code and I wasn't aware of the existing feature. PS.: The pipeline is complaining about the lock file, probably due to |
I agree the links are hard to find, and it's not obvious they can be clicked, I think it's a good idea to have those links too in the 3-dots menu (the new design have those paths more visible, but it's still not obvious then can be clicked) About the card context menu, I understand that it would be good for your use case, but I don't think that's a general use case (if we add that cause one user wants that, we have to add options for anything other users want). I think the argument there should be: is this something the average user needs to have quick access from the library card? without thinking about how one personally uses Heroic. I can see Play/Logs/Settings/Library modifications/Uninstall to be general use for example. You should revert the package.yml file, yes, in general you don't want to include that file unless you are changing something that would explicitly change node packages. |
@arielj Thanks for your feedback! I get your point about not cluttering the context menu for game cards. It's a personal preference of mine, but having in the three dots menu is good enough to improve discoverability IMO. I wonder if something can be improved about the look of the So in summary, here's what I'm planning to do:
Can I go ahead and make those changes? PS.: I've also manually reverted the lockfile to the one in |
yes, those changes sound good re: the look of |
I'm not sure I understand what's the issue exactly, the prefix path is wrong? or you are saying it shouldn't report that's using wine and it should be native? I think I'm missing some details or context |
It's reporting the presence of a Wine prefix for a native Linux game that I installed on Heroic manually ( I should note that the |
ok so the issue is the value of so I'm guessing the issue is with the EDIT: I think the issue is |
You can do |
ideally, we want to make sure that the The code is already checking I don't know what's the best solution for the whole app, I'd prefer to do something like: when reading the information of the games from disk, we normalize the value, then from that point it's all but I think fixing that should be a different issue and a different PR |
Updated the branch, removing redundant API methods as well as the Removed the menu options from the game card context menu, now they show up only on the game details page's submenu. |
@@ -233,6 +233,24 @@ export default function GamesSubmenu({ | |||
isInstalled && | |||
!isThirdPartyManaged | |||
|
|||
const hasWine = !is.win && !is.native |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to check that gameSettings.wineVersion.type !== "crossover"
cause in that case it uses a crossover bottle and not a prefix
same check is done on the Installed Information paths
HeroicGamesLauncher/src/frontend/screens/Game/GamePage/components/InstalledInfo.tsx
Line 113 in 3f7033e
{wineType === 'crossover' ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case would it be appropriate to rename the option to Browse CrossOver Bottle
when we're dealing with a game that uses CrossOver? Referencing this string:
"winecrossoverbottle": "CrossOver Bottle" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think users need that, bottles should be handle with Crossover's UI so it's better to not let the user mess with the bottle directly
const hasWine = !is.win && !is.native | ||
|
||
const onBrowseFiles = useCallback(() => { | ||
const path = gameInfo.install.install_path || gameInfo.folder_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if gameInfo.folder_name
would help here as a fallback, this is just the folder name, not a path that can be opened
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've copied the way it seems to be done here:
HeroicGamesLauncher/src/frontend/screens/Game/GamePage/components/InstalledInfo.tsx
Line 55 in 3f7033e
const appLocation = install_path || folder_name |
Is this incorrect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm that's weird cause we can't really open just a folder name, it wouldn't be a path, maybe when that was first implemented it was not meant to be clicked, I don't really know, I do think it won't work (you can try it, just remove the gameInfo.instlal.install_path ||
part of that assignment and click the Browse Files
link, I imagine it won't open at all, and if that's the case we can ignore the folder_name
fallback)
Implements #4037
This was a personal nitpick of mine after migrating to Heroic from Lutris since I often need to open the game folder or prefix (changing/installing mods, editing save files in the prefix etc).
I have added menu options for
Browse Files
andBrowse Wine Prefix
to game cards context menus on the game list page as well as in the three dot menu of the game details page.When clicked they will open the default file manager using Electron's
shell.openPath
from the backend. The first option opens the install path of the game (the directory portion of the executable path) while the second option opens the path to the Wine prefix used by the game.I've added checks to ensure the options only show up if the game is installed and if it's a non-native game for the browse prefix option.
I've added English entries for both options in the gamepage translation file so that it could be pushed, not sure if that was the correct way.
Let me know if there are any issues with the PR and thanks for your work on Heroic!
Screenshots
Use the following Checklist if you have changed something on the Backend or Frontend: