-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix / Restrict text length to avoid scrolling issue #538
Conversation
Visit the preview URL for this PR (updated for commit b7831b0): https://ottwebapp--pr538-fix-scroll-detail-pa-z71kkux2.web.app (expires Sat, 29 Jun 2024 16:19:55 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c198f8a3a199ba8747819f7f1e45cf602b777529 |
packages/ui-react/src/components/TruncatedText/TruncatedText.test.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Thanks for the updates @MelissaDTH! There is still one conceptual thing I didn't mention, and I'm curious if you and others agree. I think we should simplify the So I think we should:
The advantage is that both components can be used agnostic and testing these components becomes more simple. What do you think? |
I agree. I would go for option 1! |
Thanks for the feedback, @ChristiaanScheermeijer. I spoke with Mike about this issue and during that conversation, I advocated for the idea that since |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 🎉
Description
Issue: The video detail page starts halfway down the viewport when a media item has a very long description, because the "Start Watching" button receives focus.
Solution
By limiting the number of lines in the video description, we not only ensure that the page does not start halfway down, but it also aligns better with the designs and overall visuals.
TruncatedText
component and modifiedCollapsibleText
to remove the unnecessarymaxHeight
prop. Added amaxHeight
constant with the original value for readability in calculations.Steps completed:
According to our definition of done, I have completed the following steps:
Example