Skip to content

refactor(packages): derive default props from core classes#488

Merged
mihar-22 merged 2 commits intomainfrom
fix/default-props-from-core
Feb 10, 2026
Merged

refactor(packages): derive default props from core classes#488
mihar-22 merged 2 commits intomainfrom
fix/default-props-from-core

Conversation

@mihar-22
Copy link
Copy Markdown
Member

@mihar-22 mihar-22 commented Feb 10, 2026

Summary

HTML and React components were hardcoding their own default prop values (label = '', disabled = false, etc.) instead of deriving them from core. This establishes core as the single source of truth for all component default props.

Changes

  • HTML elements reference Core.defaultProps.* in class field initializers instead of hardcoded values
  • React components remove inline destructuring defaults, letting undefined flow to core.setProps() where defaults() resolves them
  • React Time.Value uses TimeCore.defaultProps.negativeSign as the fallback for the render-specific negativeSign prop

Testing

Covered by existing tests. pnpm -F @videojs/core test && pnpm -F @videojs/html test && pnpm -F @videojs/react test

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 10, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit ab92297
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/698aaefed4797b0008b651e6
😎 Deploy Preview https://deploy-preview-488--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
vjs-10-demo-react Ignored Ignored Preview Feb 10, 2026 4:07am

Request Review

@mihar-22 mihar-22 merged commit 6aac002 into main Feb 10, 2026
8 checks passed
@mihar-22 mihar-22 deleted the fix/default-props-from-core branch February 10, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant