jwplayer / ott-web-app

Reference implementation for JWP-powered apps
Apache License 2.0
69 stars 53 forks source link

Handle newlines in descriptions #521

Open marcovandeveen opened 2 months ago

marcovandeveen commented 2 months ago

image image

ChristiaanScheermeijer commented 1 month ago

We have opened a PR (#538) related to this because the UI breaks when the video description is very long. On mobile devices, we collapse the text, but this causes the layout to shift. On desktop browsers, the buttons were pushed outside the viewport, but because we put the focus on the start-watching button, the page scrolls a bit down.

Because of this, we figured the description shown in the video details should be limited to X characters. The description is limited to X lines to keep the UI intact on desktop browsers.

For Symphony, we use separate fields for this. One for the synopsis (short description shown below the video title) and the description for the full (markdown) about tab below the hero.

image

Therefore, I think we shouldn't support linebreaks in the current description but explore a similar approach to the above screenshot. When the description is placed below the hero, we don't have this limitation and can support markdown rendering with line breaks.