feat(NES-1629): video picker uploads grid (MyMuxVideosGrid)#9175
feat(NES-1629): video picker uploads grid (MyMuxVideosGrid)#9175edmonday wants to merge 2 commits into
Conversation
Adds the "Your uploads" grid below the Mux upload form in the editor's video picker, gated behind the `mediaLibrary` LaunchDarkly flag. - New `MyMuxVideosGrid` component: 3-col grid, offset/limit pagination with PAGE_SIZE 9 and "Load More" / "No more to load" disabled state. - Filters to ready-to-stream videos with non-null playbackId. - Click-tile opens existing `VideoDetails` + `MuxDetails`; `playbackId` threaded through to skip the redundant fetch. - `MuxDetails` now disposes the videojs player on unmount and accepts an `id` + `playbackId` so it can render a Select button when used in the gallery (no `activeVideoBlock`). - `MuxVideoUploadProvider` refetches `GetMyMuxVideos` after polling completes so freshly-ready uploads surface in the grid. - Apollo cache: `getMyMuxVideos` uses `offsetLimitPagination()` to merge fetchMore pages.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
View your CI Pipeline Execution ↗ for commit 9fbe624
☁️ Nx Cloud last updated this comment at |
|
The latest updates on your projects.
|
Closes NES-1629.
Summary
Adds the "Your uploads" grid below the Mux upload form in the editor's video picker, gated behind the
mediaLibraryLaunchDarkly flag. Builds on BE-1 (NES-1627, PR #9166) which added deterministic ordering togetMyMuxVideos.What's included
MyMuxVideosGridcomponentuseQuery(GetMyMuxVideos, { offset, limit: 9 })playbackIdVideoDetails+MuxDetails;playbackIdthreaded through to avoid the redundant fetch. Confirm-to-select via "Select" button applies the video to the active block (shouldCloseDrawer=true).MuxDetails.dispose()cleanup of the videojs player instance on unmount (player leak fix).MuxVideoUploadProvidercallsclient.refetchQueries({ include: ['GetMyMuxVideos'] })from the polling-completion path so freshly-ready uploads surface in the grid.getMyMuxVideosconfigured withoffsetLimitPagination()sofetchMorecorrectly merges pages.MyMuxVideosGridmount inVideoFromMux.tsxis wrapped inmediaLibrary === true(per the rollout plan indocs/plans/2026-04-28-001-feat-editor-asset-library-plan.md). Flag-off path is locked in by a regression test.VideoLibrary.onSelectalready closes the outer drawer whenshouldCloseDraweris true onmain, so no change needed there.Tests added
MyMuxVideosGrid.spec.tsx:VideoFromMux.spec.tsx:MuxDetails.spec.tsx:idpropVerification
npx jest --config apps/journeys-admin/jest.config.ts --no-coverage 'apps/journeys-admin/src/components/Editor/Slider/Settings/Drawer/VideoLibrary' 'apps/journeys-admin/src/components/MuxVideoUploadProvider'-> 25 suites, 179 tests passnpx nx type-check journeys-admin-> passesnpx nx build journeys-admin-> compiles successfully; SSG step for/templatesfails locally because no GraphQL server is running on127.0.0.1:4000(unrelated to this PR)Files changed
apps/journeys-admin/__generated__/GetMyMuxVideos.ts(new)apps/journeys-admin/src/components/Editor/Slider/Settings/Drawer/VideoLibrary/VideoFromMux/MyMuxVideosGrid/{MyMuxVideosGrid.tsx,MyMuxVideosGrid.spec.tsx,index.ts}(new)apps/journeys-admin/src/components/Editor/Slider/Settings/Drawer/VideoLibrary/VideoFromMux/VideoFromMux.tsx+ specapps/journeys-admin/src/components/Editor/Slider/Settings/Drawer/VideoLibrary/VideoFromMux/MuxDetails/MuxDetails.tsx+ spec + storiesapps/journeys-admin/src/components/Editor/Slider/Settings/Drawer/VideoLibrary/VideoDetails/VideoDetails.tsxapps/journeys-admin/src/components/MuxVideoUploadProvider/MuxVideoUploadProvider.tsxapps/journeys-admin/src/libs/apolloClient/cache.tsTest plan
shouldCloseDrawerpath