Skip to content

Commit 17bd73e

Browse files
committed
chore(landing): single-source RESET_FADE_MS and drop the unused card frame size
RESET_FADE_MS now lives only in the shared loop-engine hook module; the enterprise stage-data copy is removed. SolutionsVisualFrame loses its size prop and cardHeight constant - only the 16:9 hero preset remained in use after the split-variant removal.
1 parent eb146b6 commit 17bd73e

5 files changed

Lines changed: 6 additions & 16 deletions

File tree

apps/sim/app/(landing)/components/solutions-page/components/solutions-hero/solutions-hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export function SolutionsHero({ hero, align = 'left', variant = 'solutions' }: S
121121
</div>
122122
</div>
123123

124-
<SolutionsVisualFrame size='hero'>{hero.visual}</SolutionsVisualFrame>
124+
<SolutionsVisualFrame>{hero.visual}</SolutionsVisualFrame>
125125
</section>
126126
)
127127
}

apps/sim/app/(landing)/components/solutions-page/components/solutions-visual-frame/solutions-visual-frame.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { SOLUTIONS_VISUAL } from '@/app/(landing)/components/solutions-page/cons
66
* The one escape hatch in the solutions layout - a fixed-dimension frame that
77
* holds a page-supplied visual `ReactNode`. The frame owns its chrome (the
88
* hero-visual family: `--surface-2` fill, `--border-1` hairline, `rounded-lg`,
9-
* `overflow-hidden`) and, crucially, its dimensions: a `hero` frame reserves a
10-
* 16:9 aspect ratio, a `card` frame a fixed height. Because the size is reserved
9+
* `overflow-hidden`) and, crucially, its dimensions: it reserves a full-width
10+
* 16:9 aspect ratio for the solutions hero visual. Because the size is reserved
1111
* before paint and the node fills `h-full w-full` inside, a dropped-in node can
1212
* neither shift surrounding layout (CLS = 0) nor change the frame's own padding.
1313
*
@@ -16,23 +16,17 @@ import { SOLUTIONS_VISUAL } from '@/app/(landing)/components/solutions-page/cons
1616
*/
1717

1818
interface SolutionsVisualFrameProps {
19-
/**
20-
* Reserved-dimension preset.
21-
* - `hero` - full-width 16:9 frame for the solutions hero visual.
22-
* - `card` - fixed-height frame for a card's visual panel.
23-
*/
24-
size: 'hero' | 'card'
2519
/** The page-supplied visual island or static panel. Fills the frame; owns no chrome. */
2620
children: ReactNode
2721
}
2822

29-
export function SolutionsVisualFrame({ size, children }: SolutionsVisualFrameProps) {
23+
export function SolutionsVisualFrame({ children }: SolutionsVisualFrameProps) {
3024
return (
3125
<div
3226
aria-hidden='true'
3327
className={cn(
3428
'w-full overflow-hidden rounded-lg border border-[var(--border-1)] bg-[var(--surface-2)]',
35-
size === 'hero' ? SOLUTIONS_VISUAL.heroAspect : SOLUTIONS_VISUAL.cardHeight
29+
SOLUTIONS_VISUAL.heroAspect
3630
)}
3731
>
3832
<div className='h-full w-full'>{children}</div>

apps/sim/app/(landing)/components/solutions-page/constants.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ export const SOLUTIONS_TEXT_MEASURE = {
7979
export const SOLUTIONS_VISUAL = {
8080
/** Full-width hero visual aspect ratio - reserves height before paint. */
8181
heroAspect: 'aspect-[16/9]',
82-
/** Fixed height of a card's visual panel - uniform across every card. */
83-
cardHeight: 'h-[240px]',
8482
/**
8583
* The feature-tile proportional-scaling system. Tiles are authored against a
8684
* fixed design space - `352px` wide (the 3-up column at the widest desktop

apps/sim/app/(landing)/enterprise/components/enterprise-platform-loop/enterprise-platform-loop.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
ENTERPRISE_LOOP_CONTENT,
1212
type EnterpriseLoopContent,
1313
type EnterpriseLoopPhase,
14-
RESET_FADE_MS,
1514
} from '@/app/(landing)/enterprise/components/enterprise-platform-loop/stage-data'
15+
import { RESET_FADE_MS } from '@/app/(landing)/hooks/use-design-scale'
1616
import { useMotionSafeCycle } from '@/app/(landing)/hooks/use-motion-safe-cycle'
1717

1818
interface EnterprisePlatformLoopProps {

apps/sim/app/(landing)/enterprise/components/enterprise-platform-loop/stage-data.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@ export const BUILD_STEP_MS = 620
207207
const REPLY_AFTER_MS = 500
208208
/** The finished scene (reply + built canvas) holds this long. */
209209
const REPLY_HOLD_MS = 4800
210-
/** Fade-out length before the cycle restarts. */
211-
export const RESET_FADE_MS = 300
212210

213211
/** Derived phase starts for one loop pass. */
214212
export interface LoopTimeline {

0 commit comments

Comments
 (0)