Skip to content

Commit e106426

Browse files
committed
feat(CC-batch-3): review-athon round 1 followup
1 parent 91bcef0 commit e106426

5 files changed

Lines changed: 41 additions & 20 deletions

File tree

packages/code-connect/components/Banner/NonStatusBanner.figma.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ figma.connect(
1616
Red: 'red',
1717
Orangered: 'orangered',
1818
Orange: 'orange',
19+
Yellow: 'yellow',
1920
Green: 'green',
21+
Teal: 'teal',
2022
Blue: 'blue',
21-
Purple: 'purple',
22-
Yellow: 'yellow',
23-
Teal: 'teal'
23+
Purple: 'purple'
2424
})
2525
},
2626
example: (props) => <Banner color={props.color}>{props.text}</Banner>

packages/code-connect/components/Breadcrumbs/BreadcrumbItem.figma.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ figma.connect(
1212
text: figma.string('Text'),
1313

1414
// enum
15+
isActive: figma.enum('State', {
16+
'No link': true
17+
}),
1518
to: figma.enum('State', {
1619
Link: '#',
17-
Hover: '#',
18-
'No link': undefined
20+
Hover: '#'
1921
})
2022
},
21-
example: (props) => <BreadcrumbItem to={props.to}>{props.text}</BreadcrumbItem>
23+
example: (props) => (
24+
<BreadcrumbItem to={props.to} isActive={props.isActive}>
25+
{props.text}
26+
</BreadcrumbItem>
27+
)
2228
}
2329
);

packages/code-connect/components/Breadcrumbs/ExpandableBreadcrumbs.figma.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ figma.connect(
1010
props: {
1111
children: figma.children('*')
1212
},
13-
example: (props) => <BreadcrumbItem>{props.children}</BreadcrumbItem>
13+
// TODO: MATT: Add dropdown for isDropdown
14+
example: (props) => <BreadcrumbItem isDropdown>{props.children}</BreadcrumbItem>
1415
}
1516
);

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

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
import figma from '@figma/code-connect';
2-
import { CodeBlock, CodeBlockCode, ExpandableSectionToggle } from '@patternfly/react-core';
2+
import { CodeBlock, CodeBlockCode, ExpandableSection, ExpandableSectionToggle } from '@patternfly/react-core';
33

44
figma.connect(
55
CodeBlock,
66
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9802-5857',
77
{
88
props: {
9-
// TODO: FIGMA: Configure Editor Text as a base component for CodeBlock
9+
// TODO: DESIGN: Configure Editor Text as a base component for CodeBlock
1010
// Currently using placeholder string, but should be a multi-select property with options like "Copy", "Download", "Edit", "Share", "Delete"
1111
editorText: 'code block code',
1212

13-
// TODO: FIGMA: Configure Actions layer to contain CodeBlockAction components
13+
// TODO: DESIGN: Configure Actions layer to contain CodeBlockAction components
1414
// Currently using placeholder string, but should be a multi-select property with options like "Copy", "Download", "Edit", "Share", "Delete"
1515
actions: `action1, action2, action3, action4, action5`,
1616

17-
// TODO: FIGMA: ExpandableSectionToggle needs proper configuration
17+
// TODO: DESIGN: ExpandableSectionToggle needs proper configuration
1818
// Current implementation has undefined variables and function calls
19-
expandableSection: figma.boolean('Expandable', {
19+
expandableSectionContent: figma.boolean('Expandable', {
20+
true: (
21+
<ExpandableSection isExpanded={true} isDetached contentId="code-block-expand">
22+
Expandable content
23+
</ExpandableSection>
24+
),
25+
false: undefined
26+
}),
27+
expandableSectionToggle: figma.boolean('Expandable', {
2028
true: (
2129
<ExpandableSectionToggle onToggle={() => {}} contentId="code-block-id">
2230
Show More
@@ -27,8 +35,11 @@ figma.connect(
2735
},
2836
example: (props) => (
2937
<CodeBlock actions={props.actions}>
30-
<CodeBlockCode>{props.editorText}</CodeBlockCode>
31-
{props.expandableSection}
38+
<CodeBlockCode>
39+
{props.editorText}
40+
{props.expandableSectionToggle}
41+
</CodeBlockCode>
42+
{props.expandableSectionContent}
3243
</CodeBlock>
3344
)
3445
}
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import figma from '@figma/code-connect';
22
import { CodeEditor } from '@patternfly/react-code-editor';
33

4+
// TODO: DESIGN: Add support for actions, wrap each action in the appropriate compnent
5+
// TODO: DESIGN: When shortcuts is removed, presentation breaks
46
// Documentation for CodeEditor can be found at https://www.patternfly.org/components/code-editor
57

68
figma.connect(
79
CodeEditor,
810
'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=16994-184502',
911
{
1012
props: {
11-
// TODO: FIGMA: configure options for actions
13+
// TODO: DESIGN: configure options for actions
1214
actions: 'action1, action2, action3, action4, action5',
1315

1416
// boolean
@@ -18,17 +20,18 @@ figma.connect(
1820
isMinimapVisible: figma.enum('Type', { 'Mini Map': true }),
1921

2022
children: figma.children('*')
23+
24+
// Add viewshortcuts
25+
// ifshortcuts is true
2126
},
2227
example: (props) => (
2328
<CodeEditor
24-
actions={props.actions}
2529
isLineNumbersVisible={props.showsLineNumbers}
2630
isMinimapVisible={props.isMinimapVisible}
31+
/* if no content is passed to code and isUploadEnabled is true, the editor will be display EmptyState */
2732
code="code editor contents"
28-
height="500px"
29-
>
30-
{props.children}
31-
</CodeEditor>
33+
height="400px"
34+
/>
3235
)
3336
}
3437
);

0 commit comments

Comments
 (0)