-
Notifications
You must be signed in to change notification settings - Fork 91
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
chore(chrome): update prop descriptions #954
Conversation
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.
Oops, @Mikaelia, I realized there are a bunch more top-level element-level components to document for chrome
. See https://garden.zendesk.com/components/chrome#api for details. Were you planning to do those here or under separate PR?
@jzempel Oops! Somehow I had it in my mind that I wasn't supposed to document SubNav. I'll get that fixed ASAP. Looking back at the code I do have a couple of questions though: Footer -> I did not see any props to document This is the same with ChevronButton as well |
Yes, there are a list of components that do not have any props. |
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.
Thanks for picking up these leftovers. Just a few more change requests from me.
header?: React.ReactNode; | ||
/** Reveals the item text */ |
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.
Replace item text with something like "item's content" or "sub-items" (not sure that's a term we want to use 😝 ) or, similar to Accordion "item's section" (as this is technically an accordion control).
See the demo at https://garden.zendesk.com/components/chrome#navigation-panel with "show subnav" activated for additional working details for a CollapsibleSubNavItem
.
/** | ||
* Horizontally maximize a flex item in the header to take as much space as possible (i.e. breadcrumb container) | ||
**/ | ||
/** Maximizes the width of a flex item in the header (i.e. breadcrumb container) */ |
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 should remove (i.e. breadcrumb container) as design research has determined planting a breadcrumb in the header is off-pattern.
/** | ||
* Round the border radius for a header item (i.e. user icon) | ||
**/ | ||
/** Rounds the border radius of the item (i.e. user icon) */ |
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.
Per guidance from Content Design and https://garden.zendesk.com/components/avatar#how-to-use-it-well, I wonder if we should swap user with "person". Or does "person icon" just sound a bit weird for dev docs?
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.
Do we need the bit inside the parenthesis? For me I'm not sure if it adds value as it seems pretty self-explanatory
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.
Nope, good call.
/** | ||
* Clip text (but leave accessible to screenreaders) for an icon-only header item | ||
**/ | ||
/** Hides item text. Text remains accessible to screenreaders. */ |
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.
screenreaders -> "screen readers". https://en.wikipedia.org/wiki/Screen_reader
/** | ||
* Applies product-specific color palette | ||
**/ | ||
/** Applies a product-specific color palette */ |
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 this could be improved with "Applies a brand color to the product logo".
For the fussy details, the given name is used to dereference a brand color from the product
portion of the PALETTE object. And then that color hex is inherited by currentColor
used within one of the two-tone "relationshape" icons seen here: https://garden.zendesk.com/design/icons/26.
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.
TBH, I regret having built this component 😅
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.
Ahh, I see. Thanks for the explanation!
Description
Updates chrome package element prop docs