Skip to content

refactor(Video): Remove SCSS from Video#3390

Draft
aresnik11 wants to merge 7 commits into
mainfrom
ajr-video-no-scss
Draft

refactor(Video): Remove SCSS from Video#3390
aresnik11 wants to merge 7 commits into
mainfrom
ajr-video-no-scss

Conversation

@aresnik11

@aresnik11 aresnik11 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Overview

The Video component was the last consumer of a standalone SCSS file (vds_base_theme.scss) for styling the Vidstack player. This PR removes that SCSS dependency, splitting its contents into two more idiomatic sources:

  • vidstack-vendor.css — the three third-party Vidstack @imports (default theme + video/audio layouts), imported as plain CSS.
  • styles.ts — our custom Vidstack overrides (YouTube overlay, control buttons, sliders, tooltips, keyframes), converted to an Emotion css template (vdsBaseThemeStyles) and applied through the existing VariableProvider styled component.

This aligns the Video component with the rest of Gamut's Emotion-based styling and removes the last SCSS file from the package.

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: GMT-1662
  • Version plan added/updated (or not needed)
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing instructions

Verify the Vidstack player looks and behaves identically to main — the goal is a no-visual-change refactor.

  1. Run Storybook and open the Video stories.
  2. For a standard (mp4/HLS) video, confirm:
    • Custom control bar renders with correct button styling and border radius.
    • Play/pause, volume slider, and time slider (scrubber) look correct in both the default and small layouts.
    • Hovering a control shows the tooltip with the correct arrow/caret and enter/exit fade animation.
  3. For a YouTube video, confirm the YouTube logo / copy-link overlay is still cropped out (the iframe.vds-youtube height override) both before and after playback starts.
  4. Confirm the poster/placeholder image and captions/text tracks still render.
  5. Build the package (yarn nx build gamut) and confirm vidstack-vendor.css is present in dist/Video/.

PR Links and Envs

Repository PR Link
Monolith Monolith PR
Mono Mono PR

@nx-cloud

nx-cloud Bot commented Jun 30, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 4cbfa62


☁️ Nx Cloud last updated this comment at 2026-07-08 18:57:22 UTC

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.08%. Comparing base (c9200cc) to head (4cbfa62).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3390      +/-   ##
==========================================
- Coverage   90.55%   90.08%   -0.47%     
==========================================
  Files         398      271     -127     
  Lines        6586     5671     -915     
  Branches     2141     1914     -227     
==========================================
- Hits         5964     5109     -855     
+ Misses        613      553      -60     
  Partials        9        9              
Flag Coverage Δ
main ?
pull-request 90.08% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aresnik11 aresnik11 changed the title remove scss refactor(Video): Remove SCSS from Video Jul 6, 2026
aresnik11 and others added 2 commits July 7, 2026 15:32
Update vidstack-vendor.css to use the webpack ~ module resolution prefix,
which tells webpack to resolve imports from node_modules. This ensures
the CSS imports are correctly resolved in both Storybook and consumer
builds like Codecademy.

Fixes module resolution error: "Can't resolve './@vidstack/react/..." when
Codecademy's webpack processes the CSS file from the gamut dist output.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@codecademydev

Copy link
Copy Markdown
Collaborator

📬 Published Alpha Packages:

Package Version npm Diff
@codecademy/gamut 72.2.5-alpha.cd2140.0 npm diff
@codecademy/gamut-icons 9.57.11-alpha.cd2140.0 npm diff
@codecademy/gamut-illustrations 0.58.16-alpha.cd2140.0 npm diff
@codecademy/gamut-kit 3.0.9-alpha.cd2140.0 npm diff
@codecademy/gamut-patterns 0.10.35-alpha.cd2140.0 npm diff
@codecademy/gamut-styles 20.0.3-alpha.cd2140.0 npm diff
@codecademy/gamut-tests 6.0.6-alpha.cd2140.0 npm diff
@codecademy/variance 0.26.2-alpha.cd2140.0 npm diff
eslint-plugin-gamut 2.4.4-alpha.cd2140.0 npm diff

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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