Skip to content

feat(CC-batch-6): added batch 6 #11868

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mattnolting
Copy link
Contributor

Relates to: #11624

Included components:

  • Jump Links
  • Label
  • Login Page
  • Masthead
  • Modal

Component tracker

Figma preview

Resources:

@mattnolting mattnolting marked this pull request as ready for review June 12, 2025 11:57
@mattnolting mattnolting requested review from evwilkin and kmcfaul June 12, 2025 11:57
@patternfly-build
Copy link
Contributor

patternfly-build commented Jun 12, 2025

@nicolethoen nicolethoen self-requested a review June 12, 2025 14:13
// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
<JumpLinksItem href="#" isActive={props.isActive}>
{props.tabText}
{props.children}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any JumpLinksItem in our docs with any text in them other than the tabText. Do you know what this is intended to show?

// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
<JumpLinksItem href="#" isActive={props.isActive}>
{props.tabText}
{props.children}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any JumpLinksItem in our docs with any text in them other than the tabText. Do you know what this is intended to show?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think children can be removed for this and JumpLinkVertical.

I also think these files could be combined and renamed to JumpLinksItem since they're identical, but I don't know if figma needs these to be separate.

},
example: (props) => (
// Documentation for Label can be found at https://www.patternfly.org/components/label
<Label color={props.color} variant={props.variant} isCompact={props.isCompact} isEditable={props.isEditable}>
Copy link
Contributor

Choose a reason for hiding this comment

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

If a label is editable, it needs a suite of extra props as well:

        isEditable 
        onEditCancel={(_event, prevText) => {}} // Callback when an editable label cancels an edit.
        onEditComplete={(_event, newText) => {}} // Callback when an editable label completes an edit.
        editableProps={{
          'aria-label': `Editable label with text ${label1}`,
          id: 'editable-label-1'
        }} // Additional props passed to the editable label text div. Optionally passing onInput and onBlur callbacks will allow finer custom text input control.

import { Label } from '@patternfly/react-core';

figma.connect(
Label,
Copy link
Contributor

Choose a reason for hiding this comment

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

Does figma have a 'clickable' variant for labels? or do any of their labels have close buttons? those are two features that are highlighted in our docs that don't seem covered by these examples..

signUpForAccountMessage={signUpForAccountMessage}
forgotCredentials={forgotCredentialsprops.isInvalid}
>
{props.children}
Copy link
Contributor

Choose a reason for hiding this comment

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

these children should be a form, right?

<Masthead id="<masthead-id>" inset={{ default: 'insetSm' }}>
<MastheadMain>
<MastheadToggle>
<Button variant="plain" onClick={() => {}} aria-label="Global navigation" icon={<BarsIcon />} />
Copy link
Contributor

Choose a reason for hiding this comment

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

ReferenceError: BarsIcon is not defined

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we expect these stubs to include import statements though right? Masthead and co. are also not imported in the stub and aren't expected to already be imported wherever they're pasted (our docs I think just import a bunch of things automatically).

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

Choose a reason for hiding this comment

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

should we tell them that this is intended to be a button with an onClick handler for toggling open and closed the sidebar nav?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be a good comment to have.

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

Choose a reason for hiding this comment

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

This will have the same issues as the AboutModal where the Modal will not appear unless it has isOpen={true} but really they probably want a button which will allow them to open/close the modal...

Copy link
Contributor

Choose a reason for hiding this comment

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

This also invalid...
It needs a header, body, and footer. It'll also need a close button of some kind

Screenshot 2025-06-12 at 10 44 01 AM

Copy link
Contributor

Choose a reason for hiding this comment

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

This applies for the AlertModal figma cc as well, it also needs the header/body/footer. children probably maps to the ModalBody content I would expect, and the rest could be stubbed out.

Modal would also benefit from having aria-labelledby and aria-describedby stubbed out with ids matching the respective ModalHeader and ModalBody.

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

Choose a reason for hiding this comment

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

we don't have alert modals?

we have a title icon which lets them specify a status to add the correct icon to the header?
https://www.patternfly.org/components/modal#title-icon

// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links
<JumpLinksItem href="#" isActive={props.isActive}>
{props.tabText}
{props.children}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think children can be removed for this and JumpLinkVertical.

I also think these files could be combined and renamed to JumpLinksItem since they're identical, but I don't know if figma needs these to be separate.

Green: 'green',
Blue: 'blue',
Purple: 'purple',
Grey: 'grey'
Copy link
Contributor

Choose a reason for hiding this comment

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

teal and yellow are also valid colors for Label.

<Masthead id="<masthead-id>" inset={{ default: 'insetSm' }}>
<MastheadMain>
<MastheadToggle>
<Button variant="plain" onClick={() => {}} aria-label="Global navigation" icon={<BarsIcon />} />
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we expect these stubs to include import statements though right? Masthead and co. are also not imported in the stub and aren't expected to already be imported wherever they're pasted (our docs I think just import a bunch of things automatically).

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

Choose a reason for hiding this comment

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

I think it would be a good comment to have.

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

Choose a reason for hiding this comment

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

This applies for the AlertModal figma cc as well, it also needs the header/body/footer. children probably maps to the ModalBody content I would expect, and the rest could be stubbed out.

Modal would also benefit from having aria-labelledby and aria-describedby stubbed out with ids matching the respective ModalHeader and ModalBody.

@mattnolting mattnolting marked this pull request as draft June 17, 2025 14:54
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.

4 participants