-
Notifications
You must be signed in to change notification settings - Fork 975
Smoother transition when newtab image loads slowly #6590
Conversation
bd9183d
to
2789018
Compare
65c7753
to
238cfd3
Compare
67b2326
to
5eb09be
Compare
@josiah-keller sorry it's taken me so long to get to this |
@bsclifton Is there any point in that? Won't the newtab page be changing to deal with the memory issue anyway? Seems more logical to close this to me. |
@josiah-keller you're right- the image for the new tab page is currently disabled (as of tonite). We will be re-enabling it as soon as we fix the memory issue (which should be soon- next few weeks). We can just hold off until then- I think this is a great change though 😄 |
6dcbe4e
to
97aeb3c
Compare
@bsclifton I noticed #6965 was put in the 0.13.3 milestone so I went ahead and did a rebase. |
Will be ready for re-review after #7160 is accepted |
97aeb3c
to
58bdb2d
Compare
58bdb2d
to
2f5d814
Compare
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.
Hey there 😄 Sorry it's taken so long for me to dig in and review this
I spent a good amount of time with this PR and the changes are sometimes noticeable, but other times the flash of white still hits you
I wanted to ask (if you're still up for it) if you'd be able to try an approach where (if images are set to true) the body is black (instead of white). And only after the image finishes loading, it would start the animation transition to fade in. This is similar to the behavior I've seen on sites such as Google Hangouts:
https://hangouts.google.com/
Let me know what you think 😄
@bsclifton I've noticed that too, and in those cases the correct class for the animation still gets applied. I assumed it was just bad animation performance on my machine. I'm fine with doing whatever changes you think are best, but won't this just give a flash of black instead? Or am I misunderstanding you? |
@josiah-keller I think if you give it a shot, you'll notice the black (fading into lighter colors) seems to be a lot nicer. I tried a reloading a bunch on the https://hangouts.google.com URL and it is very easy on the eyes Going forward, now that backgrounds can be disabled, we can likely update the code to make the default color configurable. At the moment, it's hardcoded to white (and I'm proposing hardcoding to black). Here's an an open issue relating to that (in case you're interested): #7159 |
2f5d814
to
4dac6c9
Compare
@bsclifton Got around to changing the background, and it does indeed look better. |
@josiah-keller! The black fade in (which looks great!) makes the blinking even more obvious. I did some more digging in and here's what I've found. The white flash is something present because of the webview. This tag is inserted by Brave when a new tab is opened which ends up creating a webcontents Chromium object. This is what seems to have a default color of white. The issue has been reported in Electron with electron/electron#5175. We're likely going to need a Muon fix for this to look correct |
Given the show stopper documented above (needing to have a Muon fix), I'm going to close this PR. Thanks for digging in @josiah-keller - I'll make sure to share the findings above in the original issue |
Fixes #5309
When opening a new tab, the background image can load slowly, especially if it's not cached, giving a rough appearance (especially for new users). Previously, the entire newtab page contents were faded in on page load, which doesn't help if the image takes awhile to load - you can still see the image progressively rendering as it loads.
Now, the image is hidden until it loads, while the rest of the newtab page is displayed immediately with no fade for immediate interaction. Once the image loads, it fades in.
git rebase -i
to squash commits (if needed).Test Plan: