-
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
Feat / Movie screen by composition #674
base: develop
Are you sure you want to change the base?
Conversation
Visit the preview URL for this PR (updated for commit 686035c): https://ottwebapp--pr674-feat-movie-compositi-2oyyjpx4.web.app (expires Thu, 10 Apr 2025 13:04:12 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c198f8a3a199ba8747819f7f1e45cf602b777529 |
6aa6063
to
62882da
Compare
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.
🎉 I already reviewed this PR in our private repo
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.
🤩
With this change, we utilized composition to visually arrange the MediaMovie screen. We separated the inlineLayout variant from the regular variant. We call it
MediaMovieCinema
andMediaMovieInline
.We moved away from using
VideoLayout
as we see this as the best path forward. TheVideoLayout
contains too many conditionals, which make it difficult to oversee what visual output can be expected.The goal is to compose the screen from the top-level (= the screen itself), which makes it immediately clear what visual output can be expected without the need to dive deeper into components and follow the deeply nested conditions. Also, breaking everything down into components simplifies the process of creating different versions of the same screen.
We have put the variables we need for rendering the screen in
useMovieData
/useMovieParams
/useMovieHandlers
. This keeps the code DRY across different versions of the same screen.useMovieData
is placed inhooks-react
, so it can be re-used across different platforms.The visual output of the screen should be identical to how it was.
This PR also contains a small change which applies translations for the "Recommended playlist" in the UI.
Original PR: https://github.com/Videodock/vd-ott-apps/pull/445