Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Studio: Change the position of the create preview button #918

Merged
merged 2 commits into from
Feb 12, 2025
Merged
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
48 changes: 23 additions & 25 deletions src/components/content-tab-previews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,33 +197,31 @@ export function ContentTabPreviews( { selectedSite }: ContentTabPreviewsProps )
return (
<div className="relative min-h-full flex flex-col">
<div className="w-full flex flex-col flex-1">
<div className="flex-1">
<PreviewSitesTableHeader />
<div className="[&>*:not(:last-child)]:border-b [&>*]:border-a8c-gray-5">
{ ( isUploading || isSnapshotLoading ) && (
<ProgressRow text={ __( 'Creating preview site' ) } />
) }
{ snapshotsOnSite
.filter( ( snapshot ) => ! snapshot.isLoading )
.sort( ( a, b ) => b.date - a.date )
.map( ( snapshot ) => (
<PreviewSiteRow
snapshot={ snapshot }
selectedSite={ selectedSite }
disabledUpdate={ isUpdateDisabled }
updateButtonTooltipContent={ tooltipContent }
showUpdateTooltip={ isOverLimit }
key={ snapshot.atomicSiteId }
/>
) ) }
<PreviewSitesTableHeader />
<div className="[&>*:not(:last-child)]:border-b [&>*]:border-a8c-gray-5">
{ ( isUploading || isSnapshotLoading ) && (
<ProgressRow text={ __( 'Creating preview site' ) } />
) }
{ snapshotsOnSite
.filter( ( snapshot ) => ! snapshot.isLoading )
.sort( ( a, b ) => b.date - a.date )
.map( ( snapshot ) => (
<PreviewSiteRow
snapshot={ snapshot }
selectedSite={ selectedSite }
disabledUpdate={ isUpdateDisabled }
updateButtonTooltipContent={ tooltipContent }
showUpdateTooltip={ isOverLimit }
key={ snapshot.atomicSiteId }
/>
) ) }
<div className="sticky bottom-0 bg-white/[0.8] backdrop-blur-sm w-full px-8 py-6 mt-auto">
<CreatePreviewButton
onClick={ () => archiveSite( selectedSite.id ) }
selectedSite={ selectedSite }
/>
</div>
</div>
<div className="sticky bottom-0 bg-white/[0.8] backdrop-blur-sm w-full px-8 py-6 mt-auto">
<CreatePreviewButton
onClick={ () => archiveSite( selectedSite.id ) }
selectedSite={ selectedSite }
/>
</div>
</div>
</div>
);
Expand Down
Loading