Skip to content

Clean up and de-duplicate the VideoPlaylistCollectionPage folder - #3706

Open
ahtesham-quraish wants to merge 1 commit into
mainfrom
ahtesham/video-page-impr
Open

Clean up and de-duplicate the VideoPlaylistCollectionPage folder#3706
ahtesham-quraish wants to merge 1 commit into
mainfrom
ahtesham/video-page-impr

Conversation

@ahtesham-quraish

Copy link
Copy Markdown
Contributor

What are the relevant tickets?

https://github.com/mitodl/hq/issues/12420

Description (What does it do?)

Screenshots (if appropriate):

  • Desktop screenshots
  • Mobile width screenshots

How can this be tested?

Additional Context

Copilot AI review requested due to automatic review settings July 30, 2026 11:00
@github-actions

Copy link
Copy Markdown

OpenAPI Changes

No changes detected

View full changelog

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

Copilot AI 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 PR refactors the VideoPlaylistCollectionPage frontend code to reduce duplication by centralizing shared UI primitives and extracting reusable pieces into dedicated modules, while updating imports/tests to reference the consolidated components.

Changes:

  • Consolidates shared styled primitives (e.g., ScreenReaderOnly, DurationBadge, ThumbnailWrapper, VideoTitle) into shared.styled.ts and updates consuming components to import from there.
  • Extracts the “More from playlist” rendering into a new MoreFromPlaylist component and moves VideoDetailPage styling into a dedicated VideoDetailPage.styled.ts module.
  • Removes thin re-export shim files (e.g., ShareDialog.tsx, VideoShareDialog.tsx) and updates tests/imports to use the canonical ShareDialog.

Reviewed changes

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

Show a summary per file
File Description
frontends/main/src/page-components/ResourceCard/ResourceCard.test.tsx Removes now-unneeded mocking tied to the old ShareDialog shim path.
frontends/main/src/components/ShareDialog/ShareDialog.test.tsx Updates test to use the canonical ShareDialog component name/import.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoShareDialog.tsx Removes re-export shim for the share dialog.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoShareButton.tsx Moves shared button sizing into this component to eliminate per-page wrappers.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoSeriesDetailPage.tsx Uses shared VideoTitle styling and removes the extra share button wrapper.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoSeriesDetailPage.styled.ts Re-exports shared primitives from shared.styled.ts and removes duplicate definitions.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoResourcePlayer.tsx Uses shared ScreenReaderOnly instead of a local duplicate.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoJsPlayer.tsx Removes backward-compat re-export of resolveVideoSources (source remains in videoSources.ts).
frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoDetailPage.tsx Splits large inline styling and “More from” rendering into dedicated modules; introduces MORE_FROM_LIMIT constant.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoDetailPage.styled.ts New: centralizes VideoDetailPage styled primitives and re-exports shared primitives.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoCard.tsx Switches duplicated thumbnail/badge/overlay primitives to shared exports.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/ShareDialog.tsx Removes re-export shim for the share dialog.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/shared.styled.ts Adds shared styled primitives to eliminate duplication across video pages.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/MoreFromPlaylist.tsx New: extracted component for the “More from playlist” section.
frontends/main/src/app-pages/VideoPlaylistCollectionPage/FeaturedVideo.tsx Uses shared DurationBadge and clarifies overlay distinction.

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