-
-
Notifications
You must be signed in to change notification settings - Fork 461
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
[General] Webview improvements and fixes #836
[General] Webview improvements and fixes #836
Conversation
The only difference I saw when testing here is that the loading spinner stops earlier and the website is blank then it loads. I don't think this is an improvement over the current solution. Tbh I think there is not much to do related with that since webview is quite limited in terms of events. This approach you are using was how I did the first time, then I changed it and I think its better like this, listening to the stop loading. Because after the dom is ready, still the elements are not completely painted, so that's why the blank. using the loading event, Heroic will wait for the content to be painted. |
Using dom-ready, it loads exactly the same as it does in a normal browser, with did-stop-loading it waits for ages before showing anything at all. |
I'll make more tests when I have time but for me both shows up in less than 3 seconds but your solution dismiss the loading faster, showing a empty website. While the current one dismiss the loader then the website shows completely. |
If i open epix store in browser it takes always a while before it shows the free games, but the page is already there. If this is about to show the strucuture earlier and don't wait till the full content is loaded, i would prefer the way where we load earlier. Like epic store is shown in the browser. |
As per electron docs: Emitted when the navigation is done, i.e. the spinner of the tab has stopped spinning, and the onload event was dispatched. Event: 'did-stop-loading' Corresponds to the points in time when the spinner of the tab stopped spinning. Event: 'dom-ready' Emitted when the document in the top-level frame is loaded. I think It would be better to use did-finish-loading event, to make sure it's completely loaded. |
In browser is dom-ready, as it loads right now is did-stop-loading. |
I think this would load for every single js script to finish in the page, including trackers etc, while did-stop-loading |
nice that the close button is next to the comment button |
You can do a .once() |
What's the once for? |
To listen to the first call of the event only |
I get that, but wouldn't that lead to undefined behaviour if you switched off the webview and then went back onto it? |
@wiryfuture to test in prod, on v2.0.1 I changed the event listener to use |
The feature is in with commit 3113610, b0624ae is a merge with main commits that i can't see for some reason. |
Seem to have resolved previous issues, appears fully functional, but idk about all edge cases, |
Updated by "Squash Git commits" hook in Weblate. Update translation files Updated by "Squash Git commits" hook in Weblate. Co-authored-by: Hosted Weblate <hosted@weblate.org> Translate-URL: https://hosted.weblate.org/projects/heroic-games-launcher/gamepage/ Translate-URL: https://hosted.weblate.org/projects/heroic-games-launcher/globals/ Translation: Heroic Games Launcher/GamePage Translation: Heroic Games Launcher/Globals
* chore: wait before getting the sid * feat: add Login with sid as second option * 1i8n: updated keys
This reverts commit b1dc1bb.
weblate pls dont mess with my repo it confuses vscode |
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 good 👍🏽
@wiryfuture And Also on the component: |
Just (out of interest) tried usng dom-ready for that as well and it is also faster, switching to the url as soon as the page starts loading rather than after it finishes loading, like a traditional browser. 😅 |
Actually, I think its not working when navigating inside the page. Because the dom won't change in this case, but the page will reload. so |
Seemed to work fine when i tested it just now, navigating across the epic website. Are you talking about ids sections on the page or something? |
@wiryfuture go to the store, click on any game, navigate through the store. The url should change to the game url or any other. Right now it keeps as the home page. Never changes. |
My brain just stopped responding.. there's literally a did-navigate event (aka, url change) |
Have you checked if it's working on all situations because I guess I tried did-navigate before and had the same issue. Only one that worked was the one I said above. |
I can see it working when i look at different games or the epic FAQ or unreal website or different location on github. Can't really think of anything else that I should be checking with that? |
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 Good! Thanks 👍🏽
Listen for dom-ready instead of did-stop-loading for UpdateComponent
This significantly decreases the time taken for users to see the webpage as UpdateComponent no longer waits for the DOM to entirely load, and UpdateComponent fully blocks the webview until it begins rendering. #829
This does not entirely fix the issue, as there is still a short(er) period of time when the webview has begun to load but UpdateComponent is still visible. This is either because ofChecklist if you have changed something on the Backend or Frontend:
- [ Y ] Tested the feature and it's working on a current and clean install.
Better responsiveness; lets webview and the webpages use their rendering optimisations.
- [ X ] Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
Latest prefix creation system is utterly broken. Otherwise, no problems.
- [ N/A ] Created / Updated Tests (If necessary)
Not necessary.
- [ X ] Created / Updated documentation (If necessary)
Not necessary.