Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
05d569c
feat(CC-batch-4): batch 4
mattnolting May 13, 2025
ab71228
feat(CC-batch-4): moved directory, updated for review
mattnolting May 22, 2025
670f475
feat(CC-batch-4): resolved lint errors
mattnolting May 22, 2025
39d5afc
feat(CC-batch-4): updated props and comments
mattnolting Jun 11, 2025
b4ce6e9
feat(CC-batch-4): updated dual list
mattnolting Jun 11, 2025
6a746ba
feat(CC-batch-4): drawer and divider notes
mattnolting Jun 11, 2025
a119364
feat(CC-batch-4): removed isCompact from row
mattnolting Jun 12, 2025
c739764
feat(CC-batch-4): updated dual list uris
mattnolting Jun 12, 2025
8c07acc
feat(CC-batch-4): removed unneccesary props
mattnolting Jun 12, 2025
9ab4dd9
feat(CC-batch-4): updated panel content as prop
mattnolting Jun 13, 2025
d07c01d
feat(CC-batch-4): removed dualListSelectorMain
mattnolting Jun 13, 2025
68a66a0
feat(CC-batch-4): updated required props
mattnolting Jun 17, 2025
ab0614f
feat(CC-batch-4): verification complete
mattnolting Jun 24, 2025
1fea9ca
feat(CC-batch-4): removed unnecessary description list files
mattnolting Jun 26, 2025
9d7da98
feat(CC-batch-4): review-athon round 1 followup
mattnolting Jun 30, 2025
34b7d14
feat(CC-batch-4): review-athon round 1 followup
mattnolting Jun 30, 2025
d6b82a7
feat(CC-batch-4): review-athon round 2 followup
mattnolting Jul 15, 2025
ae5bee3
feat(CC-batch-4): review-athon round 2 followup
mattnolting Jul 15, 2025
ff84a09
feat(CC-batch-4): remove data list, misconfigured
mattnolting Jul 15, 2025
44f7fb3
feat(CC-batch-4): review-athon round 2 followup
mattnolting Jul 15, 2025
69baddd
feat(CC-batch-4): review-athon round 2 followup
mattnolting Jul 15, 2025
5290dc2
feat(CC-batch-4): review-athon round 2 followup
mattnolting Jul 15, 2025
d8ad549
feat(CC-batch-4): review-athon round 3 followup
mattnolting Jul 17, 2025
72519c9
feat(CC-batch-4): review-athon round 3 followup
mattnolting Jul 18, 2025
bf461f6
feat(CC-batch-4): preparing rebase
mattnolting Jul 28, 2025
582cb3a
feat(CC-batch-4): group review 4 followup
mattnolting Jul 31, 2025
fe176ef
feat(CC-batch-4): group review 5 updates
mattnolting Aug 13, 2025
fbd1d32
feat(CC-batch-4): group review 5 updates
mattnolting Aug 26, 2025
9b04888
feat(CC-batch-4): group review 6 updates
mattnolting Aug 26, 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
23 changes: 23 additions & 0 deletions packages/code-connect/components/DataList/DataList.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import figma from '@figma/code-connect';
import { DataList } from '@patternfly/react-core';

// TODO: DESIGN: Separate examples, rename files to match their react counterparts.
// Documentation for DataList can be found at https://www.patternfly.org/components/data-list

figma.connect(
DataList,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6649-80542',
{
props: {
// enum
isCompact: figma.enum('Size', { Compact: true }),

children: figma.children('*')
},
example: (props) => (
<DataList aria-label="DataList example" isCompact={props.isCompact}>
{props.children}
</DataList>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import figma from '@figma/code-connect';
import { DataListItem, DataListItemRow } from '@patternfly/react-core';

figma.connect(
DataListItemRow,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6649-69488&m=dev',
{
props: {
children: figma.children('*')
},
example: (props) => (
// aria-labelledby should point to an ID within the DataListItemRow/DataListItemCell
<DataListItem aria-labelledby="child-text-id">
<DataListItemRow rowid="<row-id>">{props.children}</DataListItemRow>
</DataListItem>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import figma from '@figma/code-connect';
import { DataListItem, DataListItemRow } from '@patternfly/react-core';

// Documentation for DataListItemRow can be found at https://www.patternfly.org/components/data-list

figma.connect(
DataListItemRow,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6649-96947',
{
props: {
children: figma.children('*')
},
example: (props) => (
// aria-labelledby should point to an ID within the DataListItemRow/DataListItemCell
<DataListItem aria-labelledby="child-text-id">
<DataListItemRow rowid="<row-id>">{props.children}</DataListItemRow>
</DataListItem>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import figma from '@figma/code-connect';
import { DataList } from '@patternfly/react-core';

// Documentation for DataListItemRow can be found at https://www.patternfly.org/components/data-list
// This variant has been refactored to use the DragDropSort component.
// In order to use this variant, you must wrap the DataList component in a DragDropSort component.

figma.connect(
DataList,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=19618-55289',
{
example: () =>
'Draggable DataList variant has been refactored to use the DragDropSort component. The design is the same, but the implementation is different. This component variant requires refactoring to work within the new context. For more information, see the example at https://www.patternfly.org/components/data-list/#draggable.'
// Code example:
// <DragDropSort
// items={items}
// onDrop={(_, newItems) => {
// setItems(newItems);
// }}
// variant="DataList"
// overlayProps={{ isCompact: true }}
// >
// <DataList aria-label="draggable data list example" isCompact {...props} />
// </DragDropSort>
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import figma from '@figma/code-connect';
import { DataListAction } from '@patternfly/react-core';

// Documentation for DataListItemRow can be found at https://www.patternfly.org/components/data-list

figma.connect(
DataListAction,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6596-33965',
{
example: () => (
<DataListAction aria-labelledby="item1 action1" id="action1" aria-label="Actions">
'Action'
</DataListAction>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import figma from '@figma/code-connect';
import { Icon, DataListCell, DataListItem, DataListItemCells, DataListItemRow } from '@patternfly/react-core';

// TODO: DESIGN: Either name layers uniquely or create a dataListCell component to house
// Documentation for DataList can be found at https://www.patternfly.org/components/data-list

figma.connect(
DataListCell,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6596-33934',
{
props: {
showDescriptionText: figma.boolean('Show description text'),

// enum
isIcon: figma.enum('Type', {
'Filled - Plain text': true
}),
isFilled: figma.enum('Type', {
'Filled - Plain text': true,
'Filled - Link text': true
}),

primaryContent: 'Main content',
secondaryContent: 'Second content block'
},
example: (props) => (
<DataListItem aria-labelledby="item1">
<DataListItemRow>
<DataListItemCells
dataListCells={[
<DataListCell isIcon={true} key="icon-content">
<Icon name="info" />
</DataListCell>,
<DataListCell key="primary-content">
<span id="item1">{props.primaryContent}</span>
</DataListCell>,
<DataListCell key="secondary-content">{props.secondaryContent}</DataListCell>
]}
/>
</DataListItemRow>
</DataListItem>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import figma from '@figma/code-connect';
import {
// DataListAction,
DataListCheck,
DataListControl,
DataListToggle
} from '@patternfly/react-core';

// TODO: 2. Base Components/Control cell - These cells need unique names. Either create components for DataListCell,
// DataListToggle, DataListDragButton, DataListAction, DataListCheck
// These component specifics are unreachable unless separated into their own entities
// Documentation for DataListControl can be found at https://www.patternfly.org/components/data-list

// const selectableCell = {
// <DataListCheck id="ex1-item1" aria-labelledby="ex1-item1" name="ex1-item1" />
// return (
// <>
// {props.isSelectable}
// {props.isExpandable}
// {props.isDraggable}
// <DataListAction aria-labelledby="item1 action1" id="action1" aria-label="Actions">
// {props.children}
// </DataListAction>
// </>
// );
// };

figma.connect(
DataListControl,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=6596-34013',
{
props: {
isExpandable: figma.boolean('Row expansion', {
true: <DataListToggle onClick={() => {}} isExpanded={false} id="toggle1" aria-controls="expand1" />,
false: undefined
}),
isSelectable: figma.boolean('Row select', {
true: <DataListCheck id="check-item1" aria-labelledby="item1" name="item1" />,
false: undefined
})
},
example: (props) => (
<>
{props.isSelectable}
{props.isExpandable}
</>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { DescriptionList } from '@patternfly/react-core';
import figma from '@figma/code-connect';

// Documentation for DescriptionList can be found at https://www.patternfly.org/components/description-list

figma.connect(
DescriptionList,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1121-3946',
{
props: {
// enum
isCompact: figma.enum('Spacing', { Compact: true }),
isFluid: figma.enum('Orientation', { 'Horizontal - Fluid': true }),
isHorizontal: figma.enum('Orientation', {
'Horizontal - Fixed': true,
'Horizontal - Fluid': true
}),

children: figma.children('Description list item')
},
example: (props) => (
<DescriptionList isFluid={props.isFluid} isCompact={props.isCompact} isHorizontal={props.isHorizontal}>
{props.children}
</DescriptionList>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import figma from '@figma/code-connect';
import { Card, DescriptionList, DescriptionListTerm, DescriptionListDescription } from '@patternfly/react-core';

// Note: DescriptionList displaySize prop is set by displaySize.
// Note: DescriptionList label and description are not dynamic. DescriptionList list label composition doesn't currently align with the React component.
// Note: DescriptionListLabel requires updates to the React component to support dynamic composition.
// TODO: DESIGN: Separate card and description list size properties.
// Documentation for DescriptionList can be found at https://www.patternfly.org/components/description-list-in-card

figma.connect(
DescriptionList,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=4421-28234&m=dev',
{
props: {
displaySize: figma.enum('Card size', {
Small: 'default',
Default: 'lg',
Large: '2xl'
}),
isHorizontal: figma.enum('Orientation', { Horizontal: true })
},
example: (props) => (
<DescriptionList isHorizontal={props.isHorizontal} displaySize={props.displaySize}>
<Card component="div">
<DescriptionListTerm>Input label</DescriptionListTerm>
<DescriptionListDescription>Description list item</DescriptionListDescription>
</Card>
</DescriptionList>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import figma from '@figma/code-connect';
import { DescriptionListGroup, DescriptionListDescription } from '@patternfly/react-core';

// Documentation for DescriptionListGroup can be found at https://www.patternfly.org/components/description-list

figma.connect(
DescriptionListGroup,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=1121-3571',
{
props: {
term: figma.children('Term label'),
description: figma.string('✏️ Content')
},

example: (props) => (
<DescriptionListGroup>
{props.term}
<DescriptionListDescription>{props.description}</DescriptionListDescription>
</DescriptionListGroup>
)
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import {
DescriptionListTerm,
DescriptionListTermHelpText,
DescriptionListTermHelpTextButton,
Popover
} from '@patternfly/react-core';
import figma from '@figma/code-connect';
import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';

// TODO: DESIGN: Convert inline edit and help text to variants rather than booleans.
// Note: We don't currently have support for inline edit + help text + icon, therefore current Figma config is not supported.
// Documentation for DescriptionListTerm can be found at https://www.patternfly.org/components/description-list

figma.connect(
DescriptionListTerm,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=36279-2532',
{
variant: { 'Inline edit toggle': true, 'Has help text': false },
props: {
label: figma.string('✏️ Label')
},
example: (props) => (
<DescriptionListTerm>
<form className="pf-v6-c-inline-edit" id="single-inline-edit-with-label-example">
<div className="pf-v6-c-inline-edit__group">
<label
className="pf-v6-c-inline-edit__label"
id="single-inline-edit-with-label-example-label"
htmlFor="single-inline-edit-with-label-example-input"
>
{props.label}
</label>
<div className="pf-v6-c-inline-edit__action pf-m-enable-editable">
<button
className="pf-v6-c-button pf-m-plain"
type="button"
id="single-inline-edit-with-label-example-edit-button"
aria-label="Edit"
aria-labelledby="single-inline-edit-with-label-example-label single-inline-edit-with-label-example-edit-button"
>
<span className="pf-v6-c-button__icon">
<i className="fas fa-pencil-alt" aria-hidden="true"></i>
</span>
</button>
</div>
</div>
</form>
</DescriptionListTerm>
)
}
);

figma.connect(
DescriptionListTerm,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=36279-2532',
{
variant: { 'Has help text': true, 'Inline edit toggle': false },
props: {
// string
label: figma.string('✏️ Label'),

// enum
icon: figma.enum('Icon ⎆', {
true: <CodeBranchIcon />,
false: undefined
})
},
example: (props) => (
<DescriptionListTermHelpText>
<Popover headerContent={<div>{props.label}</div>} bodyContent={<div>This is the help text</div>}>
<DescriptionListTermHelpTextButton>
{props.icon}
{props.label}
</DescriptionListTermHelpTextButton>
</Popover>
</DescriptionListTermHelpText>
)
}
);

figma.connect(
DescriptionListTerm,
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=36279-2532',
{
props: {
// string
label: figma.string('✏️ Label'),

// enum
icon: figma.enum('Icon ⎆', {
true: <CodeBranchIcon />,
false: undefined
})
},
example: (props) => <DescriptionListTerm icon={props.icon}>{props.label}</DescriptionListTerm>
}
);
Loading
Loading