-
-
Notifications
You must be signed in to change notification settings - Fork 480
[Tech] Update to Electron 27. Re-work scroll-related CSS #3136
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
@@ -491,7 +491,7 @@ ipcMain.on('unlock', () => { | |||
unlinkSync(join(gamesConfigPath, 'lock')) | |||
if (powerId) { | |||
logInfo('Stopping Power Saver Blocker', LogPrefix.Backend) | |||
return powerSaveBlocker.stop(powerId) | |||
powerSaveBlocker.stop(powerId) |
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.
needed because of the electron upgrade
'scrollPosition', | ||
listing.current?.scrollTop.toString() || '0' | ||
) | ||
storage?.setItem('scrollPosition', window.scrollY.toString() || '0') |
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 get the scroll from the window now, not from the listing element
I see, looks like a theme issue, I'll check the other themes too |
for some reason the app image shrunk by 100 mb with this change, but I guess that's a good thing right? |
Some Electron optimization maybe? @arielj can you also update electron-builder? |
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.
Thinking about priorities, I agree that spacial navigation is the most important to have it fixed.
But I think we should get back to the scroll the way it was since it looked more 'native' than now when possible. Maybe it is just an electron/chromium but, I am not sure.
other than that the code looks good. But if possible upgrade electron-builder as well. Let's always update both whenever we can since it introduces new features and bug fixes as well.
spatial navigation seems to be broken in newer chromium versions, I tested that outside Heroic using the spatial navigation flag and I have the same problem I don't know how long it would take for them to fix that, that's why I went and changed the scroll to be on the body and not in the nested element but I agree the previous scroll looks better, I guess we'll have to keep an eye on chrome release notes |
…uncher into electron-27-0-0
This PR replaces #3053
Electron 27 should fix the issues present in Electron 26 that prevented that PR from being merged.
Something changed in that version that broke the spatial navigation, the browser wouldn't enter inside an element with a scrollbar UNLESS it's the body element. Because of that, I had to re-implement how the scroll is handled: now, instead of scrolling the
main
element, we scroll the window/body.The behavior is almost the same, but because of that change you'll notice small details:
I think everything is the same apart from that.
Use the following Checklist if you have changed something on the Backend or Frontend: