rescript-association / reasonml.org

Deprecated in favor of rescript-lang.org
MIT License
125 stars 33 forks source link

Long signatures are cut off #80

Closed nikgraf closed 4 years ago

nikgraf commented 4 years ago

Currently long signatures don't fit and there is a horizontal scrollbar. For once sometimes it's not obvious that I can scroll and in general it's not a nice experience when trying to grasp the whole functions.

Screenshot 2019-10-27 at 21 41 12

For wider screens to we really need to cut them off? For smaller screens would could wrap them to the next line? Any other ideas?

nikgraf commented 4 years ago

Just noticed it's the same for examples.

bettistein commented 4 years ago

I would go for "next line" rather than scrolling. Should I do a quick design for this? @ryyppy @nikgraf

ryyppy commented 4 years ago

@nikgraf I think for very long signatures, we need to set up refmt to limit it to a certain line length and let refmt do the job. A browser-enforced line wrap would definitely look weird?

nikgraf commented 4 years ago

great point, that said for small screen e.g. mobile this won't work?

Would it make sense to do the refmt thing for our standard size and then apply this CSS to the pre-tag:

white-space: pre-wrap;
word-wrap: break-word;

It would look like this

Screenshot 2019-10-28 at 10 51 25
ryyppy commented 4 years ago

Will be tackled by #84

ryyppy commented 4 years ago

Fixed