Skip to content

Require a demo video before plugins can be submitted for review - #534

Merged
simonhamp merged 1 commit into
NativePHP:mainfrom
sonalidudhia:feature/plugin-demo-video
Sep 25, 2026
Merged

simonhamp merged 1 commit into
NativePHP:mainfrom
sonalidudhia:feature/plugin-demo-video

Conversation

@sonalidudhia

Copy link
Copy Markdown
Contributor

Require a demo video before a plugin can be submitted for review

Why

Reviewers currently have no quick way to see that a submitted plugin actually works. This adds a required demo video: developers link a short YouTube, Vimeo or Loom video of the plugin running on a real device or simulator, and admins can watch it inside Filament before approving.

What changes

Developer dashboard (plugin → Details tab, drafts only)

  • New Demo Video card: URL field + a required checkbox confirming the video shows the current version working.
  • Links are validated when they change:
    • host must be YouTube (incl. youtu.be / Shorts), Vimeo (incl. unlisted /{id}/{hash}) or Loom
    • the provider's oEmbed endpoint must return 200, which rejects private, deleted or made-up videos
  • Inline preview of the video after saving.
  • New required row in Review Checks: "Demo video showing the plugin working". The Submit tab summary shows it too.
  • submitForReview() refuses to submit without an attested video.

Enforcement

  • Plugin::passesRequiredReviewChecks() / getFailingRequiredChecks() now include the demo video, so the Filament Approve button stays disabled without one.
  • PluginReviewChecksIncomplete email lists the demo video as passing/missing.

Admin (Filament → Plugins → Edit)

  • "Demo Video (required)" row in Review Checks.
  • Embedded player + link under Developer Submission Details.
  • New Show demo video on listing toggle (off by default). Videos are for reviewers first. An admin opts in per plugin only after checking the quality.
  • "Run review checks" summary now counts the demo video (x/9).

Public plugin page

  • Embeds the video above the README only when an admin has enabled the toggle.

Implementation notes

  • Migration adds demo_video_url, demo_video_attested_at, show_demo_video to plugins.
  • App\Support\DemoVideo parses provider URLs and builds embed/oEmbed URLs.
  • App\Rules\DemoVideoUrl does the host + oEmbed check (10s timeout, logs connection failures).
  • oEmbed is only called when the URL actually changes, so saving other fields doesn't hit the provider.
  • Embeds use youtube-nocookie.com for YouTube.
  • Video wrappers are relative because of the global .aspect-video iframe { position: absolute } rule.
  • PluginFactory now includes an attested video by default and adds withoutDemoVideo() / withPublicDemoVideo() states, so existing tests keep their meaning.

⚠️ Rollout consideration

Plugins that are already pending review have no video, so they cannot be approved until the developer adds one. It may be worth emailing current pending developers (the "Email Developer" action already lists the new check), or approving the current queue before deploying.

@simonhamp simonhamp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! Thanks @sonalidudhia

@simonhamp
simonhamp merged commit 76003a8 into NativePHP:main Sep 25, 2026
1 check passed
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.

2 participants