Skip to content
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

Improve "gallery view" of series block #737

Merged
merged 4 commits into from
Mar 15, 2023

Conversation

LukasKalbertodt
Copy link
Member

See the second commit message for the main attraction:

Make "gallery view" of series block scale items to better fill screen

This should look better on more screens. Before, there was some left-over space on the right if there wasn't enough space for a new video item. On some screens it looked really bad because a new item would almost fit.

With this, the items themselves scale a bit to fill the space. They do have a max width. When that's reached, the remaining space is distributed as margin left/right of the items.

The first commit refactors those components to make the second commit possible. The refactoring makes it so that all "view dependent" CSS code is actually contained in the respective *View component, not conditionally inside Item.

Regarding the main style change: I'm really interested in just feedback. The video items certainly grew in size on average. It's still smaller than on YouTube. I'm not sure if the max width is too overwhelming? I'm also not sure if distributing the left-over space to each item instead of all at the end is an improvement? I'm open to suggestions. Of course, this is something that can be fine-tweaked a lot to make certain screen sizes look better.

Now the individual video items are not created at the top anymore and
are passed down via `children`. Instead a more well-typed data structure
is passed down. Further, there exist one component for each of the
three view modes now. That gives a bit more flexibility as each one can
be changed fairly independently from one another.
This should look better on more screens. Before, there was some
left-over space on the right if there wasn't enough space for a new
video item. On some screens it looked really bad because a new item
would almost fit.

With this, the items themselves scale a bit to fill the space. They do
have a max width. When that's reached, the remaining space is
distributed as margin left/right of the items.
@github-actions github-actions bot temporarily deployed to test-deployment-pr737 March 13, 2023 12:20 Destroyed
@LukasKalbertodt LukasKalbertodt added the changelog:user User facing changes label Mar 13, 2023
Copy link
Member

@owi92 owi92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The refactor makes a lot of sense and with it the code looks much tidier and easier to maintain. I did not notice any issues arising from this.

I also really like the change you made to the gallery view. I definitively think this is an improvement and I don't find the max-width overwhelming at all. It works and looks pretty good on almost all screen sizes in every major browser.

However I do find that the gap between two videos can become pretty wide (really only noticeable on screen widths between sth like 1040 and 1080 and also around 780). This is just my subjective opinion and isn't a dealbreaker for me, though I wouldn't mind if this gets tweaked a little.

@github-actions github-actions bot temporarily deployed to test-deployment-pr737 March 14, 2023 09:45 Destroyed
@github-actions github-actions bot temporarily deployed to test-deployment-pr737 March 15, 2023 07:59 Destroyed
@owi92 owi92 merged commit 65dae5b into elan-ev:master Mar 15, 2023
@LukasKalbertodt LukasKalbertodt deleted the better-grid branch March 15, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:user User facing changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants