Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(templates): fill viewport height across page templates so background covers the page (#3762)

Andrew Prasetyo06f0ba72628f
diff --git a/packages/cli/templates/pages/classic-gallery/page.tsx b/packages/cli/templates/pages/classic-gallery/page.tsx
index 43314e8c5b..f4ff478924 100644
--- a/packages/cli/templates/pages/classic-gallery/page.tsx
+++ b/packages/cli/templates/pages/classic-gallery/page.tsx
@@ -110,7 +110,7 @@ export default function ClassicGalleryTemplate() {
return (
<Layout
- height="auto"
+ height="fill"
content={
<LayoutContent padding={0}>
<Center axis="horizontal">
diff --git a/packages/cli/templates/pages/dashboard/page.tsx b/packages/cli/templates/pages/dashboard/page.tsx
index 194aa74cb4..a36a3c1a2b 100644
--- a/packages/cli/templates/pages/dashboard/page.tsx
+++ b/packages/cli/templates/pages/dashboard/page.tsx
@@ -729,7 +729,7 @@ function TableCard<T extends {id: string}>({
export default function DashboardTemplate() {
return (
<Layout
- height="auto"
+ height="fill"
content={
<LayoutContent padding={6}>
<VStack gap={6}>
diff --git a/packages/cli/templates/pages/documentation/page.tsx b/packages/cli/templates/pages/documentation/page.tsx
index 6189832253..51111739e5 100644
--- a/packages/cli/templates/pages/documentation/page.tsx
+++ b/packages/cli/templates/pages/documentation/page.tsx
@@ -209,7 +209,7 @@ const COMPONENT_CATEGORIES = [
export default function DocumentationOverviewPage() {
return (
<Layout
- height="auto"
+ height="fill"
contentWidth={1200}
content={
<LayoutContent padding={8}>
diff --git a/packages/cli/templates/pages/mixed-gallery/page.tsx b/packages/cli/templates/pages/mixed-gallery/page.tsx
index 0dc4eb9b2a..d57a120aad 100644
--- a/packages/cli/templates/pages/mixed-gallery/page.tsx
+++ b/packages/cli/templates/pages/mixed-gallery/page.tsx
@@ -112,7 +112,7 @@ function GalleryCard({
export default function MixedGalleryTemplate() {
return (
<Layout
- height="auto"
+ height="fill"
contentWidth={1400}
content={
<LayoutContent padding={6}>
diff --git a/packages/cli/templates/pages/payment-form/page.tsx b/packages/cli/templates/pages/payment-form/page.tsx
index 471f5b5bdd..8f72e1c557 100644
--- a/packages/cli/templates/pages/payment-form/page.tsx
+++ b/packages/cli/templates/pages/payment-form/page.tsx
@@ -153,10 +153,6 @@ const fmt = (n: number) => `$${n.toFixed(2)}`;
// :root by `@astryxdesign/core/astryx.css`). No StyleX compiler required.
const fullWidth: CSSProperties = {width: '100%'};
-// LayoutContent clips overflow by default, which traps position:sticky
-// children (the sticky order summary). With height="auto" the page scrolls
-// at the window, so let overflow be visible here so sticky can pin.
-const visibleOverflow: CSSProperties = {overflow: 'visible'};
// Form column flex-basis so the two checkout columns share width evenly.
const formColBasis: CSSProperties = {flexBasis: 0};
// Space the Order Summary content below its collapsible trigger title.
@@ -266,9 +262,9 @@ export default function PaymentFormPage() {
return (
<Layout
- height="auto"
+ height="fill"
content={
- <LayoutContent padding={0} style={visibleOverflow}>
+ <LayoutContent padding={0}>
<Center axis="horizontal">
<Section
variant="transparent"
diff --git a/packages/cli/templates/pages/product-detail/page.tsx b/packages/cli/templates/pages/product-detail/page.tsx
index ef45e3d50a..65c6115430 100644
--- a/packages/cli/templates/pages/product-detail/page.tsx
+++ b/packages/cli/templates/pages/product-detail/page.tsx
@@ -3,12 +3,7 @@
'use client';
import {useState} from 'react';
-import {
- VStack,
- HStack,
- Layout,
- LayoutContent,
-} from '@astryxdesign/core/Layout';
+import {VStack, HStack, Layout, LayoutContent} from '@astryxdesign/core/Layout';
import {Center} from '@astryxdesign/core/Center';
import {Grid} from '@astryxdesign/core/Grid';
import {Text, Heading} from '@astryxdesign/core/Text';
@@ -203,10 +198,7 @@ function ProductInfo() {
<VStack gap={2}>
<Text type="label">Finish</Text>
<VStack hAlign="start">
- <SegmentedControl
- value={finish}
- onChange={setFinish}
- label="Finish">
+ <SegmentedControl value={finish} onChange={setFinish} label="Finish">
{FINISHES.map(f => (
<SegmentedControlItem
key={f.value}
@@ -286,7 +278,7 @@ export default function ProductDetailTemplate() {
return (
<Layout
- height="auto"
+ height="fill"
contentWidth={1200}
content={
<LayoutContent padding={6}>
diff --git a/packages/cli/templates/pages/product-gallery/page.tsx b/packages/cli/templates/pages/product-gallery/page.tsx
index 108d7f4def..e5c60ca9bc 100644
--- a/packages/cli/templates/pages/product-gallery/page.tsx
+++ b/packages/cli/templates/pages/product-gallery/page.tsx
@@ -119,7 +119,7 @@ function ProductCard({product}: {product: Product}) {
export default function ProductGalleryTemplate() {
return (
<Layout
- height="auto"
+ height="fill"
contentWidth={1200}
content={
<LayoutContent padding={6}>
diff --git a/packages/cli/templates/pages/settings/page.tsx b/packages/cli/templates/pages/settings/page.tsx
index 3ef82083c2..b833c0daa4 100644
--- a/packages/cli/templates/pages/settings/page.tsx
+++ b/packages/cli/templates/pages/settings/page.tsx
@@ -70,7 +70,7 @@ export default function SettingsTemplate() {
return (
<Layout
- height="auto"
+ height="fill"
contentWidth={1440}
header={
<LayoutHeader hasDivider>
diff --git a/packages/cli/templates/pages/side-gallery/page.tsx b/packages/cli/templates/pages/side-gallery/page.tsx
index 9de01b8e76..658cfa9922 100644
--- a/packages/cli/templates/pages/side-gallery/page.tsx
+++ b/packages/cli/templates/pages/side-gallery/page.tsx
@@ -101,7 +101,7 @@ function ImageGrid() {
export default function SideGalleryTemplate() {
return (
<Layout
- height="auto"
+ height="fill"
contentWidth={1400}
content={
<LayoutContent padding={6}>
diff --git a/packages/cli/templates/pages/table-page-chart/page.tsx b/packages/cli/templates/pages/table-page-chart/page.tsx
index 1c94f542f7..d9a98f68f7 100644
--- a/packages/cli/templates/pages/table-page-chart/page.tsx
+++ b/packages/cli/templates/pages/table-page-chart/page.tsx
@@ -513,7 +513,7 @@ const columns: TableColumn<OrderRow>[] = [
export default function TablePageChartTemplate() {
return (
<Layout
- height="auto"
+ height="fill"
header={
<LayoutHeader hasDivider>
<HStack gap={2} vAlign="center">
diff --git a/packages/cli/templates/pages/table-page-heatmap-status/page.tsx b/packages/cli/templates/pages/table-page-heatmap-status/page.tsx
index e3ae6dd10d..a4322423f0 100644
--- a/packages/cli/templates/pages/table-page-heatmap-status/page.tsx
+++ b/packages/cli/templates/pages/table-page-heatmap-status/page.tsx
@@ -430,7 +430,7 @@ function OutageHeatmap() {
export default function TablePageHeatmapStatusTemplate() {
return (
<Layout
- height="auto"
+ height="fill"
header={
<LayoutHeader hasDivider>
<HStack gap={2} vAlign="center">
diff --git a/packages/cli/templates/pages/table-page-shoe-store-heatmap/page.tsx b/packages/cli/templates/pages/table-page-shoe-store-heatmap/page.tsx
index bb34c644c0..8a2f23bdca 100644
--- a/packages/cli/templates/pages/table-page-shoe-store-heatmap/page.tsx
+++ b/packages/cli/templates/pages/table-page-shoe-store-heatmap/page.tsx
@@ -867,7 +867,7 @@ const columns: TableColumn<OrderRow>[] = [
export default function TablePageShoeStoreHeatmapTemplate() {
return (
<Layout
- height="auto"
+ height="fill"
header={
<LayoutHeader hasDivider>
<HStack gap={2} vAlign="center">
diff --git a/packages/cli/templates/pages/table-page/page.tsx b/packages/cli/templates/pages/table-page/page.tsx
index 53a2eae186..9ee4db870d 100644
--- a/packages/cli/templates/pages/table-page/page.tsx
+++ b/packages/cli/templates/pages/table-page/page.tsx
@@ -389,7 +389,7 @@ export default function TablePageTemplate() {
return (
<Layout
- height="auto"
+ height="fill"
header={
<LayoutHeader hasDivider>
<HStack gap={2} vAlign="center">