-
-
Notifications
You must be signed in to change notification settings - Fork 480
[UI/UX] Replace native dialogs #1891
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
Conversation
so far is looking pretty good, just a few comments on the current state on Linux: simplescreenrecorder-2022-10-11_14.24.53.mp4And after clicking uninstall the dialog doesn't close until the action is complete, which makes Heroic hang for a few seconds. So perhaps adding or an indicator that the operation is ongoing or closing the dialog without waiting for the promise to be fulfilled. Other than that looks cool 👍🏽 |
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.
Looks really promising. I left some suggestions i find useful.
Even if we even not have a single error dialog with actions at the moment, maybe we need one in the future where we provide actions on a error dialog, which mostly comes from the backend.
Thanks. Appreciate the comments. Really helpful. Yeah. Honestly the |
…uto fxn, refactor error dialog into message box modal, uninstall modal closes immediately on input
…button click, optimization for linux uninstall modal
…ons interface frontend
This is fixed now. Closes immediately. Also uses the context provider to get the platform instead of awaiting for it. Doesn't show the dialog until it checks this so no re-render now |
I am having an issue with absolute imports now though
Relative imports are working fine and it seems to only be common/types after I added a couple types to it. |
…ic-Games-Launcher/HeroicGamesLauncher into feat/replace_native_dialogs
Okay so adding an enum in the common/types module breaks all the imports. In troubleshooting this, I went deep into the rabbit hole regarding absolute imports and managed to get it working for the frontend and backend without the vite-tsconfig-paths plugin. Before, we could only use imports in the frontend. The prefix alias is |
This is working for me and tests are updated so I'll take it out of draft now |
I think we might be able to add |
src/frontend/screens/Settings/components/OtherSettings/GameMode.tsx
Outdated
Show resolved
Hide resolved
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.
Looks great. Thanks for doing this ⚔️
src/frontend/screens/Library/components/LibraryHeader/index.tsx
Outdated
Show resolved
Hide resolved
@biliesilva the size was fixed. But yes, that is a good point about the colors. @BrettCleary |
We can add a style enum or string type to the |
This refactors native error and message dialog boxes into modals.
The
GlobalState
ContextProvider now hasshowDialogModal
anddialogModalOptions
. Any frontend component can callshowDialogModal
to show a dialog. This is achieved with theDialogHandler
component which usesdialogModalOptions
to determine what dialog to show. TheDialogHanlder
also listens for dialogs that the backend requests to show.Before:



After:



Use the following Checklist if you have changed something on the Backend or Frontend: