Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -95,73 +95,80 @@ const Admin = () => {
</div>

{ showPricingSection ? (
<AdminSectionHero>
<Container horizontalSpacing={ 3 } horizontalGap={ 3 }>
<Col sm={ 4 } md={ 8 } lg={ 12 }>
<PricingSection onRedirecting={ () => setShowPricingSection( true ) } />
</Col>
</Container>
</AdminSectionHero>
) : (
<>
<div className={ styles[ 'hero-shrink-guard' ] }>
<AdminSectionHero>
<Container horizontalSpacing={ 0 }>
<Col>
<div id="jp-admin-notices" className={ styles[ 'jetpack-videopress-jitm-card' ] } />
<Container horizontalSpacing={ 3 } horizontalGap={ 3 }>
<Col sm={ 4 } md={ 8 } lg={ 12 }>
<PricingSection onRedirecting={ () => setShowPricingSection( true ) } />
</Col>
</Container>

<Container horizontalSpacing={ 6 } horizontalGap={ 3 }>
{ hasConnectionError && (
</AdminSectionHero>
</div>
) : (
<>
<div className={ styles[ 'hero-shrink-guard' ] }>
<AdminSectionHero>
<Container horizontalSpacing={ 0 }>
<Col>
<ConnectionError />
</Col>
) }

{ ( ! hasConnectedOwner || ! isUserConnected ) && (
<Col sm={ 4 } md={ 8 } lg={ 12 }>
<NeedUserConnectionGlobalNotice />
<div
id="jp-admin-notices"
className={ styles[ 'jetpack-videopress-jitm-card' ] }
/>
</Col>
) }
</Container>

<Col sm={ 4 } md={ 8 } lg={ 8 }>
<Text variant="headline-small" mb={ 3 }>
{ __( 'High quality, ad-free video', 'jetpack-videopress-pkg' ) }
</Text>
<Container horizontalSpacing={ 6 } horizontalGap={ 3 }>
{ hasConnectionError && (
<Col>
<ConnectionError />
</Col>
) }

{ hasVideoPressPurchase && (
<ConnectVideoStorageMeter className={ styles[ 'storage-meter' ] } />
{ ( ! hasConnectedOwner || ! isUserConnected ) && (
<Col sm={ 4 } md={ 8 } lg={ 12 }>
<NeedUserConnectionGlobalNotice />
</Col>
) }

{ hasVideos ? (
<FormFileUpload
onChange={ evt =>
handleFilesUpload( filterVideoFiles( evt.currentTarget.files ) )
}
accept={ fileInputExtensions }
multiple={ hasVideoPressPurchase }
render={ ( { openFileDialog } ) => (
<Button
fullWidth={ isSm }
onClick={ openFileDialog }
isLoading={ loading }
disabled={ ! canUpload }
>
{ __( 'Add new video', 'jetpack-videopress-pkg' ) }
</Button>
) }
__next40pxDefaultSize={ true }
/>
) : (
<Text variant="title-medium">
{ __( "Let's add your first video below!", 'jetpack-videopress-pkg' ) }
<Col sm={ 4 } md={ 8 } lg={ 8 }>
<Text variant="headline-small" mb={ 3 }>
{ __( 'High quality, ad-free video', 'jetpack-videopress-pkg' ) }
</Text>
) }

{ ! hasVideoPressPurchase && <UpgradeTrigger hasUsedVideo={ hasVideos } /> }
</Col>
</Container>
</AdminSectionHero>
{ hasVideoPressPurchase && (
<ConnectVideoStorageMeter className={ styles[ 'storage-meter' ] } />
) }

{ hasVideos ? (
<FormFileUpload
onChange={ evt =>
handleFilesUpload( filterVideoFiles( evt.currentTarget.files ) )
}
accept={ fileInputExtensions }
multiple={ hasVideoPressPurchase }
render={ ( { openFileDialog } ) => (
<Button
fullWidth={ isSm }
onClick={ openFileDialog }
isLoading={ loading }
disabled={ ! canUpload }
>
{ __( 'Add new video', 'jetpack-videopress-pkg' ) }
</Button>
) }
__next40pxDefaultSize={ true }
/>
) : (
<Text variant="title-medium">
{ __( "Let's add your first video below!", 'jetpack-videopress-pkg' ) }
</Text>
) }

{ ! hasVideoPressPurchase && <UpgradeTrigger hasUsedVideo={ hasVideos } /> }
</Col>
</Container>
</AdminSectionHero>
</div>
<AdminSection>
<Container horizontalSpacing={ 6 } horizontalGap={ 10 }>
{ hasVideos ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
}
}

// VIDP-242: prevent <AdminSectionHero> 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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Loading