Awful / Awful.app

Something Awful Forums browser for iOS
https://forums.somethingawful.com/showthread.php?threadid=3837546&perpage=40&noseen=1
136 stars 45 forks source link

iOS 15 scroll thumb dark in dark view & webview user agent update #1111

Closed dfsm closed 2 years ago

dfsm commented 2 years ago

ResourceURLProtocol.swift:

RenderView.swift: There's an issue limited to iOS 15 where the webview scroll thumb is dark in dark mode aka "missing".

nolanw commented 2 years ago

@dfsm the tip of main builds ok for me in Xcode 13 without the changes to ResourceURLProtocol.swift, what problem were you running into?

The webview's background is not opaque in order to avoid a flash of unstyled content when loading a page of posts. I remember it taking some time to find the right combination of webview and web content parameters until it was gone completely. But this was years ago, so I forget the details, and it's possible I was solving problems that no longer exist. I'm ok setting isOpaque = false on iOS 15, as you've done here. Though I might come back and give it another try if I notice a FOUC showing up :)

Custom user-agent sounds good to me for the webview, appreciate you checking that out. We probably don't need to calculate it twice, we can expose it via ForumsClient or from AwfulCore. Not that I expect to change it often, but I doubt I'd remember to change it in both places.

The commented WKWebpagePreferences code looks interesting. Without figuring out what the differences are, I'm loathe to turn it on just for fun. But definitely worth investigating further, and keeping in mind as other issues arise!

dfsm commented 2 years ago

@dfsm the tip of main builds ok for me in Xcode 13 without the changes to ResourceURLProtocol.swift, what problem were you running into?

Oh you fixed it already! haha thanks

The webview's background is not opaque in order to avoid a flash of unstyled content when loading a page of posts. I remember it taking some time to find the right combination of webview and web content parameters until it was gone completely. But this was years ago, so I forget the details, and it's possible I was solving problems that no longer exist. I'm ok setting isOpaque = false on iOS 15, as you've done here. Though I might come back and give it another try if I notice a FOUC showing up :)

ohh that makes sense. I didn't see that at all during testing.

also, always happy for you to redo things :)

Custom user-agent sounds good to me for the webview, appreciate you checking that out. We probably don't need to calculate it twice, we can expose it via ForumsClient or from AwfulCore. Not that I expect to change it often, but I doubt I'd remember to change it in both places.

yep that's fair. i will sort

The commented WKWebpagePreferences code looks interesting. Without figuring out what the differences are, I'm loathe to turn it on just for fun. But definitely worth investigating further, and keeping in mind as other issues arise!

lol fair enough. i thought ya might know, but if not then yep. let's read what it does before adding it haha