Skip to content

Adding request layout POCs to scaffolding #2488

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

Draft
wants to merge 40 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1dbba08
end of day 1. sidekick not functional yet.
scotttjob Mar 27, 2025
c2f57e9
layout exploration
scotttjob Mar 28, 2025
8576c60
adding the latest layout stuff
scotttjob Apr 2, 2025
11495f6
adding the last few documentation pages that still need cleanup
scotttjob Apr 2, 2025
36bc490
adjusting some more items
scotttjob Apr 3, 2025
a9d4c43
adding center documentation
scotttjob Apr 3, 2025
63f43f0
improving some examples
scotttjob Apr 3, 2025
8f3c4f3
adding a few more changes
scotttjob Apr 3, 2025
29d325e
adding final component before revisions
scotttjob Apr 4, 2025
af7158d
final revisions look good. now to chek the pr and create the screensh…
scotttjob Apr 4, 2025
e7e6a6b
tidying up
scotttjob Apr 4, 2025
dc1211b
removing prop duplication
scotttjob Apr 4, 2025
85a6451
adjusting for when you only have an x, or only a y padding value.
scotttjob Apr 4, 2025
8836753
adding center props
scotttjob Apr 4, 2025
7c901c0
adding Container examples
scotttjob Apr 4, 2025
d2eb4ab
adding some changes
scotttjob Apr 4, 2025
4e4886c
feat(components): Layouts (V2 Adjustment Before Launch) (#2468)
scotttjob Apr 10, 2025
324a885
Merge branch 'master' into scott_t/layouts
scotttjob Apr 10, 2025
a401275
adding manual visual regression testing
scotttjob Apr 10, 2025
1be6d5b
updating the visual test a bit
scotttjob Apr 10, 2025
d07dd93
adding changes for copilot review
scotttjob Apr 10, 2025
d5c8b68
adding changes for copilot review
scotttjob Apr 10, 2025
dfec096
removed unused dependency array item
scotttjob Apr 10, 2025
b70d162
adjusting frame props
scotttjob Apr 10, 2025
ce1c526
adding updated props
scotttjob Apr 10, 2025
764b2e0
updating responsive switcher example
scotttjob Apr 10, 2025
0511b97
removing generated content instances
scotttjob Apr 10, 2025
5352fe5
removing some divs for contentblocks
scotttjob Apr 10, 2025
21c56e4
removing development related changes, and removing unneeded divs
scotttjob Apr 10, 2025
5c73c4a
removing more divs with real layout components
scotttjob Apr 10, 2025
4e41e3a
fixing some things after the last round
scotttjob Apr 10, 2025
c4cc76e
adjusting a few last things
scotttjob Apr 10, 2025
e2a6f0f
Merge branch 'master' into scott_t/layouts
scotttjob Apr 11, 2025
3197549
remvoing odd cursor derived urls
scotttjob Apr 11, 2025
11bc508
addressing feedback from jacob
scotttjob Apr 11, 2025
c4c007c
adding the ability override the auto 100% override
scotttjob Apr 11, 2025
aa8d3d3
adjusting props for site
scotttjob Apr 11, 2025
910a829
adjusting command based on feedback
scotttjob Apr 11, 2025
0daa163
feat(components): Feedback on Layout 2.0 (#2485)
scotttjob Apr 15, 2025
0923efe
Adding request layout POCs to scaffolding
taylorvnoj Apr 16, 2025
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
70 changes: 70 additions & 0 deletions docs/components/Cluster/Web.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import React from "react";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Cluster } from "@jobber/components/Cluster";
import { Button } from "@jobber/components/Button";
import { Chip } from "@jobber/components/Chip";
import { ContentBlock } from "@jobber/components/ContentBlock";

export default {
title: "Components/Layouts and Structure/Cluster/Web",
component: Cluster,
parameters: {
viewMode: "story",
previewTabs: { code: { hidden: false } },
},
} as ComponentMeta<typeof Cluster>;

const BasicTemplate: ComponentStory<typeof Cluster> = args => (
<ContentBlock maxWidth="100%">
<Cluster {...args} />
</ContentBlock>
);

export const Basic = BasicTemplate.bind({});
Basic.args = {
children: (
<>
<Button label="Save" />
<Button label="Cancel" type="secondary" />
<Button label="Delete" variation="destructive" type="secondary" />
</>
),
};

export const WithChips = BasicTemplate.bind({});
WithChips.args = {
children: (
<>
<Chip label="Active" />
<Chip label="High Priority" />
<Chip label="In Progress" />
<Chip label="Needs Review" />
</>
),
};

export const CustomSpacing = BasicTemplate.bind({});
CustomSpacing.args = {
gap: "large",
children: (
<>
<Chip label="Large" />
<Chip label="Spacing" />
<Chip label="Between" />
<Chip label="Items" />
</>
),
};

export const CustomAlignment = BasicTemplate.bind({});
CustomAlignment.args = {
justify: "center",
align: "center",
children: (
<>
<Button label="Centered" />
<Button label="Items" type="secondary" />
<Button label="In Cluster" type="secondary" />
</>
),
};
77 changes: 77 additions & 0 deletions docs/components/ContentBlock/Web.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import React from "react";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { ContentBlock } from "@jobber/components/ContentBlock";
import { Text } from "@jobber/components/Text";
import { Button } from "@jobber/components/Button";
import { Stack } from "@jobber/components/Stack";
import { Cluster } from "@jobber/components/Cluster";

export default {
title: "Components/Layouts and Structure/ContentBlock/Web",
component: ContentBlock,
parameters: {
viewMode: "story",
previewTabs: { code: { hidden: false } },
},
} as ComponentMeta<typeof ContentBlock>;

const BasicTemplate: ComponentStory<typeof ContentBlock> = args => (
<ContentBlock {...args}>
<Stack>
<Text>
This is content that demonstrates the ContentBlock component&rsquo;s
ability to constrain and justify content within a container. The content
will be justified horizontally and have a maximum width defined by the
maxWidth prop. If gutters are applied, they will be applied when there
is no more room at the edges of the container to prevent it from bumping
up against the edges.
</Text>
<Cluster
justify={
args.justify as "center" | "start" | "end" | "between" | "around"
}
>
<Button>
<Button.Label>Click me</Button.Label>
</Button>
</Cluster>
</Stack>
</ContentBlock>
);

export const Basic = BasicTemplate.bind({});
Basic.args = {
maxWidth: "50ch",
justify: "left",
};

export const WithGutters = BasicTemplate.bind({});
WithGutters.args = {
maxWidth: "50ch",
gutters: "base",
};

export const WithAndText = BasicTemplate.bind({});
WithAndText.args = {
maxWidth: "50ch",
justify: "center",
andText: true,
};

const CustomMaxWidthTemplate: ComponentStory<typeof ContentBlock> = args => (
<ContentBlock {...args}>
<Stack>
<Text>
This content demonstrates a custom maximum width constraint. The
ContentBlock component allows you to specify any valid CSS length unit
for the maxWidth prop.
</Text>
</Stack>
</ContentBlock>
);

export const CustomMaxWidth = CustomMaxWidthTemplate.bind({});
CustomMaxWidth.args = {
maxWidth: "12ch",
gutters: "large",
};
66 changes: 66 additions & 0 deletions docs/components/Cover/Web.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import React from "react";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Cover } from "@jobber/components/Cover";
import { Box } from "@jobber/components/Box";
import { Stack } from "@jobber/components/Stack";
import { Heading } from "@jobber/components/Heading";
import { Text } from "@jobber/components/Text";

export default {
title: "Components/Layouts and Structure/Cover/Web",
component: Cover,
parameters: {
viewMode: "story",
previewTabs: { code: { hidden: false } },
},
} as ComponentMeta<typeof Cover>;

const BasicTemplate: ComponentStory<typeof Cover> = args => (
<Cover {...args}>
<Cover.Center>
<Box padding="base" background="surface--background">
<Stack>
<Heading level={2}>Centered Content</Heading>
<Text>This content is vertically centered within the Cover</Text>
</Stack>
</Box>
</Cover.Center>
</Cover>
);

export const Basic = BasicTemplate.bind({});
Basic.args = {
minHeight: "30vh",
};

export const WithTopAndBottom: ComponentStory<typeof Cover> = () => (
<Cover minHeight="50vh">
<Stack>
<Text>Content at the top</Text>
</Stack>
<Cover.Center>
<Box padding="base" background="surface--background">
<Stack>
<Heading level={2}>Centered Content</Heading>
<Text>This content stays centered while content flows around it</Text>
</Stack>
</Box>
</Cover.Center>
<Stack>
<Text>Content at the bottom</Text>
</Stack>
</Cover>
);

export const TallCover: ComponentStory<typeof Cover> = () => (
<Cover minHeight="80vh">
<Cover.Center>
<Box padding="base" background="surface--background">
<Stack>
<Heading level={2}>Tall Cover</Heading>
<Text>This cover takes up most of the viewport height</Text>
</Stack>
</Box>
</Cover.Center>
</Cover>
);
48 changes: 48 additions & 0 deletions docs/components/Frame/Web.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React from "react";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Frame } from "@jobber/components/Frame";
import { Box } from "@jobber/components/Box";
import { Heading } from "@jobber/components/Heading";
import { Text } from "@jobber/components/Text";

export default {
title: "Components/Layouts and Structure/Frame/Web",
component: Frame,
parameters: {
viewMode: "story",
previewTabs: { code: { hidden: false } },
},
} as ComponentMeta<typeof Frame>;

const BasicTemplate: ComponentStory<typeof Frame> = args => (
<Frame {...args}>
<img src="https://placehold.co/600x400?text=Frame" alt="Placeholder" />
</Frame>
);

export const Basic = BasicTemplate.bind({});
Basic.args = {
aspectX: 16,
aspectY: 9,
};

export const Square = BasicTemplate.bind({});
Square.args = {
aspectX: 1,
aspectY: 1,
};

export const FourByThree = BasicTemplate.bind({});
FourByThree.args = {
aspectX: 4,
aspectY: 3,
};

export const WithContent: ComponentStory<typeof Frame> = () => (
<Frame>
<Box padding="base">
<Heading level={2}>It Works for Content As Well</Heading>
<Text>Everything is centered and cropped to fit the aspect ratio.</Text>
</Box>
</Frame>
);
Loading
Loading