Repository navigation
Grid component - #170
Merged
Merged
Grid component#170
Conversation
havardholvik
force-pushed
the
development
branch
from
January 8, 2024 13:41
7b6413d to
f9fffef
Compare
thyal
force-pushed
the
thomas/grid-layout
branch
from
January 15, 2024 10:56
69d6eb9 to
1216803
Compare
thyal
force-pushed
the
thomas/grid-layout
branch
2 times, most recently
from
January 26, 2024 14:12
468fdc9 to
3729f9d
Compare
thyal
marked this pull request as ready for review
January 26, 2024 14:28
havardholvik
approved these changes
Jan 29, 2024
havardholvik
left a comment
Collaborator
There was a problem hiding this comment.
Works as expected. Should be good enough for a beta release 👍
| if (onSetAspectRatio) { | ||
| const h = videoEl.current.videoHeight; | ||
| const w = videoEl.current.videoWidth; | ||
| if (w && h && w + h > 20) { |
Collaborator
There was a problem hiding this comment.
Maybe extract this or document it a bit? I see this is used below as well
Contributor
Author
There was a problem hiding this comment.
yeah good point. I'll extract it out to a function
Contributor
Author
There was a problem hiding this comment.
I just removed this for now.
thyal
force-pushed
the
thomas/grid-layout
branch
from
January 30, 2024 08:41
62c80fe to
d1975b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A (simplified) port of Whereby's grid logic. Adds a new component
<VideoGrid />.For now, the only grid ported over is the video stage grid. Presentation grid and subgrid is not included yet, but might be at a later point.
The PR is quite big, but most of the code is just ported over, and doesn't need an in-depth review
(The files in the
/helpersfolder).The API of the component can be changed - for now it's quite simple (but still flexible).
The idea is that there's two main ways of using this: with or without custom rendering of the video cells. For now, preserving aspect ratio is just supported if the cells are not custom rendered.
Things that are missing:
onResizeprop cast toany