Closed boonebgorges closed 3 years ago
You're absolutely correct here. This is something we (the authors of WW problems) should be aware of (and responsible for). Particularly on mobile, this "width issue" is already a concern.
Currently, do we have a fixed measurement for width when rendering in OL-WeBWorK?
No fixed measurement. At the widest, the content area for problem summaries is about 424px wide. As the window narrows, this shrinks, to as low as around 180px on smallish screens.
I'd like to leave this open for another round of development. I've got a feeling that there's no perfect technical solution, but it may turn out that there are steps we can take to ensure minimum legibility of very wide content (such as ensuring that the screen is scrollable on small devices). Let's wait until the table-formatted problems are in use for a term and see what feedback we collect.
For the moment, I've gone with a solution that makes the 'WW Problem' area horizontally scrollable if the content requires it. This should only happen when TeX spills over. This should make it readable across devices. See the gif above for a demonstration of what it looks like.
Given the constraints, this seems pretty optimal.
This looks good to me. Problems with very wide content all appear with a horizontal scrollable area.
I'm unsure that there's an easy way around this. Anything that appears between
latex
delimiters is a black box as far as webwork-for-wordpress is concerned. As such, it's not possible to determine programatically where it may be appropriate to insert a line break. Furthermore, in some cases there may not in fact exist an appropriate spot for a line break, so I don't think that this is a road we should go down.Allowing very wide content to spill outside of the parent seems like a better option than simply cutting it off (
overflow: hidden
); while it's not visually pleasing to have the spilled content, truncating it would make it impossible to read.I wonder if this may be best handled at the editorial level. That is, we could have recommendations for the creators of problem text that the width of LaTeX-formatted chunks not exceed a certain width. @drdrew42 Do you have thoughts about whether this is feasible, or how widespread a problem you'd expect this to be?