roost-im / roost-client

The official client for Roost.
MIT License
1 stars 6 forks source link

Text flow on mobile is broken #83

Closed dovej closed 9 years ago

dovej commented 10 years ago

This is a doozy. There doesn't seem to be any easy way to fix this. 70-character columns (the convention as per barnowl) is too wide to fit on mobile with any reasonable font size. I don't think we want to switch to a variable-width font because that would seriously screw with zephyr conventions. We also probably don't want to reflow for similar reasons...which leaves us in a crap place. As it stands we just deal with the awkward breaking, which isn't terrible but is certainly ugly and awkward. More thought should be given to what to do here.

davidben commented 10 years ago

I honestly don't think there's much to be done here but come up with some reasonable enough heuristic for reflow and variable-width font. Existing zephyr conventions are fine to bend. I think some variant of treating lines with leading whitespace as monospace would do the trick. Maybe with some cleverness of adjacent lines and stuff. It doesn't have to be perfect, just decent.

lightquake commented 9 years ago

I added a simple heuristic in app/coffee/util/reflow.coffee and some tests in test/spec/reflow.js. It's not perfect, but it gets us 90% of the way there so I'm closing this. If you run into specific cases it chokes on, feel free to open a new issue.