Skip to content

Commit

Permalink
deps: braid-design-system 32.24.0 (#1172)
Browse files Browse the repository at this point in the history
* deps: braid-design-system 32.24.0

* wip

* Clean up

* Fix up one

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zac Brydon <[email protected]>
Co-authored-by: Aaron Moat <[email protected]>
  • Loading branch information
3 people authored Sep 23, 2024
1 parent 2923d6a commit b06ac3d
Show file tree
Hide file tree
Showing 31 changed files with 320 additions and 202 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-eagles-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'wingman-fe': patch
---

Remove deprecated `dividers` in Braid components
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.prettierrc
coverage/
dist/
pnpm-lock.yaml
report/
tsconfig.json
# end managed by sku
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
.prettierrc
coverage/
dist/
pnpm-lock.yaml
report/
tsconfig.json
# end managed by sku

pnpm-lock.yaml
9 changes: 5 additions & 4 deletions fe/example/src/App/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
Box,
Divider,
Heading,
IconEducation,
IconHome,
Expand Down Expand Up @@ -65,18 +66,18 @@ const SidebarLink = ({ children, size, to }: SidebarLinkProps) => {

export const Sidebar = () => (
<Box className={styles.sidebar}>
<Stack dividers space="none">
<Stack space="none">
<Box padding="gutter">
<Heading level="3">🛩</Heading>
</Box>

<Stack dividers space="none">
<Divider />
<Stack space="none">
<Box paddingY="gutter">
<SidebarLink to="/">
<IconHome /> Home
</SidebarLink>
</Box>

<Divider />
{/* TODO: rebuild from shared components. */}
{/* <Box paddingY="gutter">
<SidebarLink to="/positions">
Expand Down
15 changes: 9 additions & 6 deletions fe/example/src/components/RichDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, IconChevron, Stack } from 'braid-design-system';
import { Box, Divider, IconChevron, Stack } from 'braid-design-system';
import React, { type ReactNode, useState } from 'react';

import * as styles from './RichDropdown.css';
Expand Down Expand Up @@ -55,11 +55,14 @@ export const RichDropdown = <T extends BaseT>({
};

return expanded ? (
<Stack dividers space="none">
{values.map((value) => (
<Item key={value.id} onClick={() => select(value)} value={value}>
{children}
</Item>
<Stack space="none">
{values.map((value, index) => (
<React.Fragment key={value.id}>
{index > 0 ? <Divider /> : null}
<Item onClick={() => select(value)} value={value}>
{children}
</Item>
</React.Fragment>
))}
</Stack>
) : (
Expand Down
12 changes: 9 additions & 3 deletions fe/example/src/pages/Admin/Admin.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { Box, ContentBlock, Heading, Stack } from 'braid-design-system';
import {
Box,
ContentBlock,
Divider,
Heading,
Stack,
} from 'braid-design-system';
import React from 'react';

import { ClientOnly } from '../../components/ClientOnly';
Expand All @@ -10,11 +16,11 @@ import { Version } from './Version';
import { Webhook } from './Webhook';

export const AdminPage = () => (
<Stack dividers space="none">
<Stack space="none">
<Header>
<Heading level="3">Admin</Heading>
</Header>

<Divider />
<ClientOnly>
<ContentBlock width="large">
<Box padding="gutter">
Expand Down
6 changes: 3 additions & 3 deletions fe/example/src/pages/Admin/Attachments.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Card, Heading, List, Stack, Text } from 'braid-design-system';
import { Card, Divider, Heading, List, Stack, Text } from 'braid-design-system';
import React from 'react';

import { useBrowserToken } from '../../../../lib/hooks';
Expand All @@ -16,9 +16,9 @@ export const Attachments = () => {

return (
<Card>
<Stack dividers space="large">
<Stack space="large">
<Heading level="3">Attachments</Heading>

<Divider />
<List>
<Text>
<DownloadLink
Expand Down
13 changes: 10 additions & 3 deletions fe/example/src/pages/Admin/User.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { Card, Checkbox, Heading, Stack, TextField } from 'braid-design-system';
import {
Card,
Checkbox,
Divider,
Heading,
Stack,
TextField,
} from 'braid-design-system';
import React, { useState } from 'react';

import { useClient } from '../../hooks/user';
Expand All @@ -10,9 +17,9 @@ export const User = () => {

return (
<Card>
<Stack dividers space="large">
<Stack space="large">
<Heading level="3">User</Heading>

<Divider />
<Stack space="large">
<Checkbox
checked={editMode}
Expand Down
13 changes: 10 additions & 3 deletions fe/example/src/pages/Admin/Version.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { Card, Heading, Loader, Stack, Text } from 'braid-design-system';
import {
Card,
Divider,
Heading,
Loader,
Stack,
Text,
} from 'braid-design-system';
import React, { useEffect, useState } from 'react';

import { querySeekGraph } from '../../api/seekGraph';
Expand All @@ -22,9 +29,9 @@ export const Version = () => {

return (
<Card>
<Stack dividers space="large">
<Stack space="large">
<Heading level="3">Version</Heading>

<Divider />
<Text>{typeof version === 'undefined' ? <Loader /> : version}</Text>
</Stack>
</Card>
Expand Down
5 changes: 3 additions & 2 deletions fe/example/src/pages/Admin/Webhook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
Actions,
Button,
Card,
Divider,
Heading,
Stack,
useToast,
Expand Down Expand Up @@ -57,9 +58,9 @@ export const Webhook = () => {

return (
<Card>
<Stack dividers space="large">
<Stack space="large">
<Heading level="3">Webhook</Heading>

<Divider />
<Stack space="medium">
<Actions>
<Button loading={loading} onClick={onClick}>
Expand Down
13 changes: 7 additions & 6 deletions fe/example/src/pages/Ads/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Card,
Column,
Columns,
Divider,
Heading,
IconAdd,
IconEdit,
Expand Down Expand Up @@ -58,14 +59,14 @@ export const AdList = ({ ads }: Props) => {
onClick={() => setSelectedAdId(ad.id)}
>
{editAds[index] ? (
<Stack dividers space="none">
<Stack space="none">
<Card>
<Heading level="4">Edit ad</Heading>
</Card>

<Divider />
{/* TODO: avoid sharing the same local storage state */}
<NewAdForm initial={ad} />

<Divider />
<Card>
{/* TODO: actually do something */}
<Actions>
Expand Down Expand Up @@ -144,14 +145,14 @@ export const AdList = ({ ads }: Props) => {
))}

{newAd ? (
<Stack dividers space="none">
<Stack space="none">
<Card>
<Heading level="4">New ad</Heading>
</Card>

<Divider />
{/* TODO: avoid sharing the same local storage state */}
<NewAdForm />

<Divider />
<Card>
{/* TODO: actually do something */}
<Actions>
Expand Down
7 changes: 4 additions & 3 deletions fe/example/src/pages/Candidates/Detail.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
Box,
ContentBlock,
Divider,
Heading,
IconDocument,
IconNote,
Expand Down Expand Up @@ -158,7 +159,7 @@ const CandidateDetails = () => {
];

return (
<Stack dividers space="none">
<Stack space="none">
<Header>
<Heading level="3">
<Breadcrumbs>
Expand All @@ -172,7 +173,7 @@ const CandidateDetails = () => {
</Breadcrumbs>
</Heading>
</Header>

<Divider />
<Box background="surface" padding="gutter">
<Stack space="gutter">
{preferences.devTools ? (
Expand All @@ -185,7 +186,7 @@ const CandidateDetails = () => {
</Text>
</Stack>
</Box>

<Divider />
<TabsProvider id="candidate">
<Box background="surface">
<Tabs gutter="gutter" label="Candidate" reserveHitArea>
Expand Down
5 changes: 3 additions & 2 deletions fe/example/src/pages/Candidates/Detail/Attachment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
Box,
Button,
Card,
Divider,
Heading,
IconDownload,
IconImage,
Expand All @@ -23,7 +24,7 @@ export const CandidateAttachment = ({ children: attachment }: Props) => {

return (
<Card key={attachment.id}>
<Stack dividers space="gutter">
<Stack space="gutter">
<Box alignItems="center" display="flex" justifyContent="spaceBetween">
<Heading level="4">{attachment.filename}</Heading>
<Actions>
Expand All @@ -32,7 +33,7 @@ export const CandidateAttachment = ({ children: attachment }: Props) => {
</Button>
</Actions>
</Box>

<Divider />
<Box
alignItems="center"
background="neutralLight"
Expand Down
24 changes: 14 additions & 10 deletions fe/example/src/pages/Candidates/Detail/Notes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
Actions,
Button,
Card,
Divider,
IconAdd,
Inline,
Stack,
Expand Down Expand Up @@ -41,17 +42,20 @@ export const CandidateNotes = ({ children: candidate }: Props) => {

{candidate.notes.length ? (
<Card>
<Stack dividers space="large">
<Stack space="large">
{candidate.notes.map((note, index) => (
<Stack key={index} space="gutter">
<Inline space="small">
<Text>
<Strong>{note.author.formattedName}</Strong> ·{' '}
<RelativeDate date={note.date} />
</Text>
</Inline>
<Text>{note.text}</Text>
</Stack>
<React.Fragment key={index}>
{index > 0 ? <Divider /> : null}
<Stack space="gutter">
<Inline space="small">
<Text>
<Strong>{note.author.formattedName}</Strong> ·{' '}
<RelativeDate date={note.date} />
</Text>
</Inline>
<Text>{note.text}</Text>
</Stack>
</React.Fragment>
))}
</Stack>
</Card>
Expand Down
Loading

0 comments on commit b06ac3d

Please sign in to comment.