Skip to content

fix: responsive embed credentialless attribute#485

Merged
elibosley merged 1 commit into
mainfrom
codex/fix-responsive-embed-credentialless
May 21, 2026
Merged

fix: responsive embed credentialless attribute#485
elibosley merged 1 commit into
mainfrom
codex/fix-responsive-embed-credentialless

Conversation

@elibosley
Copy link
Copy Markdown
Member

@elibosley elibosley commented May 21, 2026

Summary

  • Restore the forced string form for the credentialless iframe attribute in ResponsiveEmbed.
  • Document why the wrapper must not use the boolean JSX shorthand.
  • Add a focused regression test so future cleanup catches this behavior.

Root cause

PR #407 changed ResponsiveEmbed from {...{ credentialless: "" }} to the JSX boolean shorthand credentialless. React treats credentialless as a non-boolean iframe attribute, so credentialless={true} is omitted during render. On docs pages served with Cross-Origin-Embedder-Policy: credentialless, that omission breaks cross-origin video embeds such as YouTube.

Validation

  • pnpm exec vitest run src/components/ResponsiveEmbed/__tests__/ResponsiveEmbed.test.tsx
  • git diff --check
  • pnpm run build
  • Verified generated build/unraid-os/getting-started/set-up-unraid/internal-boot-faq/index.html contains credentialless="" on both YouTube iframes.

Build notes

  • Full Docusaurus build completed successfully.
  • Build emitted existing warnings for broken links/anchors, localized markdown directives, and HTML minifier diagnostics on unrelated pages.
  • pnpm run typecheck currently fails before source validation because TypeScript 6 reports the repo's baseUrl deprecation. pnpm exec tsc --noEmit --ignoreDeprecations 6.0 --pretty false then reports existing unrelated errors in RedirectList, ReleasesList, and Layout, with no errors in ResponsiveEmbed after this change.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e4c54837-6728-4d9c-8b9f-d83b114626ef

📥 Commits

Reviewing files that changed from the base of the PR and between 5ab3f08 and 5d0008f.

📒 Files selected for processing (2)
  • src/components/ResponsiveEmbed/__tests__/ResponsiveEmbed.test.tsx
  • src/components/ResponsiveEmbed/index.tsx

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Walkthrough

The ResponsiveEmbed component refactors its credentialless iframe attribute handling into a constant credentiallessIframeProps that is spread onto the iframe element. A new test suite verifies that the iframe receives the correct credentialless attribute value and matches the provided YouTube embed URL.

Changes

ResponsiveEmbed credentialless iframe refactoring

Layer / File(s) Summary
credentialless iframe attribute extraction and tests
src/components/ResponsiveEmbed/index.tsx, src/components/ResponsiveEmbed/__tests__/ResponsiveEmbed.test.tsx
A credentiallessIframeProps constant defines the credentialless iframe attribute and is spread onto the <iframe> element. Tests verify the iframe receives credentialless as an empty string and the correct src URL.

🎯 2 (Simple) | ⏱️ ~8 minutes

🐰 A tiny refactor, clean and neat,
Props now spread on iframe beat,
Tests confirm the attributes align,
YouTube embeds shine with design! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-responsive-embed-credentialless

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
unraid-docs 5d0008f Commit Preview URL

Branch Preview URL
May 21 2026, 12:55 AM

@elibosley elibosley changed the title [codex] fix responsive embed credentialless attribute fix: responsive embed credentialless attribute May 21, 2026
@elibosley elibosley marked this pull request as ready for review May 21, 2026 00:56
@elibosley elibosley merged commit 1e6844f into main May 21, 2026
4 of 5 checks passed
@elibosley elibosley deleted the codex/fix-responsive-embed-credentialless branch May 21, 2026 00:57
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