[NcFormBox] Use `text-wrap: pretty` for FormBox* components where supported
This is what it looks like with default wrapping:
And pretty:
Support is low-ish right now, but it's literally just to make something more pretty so probably not an issue :)
Even if not well supported at least the browsers with support get better ui :) So really nice idea!
For longer sections of text, text-wrap: pretty can be used. Note that pretty has a negative effect on performance, so it should be only used for longer blocks of text when the layout is more important than speed.
I did not make any research about the performance impact. But having performance issues we have already, I'd make sure that the performance impact of this option is not noticeable anymore and worth it.
I'd make sure that the performance impact of this option is not noticeable anymore and worth it.
As this components are only shown in the app settings dialog I think that's not really a problem - also the amount of components with text wrapping should normally not be that much.
WebKit:
We are thrilled with the work we’ve done to ensure Safari users don’t experience a negative performance impact, even when web developers apply text-wrap: pretty to a lot of content on the web page.
One thing to know as a developer, the performance of text-wrap is not affected by how many elements on the page it’s applied to. Perf concerns emerge as the pretty algorithm takes more and more lines into consideration as it calculates what to do. In WebKit-based browsers or apps, your text element would need to be many hundreds or thousands of lines long to see a performance hit — and that kind of content is unusual on the web. If your content is broken up into typical-length paragraphs, then you have no reason to worry. Use text-wrap: pretty as much as you want, and rely on our browser engineers to ensure your users will not experience any downsides.
A Blink developer:
Blink's implementation of pretty has explicitly added guardrails such that the overhead is minimal if a site added it to every paragraph, and during development we measured performance of page load times in this scenario and found it acceptable.
@kra-mo Only the interactive items, or anything else as well?
Such us the groups headings/description, shortcuts labels etc.
@kra-mo Only the interactive items, or anything else as well?
Such us the groups headings/description, shortcuts labels etc.
No strong opinions. I found the wrapping odd for interactive elements only because of the trailing icon/switch.
At least for shortcuts labels, that would also apply because of the keys on the right side. For other things, it's your call.