Skip to content

Commit 540457e

Browse files
committed
feat(CC-batch-7): group review 6 followup
1 parent 5ccb350 commit 540457e

11 files changed

+67
-84
lines changed

packages/code-connect/components/NotificationDrawer/NotificationDrawer.figma.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ figma.connect(
66
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=7172-99015',
77
{
88
props: {
9+
// children
910
notificationDrawerHeader: figma.children('Notification drawer header'),
1011
notificationDrawerGroup: figma.children('Notification drawer group'),
1112
notificationDrawerNotifications: figma.children(['Notifications', 'Notification drawer item'])

packages/code-connect/components/NotificationDrawer/NotificationDrawerGroups.figma.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,25 @@ figma.connect(
88
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=3172-18190&m=dev',
99
{
1010
props: {
11+
// boolean
12+
hasCount: figma.boolean('Has count', {
13+
true: figma.children('Badge'),
14+
false: undefined
15+
}),
1116
showUnreadCount: figma.boolean('Has count', {
1217
true: 3,
1318
false: NaN
1419
}),
20+
21+
// enum
1522
headingText: figma.string('Group title'),
23+
24+
// string
1625
isExpanded: figma.enum('Type', {
1726
Collapsed: false,
1827
Expanded: true
1928
}),
20-
hasCount: figma.boolean('Has count', {
21-
true: figma.children('Badge'),
22-
false: undefined
23-
}),
29+
2430
children: figma.children('*')
2531
},
2632
example: (props) => (

packages/code-connect/components/NotificationDrawer/NotificationDrawerHeader.figma.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import figma from '@figma/code-connect';
22
import { Dropdown, DropdownItem, DropdownList, MenuToggle, NotificationDrawerHeader } from '@patternfly/react-core';
3-
import EllipsisVIcon from '@patternfly/react-icons/icons/ellipsis-v-icon/dist/esm/icons/ellipsis-v-icon';
3+
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons//ellipsis-v-icon';
44

55
figma.connect(
66
NotificationDrawerHeader,
77
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=3170-17841&m=dev',
88
{
99
props: {
10-
// string
11-
headingText: figma.string('Heading text'),
12-
1310
// boolean
1411
hasActionsMenu: figma.boolean('Has actions menu', {
1512
true: {
@@ -47,14 +44,16 @@ figma.connect(
4744
showUnreadCount: figma.boolean('Show unread count', {
4845
true: 3,
4946
false: NaN
50-
})
47+
}),
48+
49+
// string
50+
headingText: figma.string('Heading text')
5151
},
5252
example: (props) => (
5353
<NotificationDrawerHeader
5454
count={props.showUnreadCount}
5555
onClose={props.hasActionsMenu.onClose}
5656
title={props.headingText}
57-
srTitle="Notification drawer header"
5857
>
5958
{props.hasActionsMenu.dropdown}
6059
</NotificationDrawerHeader>

packages/code-connect/components/NotificationDrawer/NotificationDrawerItem.figma.tsx

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,28 @@ figma.connect(
3030
Danger: 'danger'
3131
}),
3232

33-
// boolean
34-
listItemDropdown: {
35-
dropdown: (
33+
// TODO: DESIGN: Make alert description retrievable via unique layer name or adding a prop to Noficiation Drawer Item
34+
alertDescription: 'Description',
35+
36+
// TODO: DESIGN: Make alert title retrievable via unique layer name or adding a prop to Noficiation Drawer Item
37+
alertTitle: 'Notification title'
38+
},
39+
example: (props) => (
40+
<NotificationDrawerListItem
41+
isHoverable={props.isHoverable}
42+
isRead={props.isRead}
43+
onClose={() => {}}
44+
variant={props.variant}
45+
>
46+
<NotificationDrawerListItemHeader title={props.alertTitle} variant={props.variant}>
3647
<Dropdown
3748
onSelect={() => {}}
3849
isOpen={false}
3950
onOpenChange={() => {}}
4051
popperProps={{ position: 'right' }}
41-
toggle={() => (
52+
toggle={(toggleRef) => (
4253
<MenuToggle
43-
ref={() => {}}
54+
ref={toggleRef}
4455
isExpanded={false}
4556
onClick={() => {}}
4657
variant="plain"
@@ -55,29 +66,6 @@ figma.connect(
5566
<DropdownItem>Item 3</DropdownItem>
5667
</DropdownList>
5768
</Dropdown>
58-
),
59-
onClose: () => {}
60-
},
61-
62-
// TODO: DESIGN: Make alert description retrievable via unique layer name or adding a prop to Noficiation Drawer Item
63-
alertDescription: 'Description',
64-
65-
// TODO: DESIGN: Make alert title retrievable via unique layer name or adding a prop to Noficiation Drawer Item
66-
alertTitle: 'Notification title'
67-
},
68-
example: (props) => (
69-
<NotificationDrawerListItem
70-
isHoverable={props.isHoverable}
71-
isRead={props.isRead}
72-
onClose={() => {}}
73-
variant={props.variant}
74-
>
75-
<NotificationDrawerListItemHeader
76-
srTitle="Notification drawer item"
77-
title={props.alertTitle}
78-
variant={props.variant}
79-
>
80-
{props.listItemDropdown.dropdown}
8169
</NotificationDrawerListItemHeader>
8270
<NotificationDrawerListItemBody timestamp={props.timestamp}>
8371
{props.alertDescription}

packages/code-connect/components/PopOver/Popover.figma.tsx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ figma.connect(
1414
Popover,
1515
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=5857-2066',
1616
{
17+
// enum
1718
props: {
18-
// hasFooter: figma.boolean('Has footer', {}),
19-
bodyContent: figma.string('Popover description'),
20-
headerContent: figma.string('Popover Heading'),
19+
// boolean
2120
footerContent: figma.boolean('Has footer', {
2221
true: 'Popover footer',
2322
false: undefined
@@ -26,6 +25,20 @@ figma.connect(
2625
true: <BullhornIcon />,
2726
false: undefined
2827
}),
28+
29+
// string
30+
bodyContent: figma.string('Popover description'),
31+
headerContent: figma.string('Popover Heading'),
32+
33+
// enum
34+
position: figma.enum('Position', {
35+
'Top-left': 'top-start',
36+
'Top-middle': 'top',
37+
'Top-right': 'top-end',
38+
'Bottom-left': 'bottom-start',
39+
'Bottom-middle': 'bottom',
40+
'Bottom-right': 'bottom-end'
41+
}),
2942
status: figma.enum('Status', {
3043
Default: {
3144
state: undefined,
@@ -48,14 +61,6 @@ figma.connect(
4861
icon: <ExclamationCircleIcon />
4962
}
5063
}),
51-
position: figma.enum('Position', {
52-
'Top-left': 'top-start',
53-
'Top-middle': 'top',
54-
'Top-right': 'top-end',
55-
'Bottom-left': 'bottom-start',
56-
'Bottom-middle': 'bottom',
57-
'Bottom-right': 'bottom-end'
58-
}),
5964

6065
children: figma.children('*')
6166
},

packages/code-connect/components/SimpleList/ListHeading.figma.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

packages/code-connect/components/SimpleList/SimpleList.figma.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ figma.connect(
88
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=4410-20691',
99
{
1010
props: {
11-
children: figma.children(['Simple list group', 'Simple list item'])
11+
children: figma.children('*')
1212
},
1313
example: (props) => <SimpleList aria-label="Simple list example">{props.children}</SimpleList>
1414
}

packages/code-connect/components/SimpleList/SimpleListGroup.figma.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ figma.connect(
88
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=4410-20708',
99
{
1010
props: {
11-
children: figma.children('*')
11+
simpleListItems: figma.children('Simple list item')
1212
},
13-
example: (props) => <SimpleListGroup>{props.children}</SimpleListGroup>
13+
example: (props) => (
14+
<SimpleListGroup title="List group" id="<simple-list-group-id>">
15+
{props.simpleListItems}
16+
</SimpleListGroup>
17+
)
1418
}
1519
);

packages/code-connect/components/SimpleList/SimpleListItem.figma.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ figma.connect(
3232
component={props.isLink.component}
3333
href={props.isLink.href}
3434
isActive={props.isActive}
35-
key="simple-list-key"
35+
key="simple-list-item-key"
3636
>
3737
{props.text}
3838
</SimpleListItem>

packages/code-connect/components/Skeleton/Skeleton.figma.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ figma.connect(
88
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=790-288',
99
{
1010
props: {
11+
// enum
12+
type: figma.enum('Type', {
13+
Square: 'square',
14+
Circle: 'circle'
15+
}),
1116
size: figma.enum('Size', {
1217
S: 'sm',
1318
M: 'md',
@@ -16,12 +21,8 @@ figma.connect(
1621
'2XL': '2xl',
1722
'3XL': '3xl',
1823
'4XL': '4xl'
19-
}),
20-
type: figma.enum('Type', {
21-
Rectangle: 'square',
22-
Circle: 'circle'
2324
})
2425
},
25-
example: (props) => <Skeleton fontSize={props.size} shape={props.type} screenreaderText="Loading default content" />
26+
example: (props) => <Skeleton fontSize={props.size} type={props.type} screenreaderText="Loading default content" />
2627
}
2728
);

0 commit comments

Comments
 (0)