Skip to content

feat(CC-batch-3): added batch 3 #11829

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mattnolting
Copy link
Contributor

@mattnolting mattnolting commented May 13, 2025

Relates to: #11624

Included components:

  • Banner
  • Brand
  • Breadcrumbs
  • Code Block
  • Code Editor

Component tracker

Figma preview

Resources:

@patternfly-build
Copy link
Contributor

patternfly-build commented May 13, 2025

@mattnolting mattnolting marked this pull request as ready for review May 22, 2025 15:19
@evwilkin
Copy link
Member

@mattnolting FYI it looks like the old files within react-core/ weren't removed from this PR when they were moved up a directory

@mattnolting
Copy link
Contributor Author

@mattnolting FYI it looks like the old files within react-core/ weren't removed from this PR when they were moved up a directory

@evwilkin Great catch, updated

Copy link
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these PRs would be improved I think with a direct link to the PF docs in a comment.

text: figma.string('✏️ Center text'),

// enum
color: figma.enum('Color', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid colors are:
'red' | 'orangered' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'purple'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gold=yellow and cyan=teal in React, if Figma is still using gold/cyan in their color options. There is no gray.

Custom: 'custom'
})
},
example: (props) => <Banner status={props.status}>{props.text}</Banner>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The screenReaderText prop should also be passed in to convey the status/severity of the banner to users of certain assistive technologies such as screen readers.

props: {
children: figma.children('*')
},
example: (props) => <Breadcrumb>{props.children}</Breadcrumb>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to make it an interact-able link, it needs a to prop

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be for BreadcrumbItem

Clicked: true
})
},
example: (props) => <BreadcrumbItem isActive={props.state} isDropdown />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in addition to isDropdown, this should also accept children, so someone could place a Dropdown in the BreadcrumbItem as a child.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isActive is unrelated to dropdown and can be removed. I'm unsure what clicked state figma is trying to capture here. Opening the dropdown?

isExpandable: figma.boolean('Expandable'),
children: figma.children('*')
},
example: (props) => <CodeBlock>{props.children}</CodeBlock>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an actions prop on Codeblock which takes in CodeBlockActions... is that a feature in figma?

},
example: (props) => (
<CodeEditor
emptyState={props.isEmptyState}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emptyState is not a boolean prop. It expects you to pass it a whole EmptyState component to display when there is no code in the code prop.

isEditable is not a prop. I think you mean isReadOnly and it'd take the inverse of the isEditable figma prop.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also curious if 'isLanguageLabelVisible' is a relevant prop to any figma features?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code="code editor contents" may be useful to stub out for a basic code editor use case.

'No link': 'no-link'
})
},
example: (props) => <BreadcrumbItem text={props.text} type={props.type} state={props.state} />
Copy link
Contributor

@kmcfaul kmcfaul May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These props don't exist on BreadcrumbItem:

  • text (or the content of the item) should be passed as BreadcrumbItem's children.
  • type seems to be containing an array of different BreadcrumbItem contents, which we could stub out as separate BreadcrumbItems in the return but I'm not sure if the intent here to represent a single item or multiple.
  • state appears to be defining when a BreadcrumbItem is a link, which is determined by the presence or absence of the to prop

BreadcrumbItem also has an isActive prop which indicates and styles the breadcrumb of the current page (removing any link styling) if Figma has a notion of that if may be worth including.

Clicked: true
})
},
example: (props) => <BreadcrumbItem isActive={props.state} isDropdown />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isActive is unrelated to dropdown and can be removed. I'm unsure what clicked state figma is trying to capture here. Opening the dropdown?

'https://www.figma.com/design/aEBBvq0J3EPXxHvv6WgDx9/PatternFly-6--Components-Test?node-id=9802-5857&t=IzSunfrnw18ti37Y-11',
{
props: {
isExpandable: figma.boolean('Expandable'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeBlock does not have an isExpandable type of prop itself, ExpandableSection is used as a child of CodeBlock for this use case.

},
example: (props) => (
<CodeEditor
emptyState={props.isEmptyState}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code="code editor contents" may be useful to stub out for a basic code editor use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants