-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add reader mode for in-app browser #1184
base: develop
Are you sure you want to change the base?
Conversation
Hey! Finally getting around to this one - my only worry with this is that the package will be come outdated as time goes on. We can create a fork of this on the thunder repo, but it most likely means we'll have to maintain it. Do you have any thoughts on this? |
It's totally your call if you don't mind taking on another package to maintain. Of course I'm willing to help as needed! But I do think this is a pretty neat feature to have to flesh out in the in-app browser, and this package fits in perfectly with our existing browser controller architecture. |
Pull Request Description
This PR adds a reader mode for Android (and iOS) using the in-app browser. Where previously the reader mode option would only be shown on iOS, it is now shown on Android too if the in-app browser is selected. It can also be toggled on/off dynamically in the in-app browser, regardless of the default. Note that history isn't shared between the modes.
One potential downside is that the package I'm using for this hasn't been updated for a while, but after a considerable amount of searching (which took a while, since it isn't even on pub.dev), it was not only exactly what I was looking for but seems to work very well. (I would've been happy with a simple web scraper that returns the body contents for us to render, but this has a whole controller architecture and everything.)
Aside from that I think it's pretty easy to sell the usefulness of a cross-platform reader mode. It makes page loads and navigation much faster and scrolling is more responsive.
Note: I also introduced some abstraction to handle the different types of controllers so there aren't a lot of conditionals everywhere.
Issue Being Fixed
Issue Number: #760
Screenshots / Recordings
https://files.catbox.moe/aetnb4.mp4
Checklist
semanticLabel
s where applicable for accessibility?