akdor1154 / fitToWidth

Firefox add-on to fit text to the width of your phone's viewport
GNU General Public License v3.0
3 stars 2 forks source link

Doesn't work on some mobile sites? #1

Open ghost opened 8 years ago

ghost commented 8 years ago

It does not seem to anything here and on a number of other sites that have mobile versions:

http://www.theguardian.com/world/2016/may/08/north-korea-will-only-use-nuclear-weapons-if-sovereignty-is-threatened

Manual text reflow with android-text-reflow works, testing with Ffx 46.

akdor1154 commented 8 years ago

Hi,

I intentionally disable it on sites that are designed for mobile, as they should be already designed to fit into a narrow screen! Just to make sure I am interpreting you correctly, are you saying that normally mobile sites don't need this, but when you zoom in, you do want text to be re-flowed?

Jarrad

ghost commented 8 years ago

Yes, I want to zoom mobile sites and have them reflowed. They are designed for a narrow screen but may still use too small fonts.

akdor1154 commented 8 years ago

Out of interest, is Firefox's Text Size option an adequate fix for this?

ghost commented 8 years ago

Maybe I should play more with that but in the past I didn't find a setting which would work well for most sites. Much depends on other factors, when reading outside I typically want larger text because of stray light and other adverse conditions.

akdor1154 commented 8 years ago

Cool. I am considering adding a menu item that says "Force [enable/disable] text-to-width for this domain". This preference would be remembered if you ever set it. Would that satisfy your use-case?

ghost commented 8 years ago

Perhaps a global option would be sufficient and easier to use and implement? I can hardly imagine a situation where I would complain if text is reflowed after zoom.

akdor1154 commented 8 years ago

It it known to break the layout of several popular mobile sites, and the algorithm to get them to work properly would be a lot more complex (and hence unacceptably slow) that what is currently used. What about an option "Always force enable fit-to-width, THIS WILL BREAK SOME SITES"?

ghost commented 8 years ago

Fine for me.

I didn't grok all details of your current implementation but is it "walking" the tree always or only after zoom events? It seems that acting only after zoom events would have advantages?

akdor1154 commented 8 years ago

Currently it only runs on page load or when DOM nodes are added dynamically. This way zooming stays responsive (it can take a good five-ten seconds to process a complex page, which would make zooming a pain in the butt).

ghost commented 8 years ago

ok.. I think I understand how it works now.

Grossdm commented 6 years ago

@akdor1154 I have a few questions that seem to fit this issue, so I'm posting here even though it's closed. You said that the addon is disabled on mobile websites.

Thanks for your time and effort with this addon, Doug®

Oh, BTW should this still be fine with new webex versions of Firefox/Fennec?

akdor1154 commented 6 years ago

Firstly, I often find mobile websites that still need to be zoomed in

Yep me too.

Also, does this mean that requesting the desktop version of the site will enable your addon?

It should, the mobile switch consists of checking for a mobile-looking meta viewport tag.

You mentioned Firefox's text size options. If you're not aware, these are essentially gone. There is one: change text size with system setting. Tweaking about:config is not feasible browsing from one site to the next.

Grr, good job Mozilla. :(

You offered a per-site menu option. To me, this sounds like an excellent feature.

Me too but I'm pretty busy at the moment and this is a bit of work to implement. PRs welcome, or I might get to it in a few weeks. :)

In the short term I can add a "force enable on all sites" button as mentioned above.

enomat commented 4 years ago

I intentionally disable it on sites that are designed for mobile, as they should be already designed to fit into a narrow screen!

There is no reason to disable it on mobile sites.

If a user want to zoom in on mobile sites he will still have to scroll because you disabled the text reflow. This defeats the purpose of this addon because the user will have the same experience he has without this addon (no text reflow).

There is no need for "per-site menu option" because it is not the solution. The solution is to simly delete the code that disables this addon on mobile sites. But if you want to disable it on mobile sites by default, at least add a "force enable on all sites" option.

akdor1154 commented 4 years ago

There is no reason to disable it on mobile sites.

There is no need for "per-site menu option" because it is not the solution. The solution is to simly delete the code that disables this addon on mobile sites.

That's just not correct sorry. This is at its core just a fancy css override and as such it does break some sites. an example at hand: github's in-comment code blocks. There will be many others. I will still accept a pr for an opt in "force enable anywhere". N.b. I'm not actually using this add-on at the moment because I'm on Firefox Preview, I will certainly make sure it works if/when they enable arbitrary add-ons.