fix(mrt): collapse long text fields with Read more (#870) (#903) master
* feat(mrt): add memoized CollapsibleText component (#870) Co-Authored-By: pi * feat(mrt): collapse long STRING fields with Read more (#870) Co-Authored-By: pi * fix(mrt): drop horizontal scroll for text containers (#870) Co-Authored-By: pi * fix(mrt): remove page-wide horizontal scroll from review view (#870) Co-Authored-By: pi * test(mrt): strengthen CollapsibleText grapheme test, fix stale comment (#870) Co-Authored-By: pi * fix(mrt): allow string field flex item to shrink for text wrapping (#870) The FieldComponent wrapper sat inside FieldsComponent's flex flex-wrap container with the default min-width: auto, so a flex item containing a long unbroken string expanded to the string's intrinsic width instead of wrapping. break-words and WebkitLineClamp only take effect when the element has a bounded content width, so the CollapsibleText Read more toggle appeared but did nothing on huge unbroken tokens. Adding min-w-0 lets the flex item shrink below its content width so wrapping and the line clamp take effect. Co-Authored-By: pi * fix(mrt): short-circuit grapheme count, reset expanded on text change (#870) Address review feedback on CollapsibleText: - countGraphemes → exceedsGraphemeThreshold: stop iterating once the count is known to exceed maxGraphemes, so a 1MB string segments at most maxGraphemes+1 graphemes instead of all of them. - Reset the expanded state when the text prop changes. When navigating between review jobs that reuse the same field name, React reuses the CollapsibleText instance; without the reset, a newly loaded long value inherited the previous job's expanded state. - The custom-thresholds test now asserts the maxLines prop lands on the clamped div's WebkitLineClamp style, independently verifying the line-count constraint (previously maxLines was passed but untested). - New test: expanding one long value then rerendering with a different long value restores the collapsed state. Co-Authored-By: pi * test(mrt): strengthen collapsible text thresholds (#870) Co-Authored-By: pi