-
Notifications
You must be signed in to change notification settings - Fork 3
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
Grid component #170
Grid component #170
Conversation
7b6413d
to
f9fffef
Compare
69d6eb9
to
1216803
Compare
468fdc9
to
3729f9d
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.
Works as expected. Should be good enough for a beta release 👍
src/lib/react/VideoView.tsx
Outdated
if (onSetAspectRatio) { | ||
const h = videoEl.current.videoHeight; | ||
const w = videoEl.current.videoWidth; | ||
if (w && h && w + h > 20) { |
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.
Maybe extract this or document it a bit? I see this is used below as well
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.
yeah good point. I'll extract it out to a function
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 just removed this for now.
62c80fe
to
d1975b1
Compare
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
/helpers
folder).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:
onResize
prop cast toany