Skip to content

Duo Chat: truncate the chat input only for placeholder

Denys Mishunov requested to merge 420586-wrap-prompt into master

What does this MR do and why?

https://gitlab.com/gitlab-org/gitlab/-/issues/416236+ assumed truncation only of the placeholder text on the smaller viewports. However, the way we implemented it in Truncate prompt placeholder/wrap feedback optio... (!126459 - merged) was that we always truncate the field's input. Which led to another issue: Text input does not wrap on to multiple lines (#420586 - closed)

This MR adjusts the previously merged solution to make sure we truncate the placehoder only and not the actual prompt when user starts typing.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After (desktop) After (small viewport)
CleanShot_2023-08-01_at_10.22.48 prompt-truncate-desktop prompt-truncate-mobile

How to set up and validate locally

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #420586 (closed)

Edited by Denys Mishunov

Merge request reports