Skip to content

Add Video component for Astro Starlight documentation - #13902

Merged
pelikhan merged 5 commits into
mainfrom
copilot/add-video-component-to-docs
Feb 5, 2026
Merged

Add Video component for Astro Starlight documentation#13902
pelikhan merged 5 commits into
mainfrom
copilot/add-video-component-to-docs

Conversation

CopilotAI commented Feb 5, 2026

Copy link
Copy Markdown
Contributor
  • Research video component patterns from GenAIScript
  • Create unique Video.astro component with distinct implementation
  • Add comprehensive TypeScript props with aspect ratio support
  • Include responsive styling with namespace-prefixed classes
  • Create public/videos directory with README
  • Build and verify documentation compiles correctly
  • Remove Video Component documentation page (internal component)
  • Move component styles from Video.astro to custom.css
  • Update README to use Astro import magic routes (@components)
Original prompt

Add a video component to the Astro starlight documentation to show video files hosted in the Publix folder.

Search the Microsoft/genaiscript repo for an implementation


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAIand others added 3 commits February 5, 2026 12:53
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Add video component to Astro starlight documentationAdd Video component for Astro Starlight documentationFeb 5, 2026
CopilotAI requested a review from pelikhanFebruary 5, 2026 12:58
Comment threaddocs/astro.config.mjs Outdated
{ label: 'Custom Agents', link: '/reference/copilot-custom-agents/' },
{ label: 'GH-AW as MCP Server', link: '/setup/mcp-server/' },
{ label: 'MCP Gateway', link: '/reference/mcp-gateway/' },
{ label: 'Video Component', link: '/reference/video-component/' },

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot do not document this component, it is internal to the docs

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Removed from sidebar in commit 44ea937

Comment threaddocs/public/videos/README.md Outdated
Place video files here and reference them in documentation using the Video component:

```mdx
import Video from '../../../components/Video.astro';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot use Astro starlight import magic routes?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated to use @components/Video.astro import path in commit 44ea937

Comment threaddocs/src/components/Video.astro Outdated
)}
</div>

<style>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot move style to site style.css

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Moved all styles to custom.css in commit 44ea937

@@ -0,0 +1,160 @@
---

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot delete file

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Deleted in commit 44ea937

…ate imports
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

CopilotAI commented Feb 5, 2026

Copy link
Copy Markdown
ContributorAuthor

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node node /home/REDACTED/.npm/_npx/aa98e6899c6baff3/node_modules/.bin/astro build (dns block)
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

CopilotAI requested a review from pelikhanFebruary 5, 2026 13:09
@pelikhan
pelikhan marked this pull request as ready for review February 5, 2026 13:24
CopilotAI review requested due to automatic review settings February 5, 2026 13:24
@pelikhan
pelikhan merged commit fb6a23c into mainFeb 5, 2026
1 check passed
@pelikhan
pelikhan deleted the copilot/add-video-component-to-docs branch February 5, 2026 13:25

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds a Video component to the Astro Starlight documentation for displaying video files hosted in the public folder. The implementation includes comprehensive TypeScript props, responsive styling, accessibility features, and documentation.

Changes:

  • New Video.astro component with aspect ratio support, autoplay controls, and accessibility features
  • Custom CSS styling in docs/src/styles/custom.css with theme support and responsive design
  • Public videos directory with README documentation for usage guidelines

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

FileDescription
docs/src/components/Video.astroNew Astro component with TypeScript interface for displaying videos with configurable aspect ratios, controls, and captions
docs/src/styles/custom.cssGlobal CSS styles for Video component with light/dark theme support and responsive design
docs/public/videos/README.mdDocumentation for using the Video component and managing video files
Comments suppressed due to low confidence (1)

docs/public/videos/README.md:10

  • The @components import alias used in the README examples doesn't exist in this codebase. The tsconfig.json and astro.config.mjs don't configure this alias.

Other components in the codebase (like FeatureCard at docs/src/content/docs/index.mdx:20) use relative paths like '../../components/Video.astro'. The README should follow the same pattern for consistency.

import Video from '@components/Video.astro';

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

2. Reference it in your MDX file:

```mdx
import Video from '@components/Video.astro';

CopilotAIFeb 5, 2026

Copy link

Choose a reason for hiding this comment

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

The @components import alias used here doesn't exist in this codebase. Other components use relative paths like '../../components/Video.astro'. Update this example to use the correct relative import pattern based on where the MDX file will be located.

Copilot uses AI. Check for mistakes.
muted={silenced}
poster={thumbnail}
preload="metadata"
aria-label={caption}

CopilotAIFeb 5, 2026

Copy link

Choose a reason for hiding this comment

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

The aria-label attribute is set to the caption prop value, but when caption is undefined (which is common), this results in aria-label={undefined} which doesn't provide meaningful accessibility information. Consider providing a fallback or making the aria-label conditional. For example: aria-label={caption || 'Video content'}

Suggested change
aria-label={caption}
aria-label={caption||'Video content'}

Copilot uses AI. Check for mistakes.
Comment on lines +1626 to +1711
/* Video Component Styles */
.gh-aw-video-wrapper {
margin: 2rem auto;
width: 100%;
}

.gh-aw-video-container {
position: relative;
width: 100%;
background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
border-radius: 12px;
overflow: hidden;
box-shadow:
0 8px 16px rgba(0, 0, 0, 0.4),
0 0 0 1px rgba(255, 255, 255, 0.05);
transition: box-shadow 0.3s ease;
}

.gh-aw-video-container:hover {
box-shadow:
0 12px 24px rgba(0, 0, 0, 0.5),
0 0 0 1px rgba(139, 92, 246, 0.3);
}

.gh-aw-video-container.has-aspect-ratio {
height: 0;
padding-bottom: 56.25%;
}

.gh-aw-video-element {
width: 100%;
height: 100%;
display: block;
background-color: #000;
}

.has-aspect-ratio .gh-aw-video-element {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: contain;
}

.gh-aw-video-caption {
margin-top: 0.75rem;
padding: 0.5rem 1rem;
font-size: 0.9rem;
color: var(--sl-color-gray-3);
text-align: center;
background: var(--sl-color-gray-6);
border-left: 3px solid var(--sl-color-purple);
border-radius: 0 6px 6px 0;
font-style: italic;
}

[data-theme='light'] .gh-aw-video-container {
background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
box-shadow:
0 8px 16px rgba(0, 0, 0, 0.15),
0 0 0 1px rgba(0, 0, 0, 0.08);
}

[data-theme='light'] .gh-aw-video-container:hover {
box-shadow:
0 12px 24px rgba(0, 0, 0, 0.2),
0 0 0 1px rgba(102, 57, 186, 0.3);
}

[data-theme='light'] .gh-aw-video-caption {
color: var(--sl-color-gray-2);
background: var(--sl-color-gray-7);
}

@media (max-width: 768px) {
.gh-aw-video-wrapper {
margin: 1.5rem auto;
}
}

@media (prefers-reduced-motion: reduce) {
.gh-aw-video-container {
transition: none;
}
}

CopilotAIFeb 5, 2026

Copy link

Choose a reason for hiding this comment

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

The CSS class naming pattern gh-aw-video-* is unique to this component. Other components in the codebase (FeatureCard.astro, ResponsiveTable.astro) use inline <style> blocks with non-prefixed class names specific to their component. This creates an inconsistency where only the Video component styles are in the global CSS file. Consider either:

  1. Moving these styles to a <style> block in Video.astro to match existing component patterns, or
  2. Documenting why Video requires global styles (if there's a specific reason)

Copilot uses AI. Check for mistakes.
Sign up for freeto 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.

3 participants

@pelikhan