-
Notifications
You must be signed in to change notification settings - Fork 370
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
base: main
Are you sure you want to change the base?
Conversation
Preview: https://patternfly-react-pr-11868.surge.sh A11y report: https://patternfly-react-pr-11868-a11y.surge.sh |
// Documentation for JumpLinks can be found at https://www.patternfly.org/components/jump-links | ||
<JumpLinksItem href="#" isActive={props.isActive}> | ||
{props.tabText} | ||
{props.children} |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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}> |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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 />} /> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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 />} /> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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
.
Relates to: #11624
Included components:
Component tracker
Figma preview
Resources: