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
91 changes: 48 additions & 43 deletions projects/packages/publicize/_inc/components/admin-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,51 +93,56 @@ export const SocialAdminPage = () => {
actions={ licenseAction }
>
<GlobalNotices />
{ isJetpackSite && ! hasSocialPaidFeatures() && showPricingPage && ! pricingPageDismissed ? (
<AdminSectionHero>
<Container horizontalSpacing={ 0 }>
{ hasConnectionError && (
<Col className={ styles[ 'connection-error-col' ] }>
<ConnectionError />
</Col>
) }
<Col>
<div id="jp-admin-notices" className="jetpack-social-jitm-card" />
</Col>
</Container>
<Container horizontalSpacing={ 3 } horizontalGap={ 3 }>
<Col>
<PricingPage onDismiss={ onPricingPageDismiss } />
</Col>
</Container>
</AdminSectionHero>
) : (
<>
<AdminSectionHero>
<Header />
</AdminSectionHero>
<AdminSection>
<SocialModuleToggle />
{ canManageOptions && (
<>
{ isModuleEnabled && <UtmToggle /> }
{
// Only show the Social Notes toggle if Social plugin is active
social.version && isModuleEnabled && (
<SocialNotesToggle disabled={ isUpdatingJetpackSettings } />
)
}
{ isModuleEnabled && siteHasFeature( features.IMAGE_GENERATOR ) && (
<SocialImageGeneratorToggle disabled={ isUpdatingJetpackSettings } />
) }
</>
) }
</AdminSection>
<div className={ styles.content }>
{ isJetpackSite &&
! hasSocialPaidFeatures() &&
showPricingPage &&
! pricingPageDismissed ? (
<AdminSectionHero>
<InfoSection />
<Container horizontalSpacing={ 0 }>
{ hasConnectionError && (
<Col className={ styles[ 'connection-error-col' ] }>
<ConnectionError />
</Col>
) }
<Col>
<div id="jp-admin-notices" className="jetpack-social-jitm-card" />
</Col>
</Container>
<Container horizontalSpacing={ 3 } horizontalGap={ 3 }>
<Col>
<PricingPage onDismiss={ onPricingPageDismiss } />
</Col>
</Container>
</AdminSectionHero>
</>
) }
) : (
<>
<AdminSectionHero>
<Header />
</AdminSectionHero>
<AdminSection>
<SocialModuleToggle />
{ canManageOptions && (
<>
{ isModuleEnabled && <UtmToggle /> }
{
// Only show the Social Notes toggle if Social plugin is active
social.version && isModuleEnabled && (
<SocialNotesToggle disabled={ isUpdatingJetpackSettings } />
)
}
{ isModuleEnabled && siteHasFeature( features.IMAGE_GENERATOR ) && (
<SocialImageGeneratorToggle disabled={ isUpdatingJetpackSettings } />
) }
</>
) }
</AdminSection>
<AdminSectionHero>
<InfoSection />
</AdminSectionHero>
</>
) }
</div>
</AdminPage>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,16 @@
.connection-error-col {
margin-top: 25px;
}

// The shared admin-page-layout mixin makes the wrapping `<Col>` a flex
// column so DataViews-style consumers can fill the bounded slot. With
// multiple direct children — `<AdminSectionHero>` (overflow: hidden, so
// its automatic flex `min-height` resolves to 0) and a tall
// `<AdminSection>` — flex shrinks the heroes to nothing and the column
// can't scroll out of it. Wrapping the page sections in a single block
// child gives Col one flow item with `min-height: auto` (overflow
// visible), so siblings stack at content size and overflow falls back
// to the middle's `overflow: auto`.
.content {
display: block;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Social admin page: prevent stacked content sections from collapsing when the page content overflows the scrollable area.
Loading