From 8feae5249c55ea6b985ab8c36b81fd2eb32baf5c Mon Sep 17 00:00:00 2001 From: Alin Clamba Date: Mon, 11 May 2026 11:54:12 +0300 Subject: [PATCH] VideoPress: fix Add new video button disappearing on the admin dashboard --- .../fix-add-new-video-button-clipped | 4 + .../admin/components/admin-page/index.tsx | 119 +++++++++--------- .../components/admin-page/styles.module.scss | 11 ++ .../fix-add-new-video-button-clipped | 4 + .../fix-add-new-video-button-clipped | 4 + 5 files changed, 86 insertions(+), 56 deletions(-) create mode 100644 projects/packages/videopress/changelog/fix-add-new-video-button-clipped create mode 100644 projects/plugins/jetpack/changelog/fix-add-new-video-button-clipped create mode 100644 projects/plugins/videopress/changelog/fix-add-new-video-button-clipped diff --git a/projects/packages/videopress/changelog/fix-add-new-video-button-clipped b/projects/packages/videopress/changelog/fix-add-new-video-button-clipped new file mode 100644 index 000000000000..53b668b8ca5d --- /dev/null +++ b/projects/packages/videopress/changelog/fix-add-new-video-button-clipped @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix the Add new video button disappearing on the admin dashboard after the first video is uploaded. diff --git a/projects/packages/videopress/src/client/admin/components/admin-page/index.tsx b/projects/packages/videopress/src/client/admin/components/admin-page/index.tsx index fe9703bb8762..3e8f9272b994 100644 --- a/projects/packages/videopress/src/client/admin/components/admin-page/index.tsx +++ b/projects/packages/videopress/src/client/admin/components/admin-page/index.tsx @@ -95,73 +95,80 @@ const Admin = () => { { showPricingSection ? ( - - - - setShowPricingSection( true ) } /> - - - - ) : ( - <> +
- - -
+ + + setShowPricingSection( true ) } /> - - - { hasConnectionError && ( + +
+ ) : ( + <> +
+ + - - - ) } - - { ( ! hasConnectedOwner || ! isUserConnected ) && ( - - +
- ) } + - - - { __( 'High quality, ad-free video', 'jetpack-videopress-pkg' ) } - + + { hasConnectionError && ( + + + + ) } - { hasVideoPressPurchase && ( - + { ( ! hasConnectedOwner || ! isUserConnected ) && ( + + + ) } - { hasVideos ? ( - - handleFilesUpload( filterVideoFiles( evt.currentTarget.files ) ) - } - accept={ fileInputExtensions } - multiple={ hasVideoPressPurchase } - render={ ( { openFileDialog } ) => ( - - ) } - __next40pxDefaultSize={ true } - /> - ) : ( - - { __( "Let's add your first video below!", 'jetpack-videopress-pkg' ) } + + + { __( 'High quality, ad-free video', 'jetpack-videopress-pkg' ) } - ) } - { ! hasVideoPressPurchase && } - - - + { hasVideoPressPurchase && ( + + ) } + + { hasVideos ? ( + + handleFilesUpload( filterVideoFiles( evt.currentTarget.files ) ) + } + accept={ fileInputExtensions } + multiple={ hasVideoPressPurchase } + render={ ( { openFileDialog } ) => ( + + ) } + __next40pxDefaultSize={ true } + /> + ) : ( + + { __( "Let's add your first video below!", 'jetpack-videopress-pkg' ) } + + ) } + + { ! hasVideoPressPurchase && } + + + +
{ hasVideos ? ( diff --git a/projects/packages/videopress/src/client/admin/components/admin-page/styles.module.scss b/projects/packages/videopress/src/client/admin/components/admin-page/styles.module.scss index 867964766d79..6d4b41a0c98b 100644 --- a/projects/packages/videopress/src/client/admin/components/admin-page/styles.module.scss +++ b/projects/packages/videopress/src/client/admin/components/admin-page/styles.module.scss @@ -41,6 +41,17 @@ } } +// VIDP-242: prevent from being shrunk to 0 by the +// jetpack-admin-page-layout flex chain. The shared .section-hero has +// overflow: hidden, which lets its min-height: auto resolve to 0 in a +// flex column, so the hero absorbs all shrink pressure from the populated +// library and clips the "Add new video" button. This wrapper keeps the +// hero at content height. Safe to remove when the legacy dashboard is +// retired at the Phase 9 cutover of issue #48506. +.hero-shrink-guard { + flex-shrink: 0; +} + .first-video-wrapper { display: flex; flex-direction: column; diff --git a/projects/plugins/jetpack/changelog/fix-add-new-video-button-clipped b/projects/plugins/jetpack/changelog/fix-add-new-video-button-clipped new file mode 100644 index 000000000000..30d80e2c45ce --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-add-new-video-button-clipped @@ -0,0 +1,4 @@ +Significance: patch +Type: bugfix + +VideoPress: fix the Add new video button disappearing on the admin dashboard after the first video is uploaded. diff --git a/projects/plugins/videopress/changelog/fix-add-new-video-button-clipped b/projects/plugins/videopress/changelog/fix-add-new-video-button-clipped new file mode 100644 index 000000000000..53b668b8ca5d --- /dev/null +++ b/projects/plugins/videopress/changelog/fix-add-new-video-button-clipped @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix the Add new video button disappearing on the admin dashboard after the first video is uploaded.