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 13 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.

},
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.

Copy link
Contributor Author

@mattnolting mattnolting Jun 11, 2025

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?

@nicolethoen No, it is not at this time a feature of Figma.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a note for design followup. The buttons are presented in alternative order to the documentation.

'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.

'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.

},
example: (props) => (
// Documentation for BreadcrumbItem can be found at https://www.patternfly.org/components/breadcrumb
<BreadcrumbItem isDropdown>{props.children}</BreadcrumbItem>
Copy link
Contributor

Choose a reason for hiding this comment

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

in figma, if they select that they want a dropdown, do they have to pick the dropdown? adding this prop doesn't create a dropdown, just changes some padding, so if we need to ship the dropdown as part of the code here, that'll need to be added.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, the menuToggles/dropdowns will be rendered as children in this case, we shouldn't need isDropdown

Copy link
Contributor

Choose a reason for hiding this comment

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

if they are passing a dropdown as children, then they will need the isDropdown prop.

expandableSection: figma.boolean('Expandable', {
true: (
<ExpandableSectionToggle ontoggle={() => {}} contentId="code-block-id" direction="up">
{isExpanded ? 'Show Less' : 'Show More'}
Copy link
Contributor

Choose a reason for hiding this comment

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

in this case, isExpanded is not defined so they will get an ReferenceError: isExpanded is not defined

example: (props) => (
// Documentation for CodeBlock can be found at https://www.patternfly.org/components/code-block
<CodeBlock actions={props.actions}>
<CodeBlock>{/* {props.codeBlockCode} */}</CodeBlock>
Copy link
Contributor

Choose a reason for hiding this comment

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

is this codeBlockCode prop supposed to be commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I'll include a note describing why I did this and update to placeholder text.

@mattnolting mattnolting marked this pull request as draft June 17, 2025 14:53
@mattnolting mattnolting marked this pull request as ready for review June 24, 2025 15:22
@mattnolting mattnolting requested a review from nicolethoen July 17, 2025 13:27
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