Feat / Movie screen by composition #674
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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