Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
070d050 to
88f4d9e
Compare
f745af9 to
2666ebb
Compare
31593c3 to
214aa3c
Compare
b69a38d to
129c833
Compare
214aa3c to
ad607ca
Compare
129c833 to
41d0881
Compare
ad607ca to
4cde5ec
Compare
41d0881 to
c94a108
Compare
4cde5ec to
fc0f3de
Compare
c94a108 to
f0eae6a
Compare
d4507b2 to
bcd2c26
Compare
| export const Thumbnail = forwardRef(function Thumbnail( | ||
| componentProps: ThumbnailProps, | ||
| forwardedRef: ForwardedRef<HTMLDivElement> | ||
| ) { |
There was a problem hiding this comment.
nit:
const Thumbnail = forwardRef<HTMLDivElement, ThumbnailProps>(
function Thumbnail(props, ref) {
// ...
}
);
The above is the pattern I've always been exposed to but here's ChatGPTs explanation on why:
Pros
• Best inference + best consumer type: you reliably get ref correctly typed when someone uses .
• Cleaner function signature (no repeated type noise).
• Usually the least-friction with JSX + IDE help.
Cons
• Slightly less “local” explicitness (types are up at the callsite, not on params).
There was a problem hiding this comment.
Thanks for catching that! Missed it. Fixing...
There was a problem hiding this comment.
ye this is awkward, claude not performing today
bcd2c26 to
afc293c
Compare
Add <Thumbnail> React component that uses useLayoutEffect to read CSS constraints before paint and applies resize imperatively. Tracks image natural dimensions via onLoad callback.
afc293c to
b2aafb9
Compare
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📦 Bundle Size Report
Total: 39.05 kB · +681 B · +1.7% Entry BreakdownSubpath sizes are the additional bytes on top of the root entry point, measured by bundling root + subpath together and subtracting the root-only size.
|
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
. |
3.86 kB | 3.86 kB | 0 B | 0% | ✅ |
./dom |
4.36 kB | 4.36 kB | 0 B | 0% | ✅ |
| total | 8.21 kB | 8.21 kB | 0 B | 0% |
@videojs/element
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
. |
817 B | 817 B | 0 B | 0% | ✅ |
./context |
823 B | 823 B | 0 B | 0% | ✅ |
| total | 1.60 kB | 1.60 kB | 0 B | 0% |
@videojs/icons
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
./react |
2.27 kB | 2.27 kB | 0 B | 0% | ✅ |
./html |
1.52 kB | 1.52 kB | 0 B | 0% | ✅ |
| total | 3.79 kB | 3.79 kB | 0 B | 0% |
@videojs/store
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
. |
1.29 kB | 1.29 kB | 0 B | 0% | ✅ |
./html |
468 B | 468 B | 0 B | 0% | ✅ |
./react |
199 B | 199 B | 0 B | 0% | ✅ |
| total | 1.94 kB | 1.94 kB | 0 B | 0% |
@videojs/utils
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
./array |
104 B | 104 B | 0 B | 0% | ✅ |
./dom |
760 B | 760 B | 0 B | 0% | ✅ |
./events |
227 B | 227 B | 0 B | 0% | ✅ |
./function |
197 B | 197 B | 0 B | 0% | ✅ |
./object |
119 B | 119 B | 0 B | 0% | ✅ |
./predicate |
265 B | 265 B | 0 B | 0% | ✅ |
./string |
110 B | 110 B | 0 B | 0% | ✅ |
./style |
185 B | 185 B | 0 B | 0% | ✅ |
./time |
478 B | 478 B | 0 B | 0% | ✅ |
./number |
158 B | 158 B | 0 B | 0% | ✅ |
| total | 2.54 kB | 2.54 kB | 0 B | 0% |
ℹ️ How to interpret
Sizes are minified + brotli, measured with esbuild.
Package totals are computed as root size + marginal subpath costs.
Subpath marginal cost = (root + subpath bundled together) − root alone.
| Icon | Meaning |
|---|---|
| ✅ | No change |
| 🔺 | Increased ≤ 10% |
| 🔴 | Increased > 10% |
| 🔽 | Decreased |
| 🆕 | New (no baseline) |
Run pnpm size locally to check current sizes.
Ref: #501
Stacked on: #643
Summary
<Thumbnail>React component.@videojs/react<Thumbnail>time?: number,className,style,render(viaUIComponentProps)<div>(overflow hidden) +<img>max-width/max-heightviastyleprop or CSS → auto-scales proportionallydata-loading,data-error,data-hiddenForwardedRef<HTMLDivElement>Namespace