Requirements:
- Implement behind feature flag with T273425: Move descriptions below field label
Expand collapse requirements and thresholds:
- If text is over 2 lines + 15 characters long, then truncate to 1 line with gradient/fade out and "More" button. Fade out should match styling in page preview and grow to match length of 'More' depending on length of word in language translation.
- When calculating cutoffs, include special messages and hide them along with the description if truncated
- On clicking "More" button, display full description (+ special messages). On line below, show a "Less" button. On click, it collapses back to 1 line state.
- More/ Less buttons are both right aligned to the edge of the field. The "More" button overlaps with text and "Less" button is below text on its own line.
Mocks
Collapsed | Expanded |
Open questions:
- What is the best way to calculate cut-off thresholds? Is it possible to calculate by line? Calculating by character was producing some funky results on the test instance.