diff --git a/apps/storybook/stories/Review3935.stories.tsx b/apps/storybook/stories/Review3935.stories.tsx new file mode 100644 index 00000000000..fb717edaf99 --- /dev/null +++ b/apps/storybook/stories/Review3935.stories.tsx @@ -0,0 +1,163 @@ +// Temporary review harness for PR #3935. Not committed. +import type {Meta, StoryObj} from '@storybook/react'; +import * as stylex from '@stylexjs/stylex'; +import {HStack, Stack, VStack} from '@astryxdesign/core/Layout'; +import {colorVars, spacingVars} from '@astryxdesign/core/theme/tokens.stylex'; + +const styles = stylex.create({ + page: { + display: 'grid', + gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', + gap: spacingVars['--spacing-4'], + padding: spacingVars['--spacing-4'], + backgroundColor: colorVars['--color-background-body'], + color: colorVars['--color-text-primary'], + }, + pane: { + height: 280, + overflow: 'auto', + borderWidth: 1, + borderStyle: 'solid', + borderColor: colorVars['--color-border'], + backgroundColor: colorVars['--color-background-card'], + }, + columns: { + display: 'grid', + gridTemplateColumns: 'minmax(0, 1fr) 150px', + alignItems: 'stretch', + gap: spacingVars['--spacing-3'], + padding: spacingVars['--spacing-2'], + }, + legacySticky: { + position: 'sticky', + insetBlockStart: spacingVars['--spacing-8'], + alignSelf: 'flex-start', + }, + panel: { + backgroundColor: colorVars['--color-background-blue'], + color: colorVars['--color-text-blue'], + borderWidth: 1, + borderStyle: 'solid', + borderColor: colorVars['--color-border-blue'], + padding: spacingVars['--spacing-3'], + }, + tall: { + minHeight: 760, + }, + block: { + minHeight: 100, + borderBottomWidth: 1, + borderBottomStyle: 'solid', + borderBottomColor: colorVars['--color-border'], + padding: spacingVars['--spacing-2'], + }, + columnPane: { + display: 'flex', + flexDirection: 'column', + alignItems: 'stretch', + inlineSize: 320, + height: 260, + overflow: 'auto', + borderWidth: 1, + borderStyle: 'solid', + borderColor: colorVars['--color-border'], + padding: spacingVars['--spacing-2'], + }, + fullWidth: { + inlineSize: '100%', + }, + stretchSelf: { + alignSelf: 'stretch', + }, + zoom200: { + fontSize: '200%', + }, +}); + +function TallContent() { + return ( + + {Array.from({length: 7}, (_, index) => ( +
Scrollable neighbour {index + 1}
+ ))} +
+ ); +} + +function Comparison({legacy}: {legacy: boolean}) { + const label = legacy ? 'legacy' : 'new'; + return ( +
+
+ + + Sticky product info + + +
+
+ ); +} + +const meta: Meta = {title: 'Review/PR3935'}; +export default meta; +type Story = StoryObj; + +export const LegacyWorkaround: Story = {render: () => }; +export const NewProps: Story = {render: () => }; + +export const Zoom200: Story = { + render: () => ( +
+ +
+ ), +}; + +export const ColumnOverride: Story = { + render: () => ( +
+ + + + +
+ ), +}; + +export const ConstrainedMatrix: Story = { + render: () => ( +
+
+

Column flex parent

+
+ Baseline full-width header + + + + +
+
+
+

RTL grid rail

+
+
+ + + + +
+
+
+
+ ), +};