Skip to content

Conversation

@petercrocker
Copy link
Contributor

@petercrocker petercrocker commented Sep 13, 2025

Summary by CodeRabbit

  • New Features

    • Introduced an embedded video player in the documentation, enabling inline playback (including YouTube Live).
  • Documentation

    • Added a Videos section to the Python SDK introduction page featuring an embedded video.
    • Linked a new blog post: “Creating, Modifying, and Deleting Data in Infrahub Using the Python SDK.”
  • Chores

    • Added a video playback library dependency to support the new embedded player.

@coderabbitai
Copy link

coderabbitai bot commented Sep 13, 2025

Walkthrough

Introduces a new VideoPlayer React component at docs/src/components/VideoPlayer/index.tsx that wraps react-player with a responsive 16:9 container and supports props: url (string) and light (boolean, default false). Updates docs/docs/python-sdk/introduction.mdx to import VideoPlayer, add a Videos section embedding a YouTube Live URL with the light prop, and append a new blog post entry with title and URL. Modifies docs/package.json to add the dependency "react-player": "^3.3.2". No exported/public API signatures are changed.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The changes add a VideoPlayer component, a new "Videos" section embedding a YouTube Live stream in docs/python-sdk/introduction.mdx, and a react-player dependency, so the title "add livestream to docs" accurately and concisely summarizes the primary change.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pmc-20250913-docs

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions bot added the type/documentation Improvements or additions to documentation label Sep 13, 2025
@petercrocker petercrocker linked an issue Sep 13, 2025 that may be closed by this pull request
@petercrocker petercrocker requested a review from a team September 13, 2025 10:16
@cloudflare-workers-and-pages
Copy link

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 30e661d
Status: ✅  Deploy successful!
Preview URL: https://8cedc006.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pmc-20250913-docs.infrahub-sdk-python.pages.dev

View logs

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
docs/src/components/VideoPlayer/index.tsx (3)

11-18: Use theme variables and center via layout instead of relying on

in MDX.

Inline hardcoded colors break in dark mode. Use Docusaurus theme tokens and center the card with auto margins.

Apply:

-    <div style={{
-      border: '3px solid #eee',
-      borderRadius: '12px',
-      padding: '8px',
-      backgroundColor: '#fafafa',
-      margin: '2rem 0',
-      maxWidth: '800px'
-    }}>
+    <div style={{
+      border: '1px solid var(--ifm-color-emphasis-300)',
+      borderRadius: '12px',
+      padding: '8px',
+      backgroundColor: 'var(--ifm-background-surface-color)',
+      margin: '2rem auto',
+      maxWidth: '800px',
+      width: '100%'
+    }}>

19-26: Prefer modern aspect-ratio over padding hack.

Simplifies layout and avoids absolute positioning where possible.

Apply:

-      <div style={{ position: 'relative', paddingTop: '56.25%' }}>
+      <div style={{ position: 'relative', aspectRatio: '16 / 9' }}>
         <ReactPlayer
           url={url}
           light={light}
-          style={{ position: 'absolute', top: 0, left: 0 }}
+          style={{ position: 'absolute', inset: 0 }}
           width="100%"
           height="100%"
           controls
         />

1-3: Avoid SSR/hydration issues and trim bundle size by lazy-loading ReactPlayer inside BrowserOnly.

File: docs/src/components/VideoPlayer/index.tsx (imports at top and player usage). Wrap the player with @docusaurus/BrowserOnly and import react-player/lazy; then build from the docs workspace to confirm no hydration warnings.

-import React from 'react';
-import ReactPlayer from 'react-player';
+import React from 'react';
+import BrowserOnly from '@docusaurus/BrowserOnly';
+import ReactPlayer from 'react-player/lazy';
@@
-        <ReactPlayer
-          url={url}
-          light={light}
-          style={{ position: 'absolute', top: 0, left: 0 }}
-          width="100%"
-          height="100%"
-          controls
-        />
+        <BrowserOnly>
+          {() => (
+            <ReactPlayer
+              url={url}
+              light={light}
+              style={{ position: 'absolute', top: 0, left: 0 }}
+              width="100%"
+              height="100%"
+              controls
+            />
+          )}
+        </BrowserOnly>

Optional: add YouTube lazy/iframe options: config={{ youtube: { playerVars: { modestbranding: 1, rel: 0 }, embedOptions: { loading: 'lazy' } } }}.

Build check: cd docs && npm run build

docs/docs/python-sdk/introduction.mdx (3)

4-4: Use Docusaurus @site alias for stability.

Relative paths are brittle if files move. Use the recommended alias.

Apply:

-import VideoPlayer from '../../src/components/VideoPlayer';
+import VideoPlayer from '@site/src/components/VideoPlayer';

10-12: Avoid the deprecated

tag; rely on component layout.

We already center via component styles. Drop <center> for semantic HTML.

Apply:

-<center>
-  <VideoPlayer url='https://www.youtube.com/live/RbRz8_t0FBs?feature=shared' light />
-</center>
+<VideoPlayer url='https://www.youtube.com/live/RbRz8_t0FBs?feature=shared' light />

8-12: Add 1–2 sentence context for the video (Diátaxis: Explanation page).

Briefly state what viewers will learn and the target audience to align with our doc style.

I can draft a one-liner summary and add a Tip callout if you share the key topics covered in the livestream.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a406bb0 and 30e661d.

⛔ Files ignored due to path filters (1)
  • docs/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • docs/docs/python-sdk/introduction.mdx (1 hunks)
  • docs/package.json (1 hunks)
  • docs/src/components/VideoPlayer/index.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (CLAUDE.md)

docs/**/*.{md,mdx}: Follow the Diataxis framework and classify docs as Tutorials, How-to guides, Explanation, or Reference
Structure How-to guides with required frontmatter and sections: introduction, prerequisites, step-by-step steps, validation, related resources
Structure Topics (Explanation) docs with introduction, concepts & definitions, background & context, architecture & design, connections, further reading
Use a professional, concise, informative tone with consistent structure across documents
Use proper language tags on all code blocks
Include both async and sync examples where applicable using the Tabs component
Add validation steps to guides to confirm success and expected outputs
Use callouts for warnings, tips, and important notes
Define new terms on first use and use domain-relevant terminology consistent with Infrahub’s model/UI
Conform to markdown style rules in .markdownlint.yaml and Vale styles in .vale/styles/

Files:

  • docs/docs/python-sdk/introduction.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
docs/package.json (1)

25-26: Lockfile updated and version matches; lazy-load react-player

  • docs/package-lock.json contains react-player@^3.3.2 (matches docs/package.json) — lockfile is committed.
  • Lazy-load react-player in the docs VideoPlayer (dynamic import / React.lazy) to keep the docs bundle slim.

@petercrocker petercrocker merged commit e358da2 into stable Sep 13, 2025
14 checks passed
@petercrocker petercrocker deleted the pmc-20250913-docs branch September 13, 2025 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

task: Add uncut stream link

2 participants