-
-
Notifications
You must be signed in to change notification settings - Fork 52
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-560] ask user for installation folder/path #566
Conversation
@silentrald Maybe its a good its to add an explaining text between the title and the "choose folder" field 🤔 |
@Zagrios that should be fine, will follow "Choose the folder that will contain all the content downloaded by BSManager". Might need to update the settings page explanation text as well if that's the case, to pattern these two. Will still use the above text and change "Choose" to "Change". Although, what do you think, should I change it or leave it as is? Also for the translation, should I ping someone in the discord channel so that I can fit it in the PR, or do we delay the translation and let someone just translate it before the next alpha release? |
@silentrald you can change it, it's sounds good to me 👍 I also notice that you made change to the cache system to wait for the user choosing a folder, thats made me wondering if I should move those cache files to the installation folder of BSM that's will always be on the "main" drive of the user 🤔 Cause all the cache files are there to improve perfomances, and the user's "main" drive is more likely to be an hight performance drive (like ssd rather than a hdd or a local network drive) 🤔 |
@silentrald Also maybe add a Tooltip on on the "Default" button to indicate that this will chose the home folder of the user |
Yeah I think moving it to the installation folder might be better. Something like a Also context for why I did that as well, had to delay the instantiation of the ElectronStore object since this automatically creates the installation folder and the |
src/shared/models/ipc/ipc-routes.ts
Outdated
@@ -43,6 +41,12 @@ export interface IpcChannelMapping { | |||
"bsv-search-playlist": {request: PlaylistSearchParams, response: BsvPlaylist[]}; | |||
"bsv-get-playlist-details-by-id": {request: {id: string, page: number}, response: BsvPlaylistPage}; | |||
|
|||
/* ** bs-installer-ipcs ** */ | |||
"bs-installer.folder-exists": { require: void, response: boolean }; |
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.
You wrote require
here
"bs-installer.folder-exists": { require: void, response: boolean }; | |
"bs-installer.folder-exists": { request: void, response: boolean }; |
return ( | ||
<Tippy | ||
className="!bg-main-color-1" | ||
content={t(tooltip)} |
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 meant, adding a tooltip while hovering the button globally, like this users are sure to see the tooltip.
So no need to add all this stuff in the button component
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.
Ahhh, sorry about that, thought we needed an icon for it, will apply a commit for this.
} | ||
|
||
let modalResponse: ModalResponse<{ installPath: string }> = { exitCode: ModalExitCode.NO_CHOICE }; | ||
while (modalResponse.exitCode !== ModalExitCode.COMPLETED) { |
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.
Do we still need the while loop here ? since the modale is marked as non closable ?
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.
Yeah, I think the loop there can be removed as well
@silentrald can you resove confict ? |
added check if ElectronStore is null
added tooltip support in BsmButton component
@Zagrios rebased and resolved the conflicts. Also removed the waiting on setup as well. |
@silentrald I've found a little bug, when I select a folder from the modal, the installation path doesn't change in the settings, and I have this error:
See gif: |
@Zagrios yep, seems that I haven't covered the case where the oldDir doesn't exist in the |
Quality Gate passedIssues Measures |
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.
That seems good to me 🙌
Thanks !
Scope
closes TICKET-560
closes TICKET-481
Implementation
Added a way to ask the user for an existing or non-existing installation folder/path
Modified
modal.component.tsx
to add the property closable. If closable = false, then you can't exit out the modal by any means, except by adding a button to resolve the modal itself.Created
AskInstallPathModal
(ask-install-path-modal.component.tsx).Created
SetupService
(setup.service.ts) class to handle any user configuration before application startup. Logic such as sequential modals/prompts can be added here sequentially to ask for config values. Not sure if one whole modal or separate modals will be done but should be easy enough to edit the logic there.Created
bs-installer-ipcs.ts
to handle all the server calls for the installation folder/path. Transferred some codes frombs-download-ipcs.ts
to here.Might need to transfer the the installation folder/path code from
SteamDownloaderService
to another class as well, but might do it in another PR.Screenshots
UI may still change depending on suggestions
As of commit 9e2f716
How to Test
Test Case
config.json
file with any existing or non-existing folder path other than your original installation folder.%AppData%/Roaming/bs-manager
/.config/bs-manager
4.1. If existing installation folder: version should be shown on the sidepanel
4.2. If non-existing folder: installation folder will be created
Additional Tests
New/Updated Resource Text
NOTE: ticked are already translated to other languages.
Emoji Guide
For reviewers: Emojis can be added to comments to call out blocking versus non-blocking feedback.
E.g: Praise, minor suggestions, or clarifying questions that don’t block merging the PR.
E.g: Blocking feedback must be addressed before merging.