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.
screen-capture.webm
My take on the Movie Search Application.
I chose to render movie details in a dialog instead of creating a separate route for the details view. For an app of this size I find it much better user experience :)
If I had more time I would definitely fix width of table columns. I used Shadncn/ui table and unfortunetaly the width changes based on the length of the movie title I guess which is visible when changing pages. Also, the Shadncn/ui dialog component bleeds out of the container when zoomed too much. Again, default behaviour of the component(I tried it on the Shadncn page and it suffers from the same problem 🤷). And styling might need some love...(I am not a css master so I did what I could 😃).
I also wrote tests for 2 main components, MovieSearch and MovieDetails. We could write more tests, for example pagination in this app, but in a real project we would not need to write the pagination ourselves. And also instruction say that I don't need to write 200 unit test :) Tests I wrote are important though and should be always included. They test what the user is supposed to see and be able to do.
In a real production code I would definitely include some integration/e2e tests that would test things unit test don't/shouldn't.