feat(frontend): add fade+pill truncation for long chat messages#4344
feat(frontend): add fade+pill truncation for long chat messages#4344mmabrouk wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Railway Preview Environment
|
Long chat messages in BeautifiedJsonView are now clamped to 160px with a bottom fade gradient and a centered "Show more" pill. Clicking the pill expands to full height and shows a "Show less" pill at the bottom. Short messages render unchanged. - Measurement ref is separate from the clamped container so ResizeObserver reads unconstrained scrollHeight - Explicit maxHeight sentinel when expanded so the CSS transition animates in both directions - aria-expanded on toggle buttons, aria-hidden on fade overlay - Expanded state resets when text content changes
478e43c to
8609ab1
Compare
Summary
Stacked on #4343.
Long chat messages in the beautified JSON view are now clamped with a fade-to-background gradient and a centered "Show more" pill. Clicking the pill expands the message to full height and reveals a "Show less" pill at the bottom. Short messages render as before with no truncation UI.
Details
maxHeight(160px when truncated, 9999px when expanded) so the CSStransition-[max-height]animates in both directions.Accessibility
aria-expanded.aria-hidden="true".motion-safetransitions are consistent with the rest of the component.CleanShot.2026-05-15.at.21.46.56.mp4
Test plan