-
Notifications
You must be signed in to change notification settings - Fork 55
chore(docs): clean up miscellaneous component documentation #1992
Conversation
* @param {SyntheticEvent} event - React's original SyntheticEvent. | ||
* @param {object} data - All props. | ||
*/ | ||
onFocus?: ComponentEventHandler<AlertProps> | ||
|
||
/** An alert may be formatted to display a successful message. */ | ||
/** An alert can be formatted to display a successful message. */ |
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.
Minor consistency change: "may" and "can" were used interchangeably, so I just picked one.
@@ -46,7 +46,7 @@ export interface AlertProps | |||
*/ | |||
accessibility?: Accessibility | |||
|
|||
/** An Alert can contain action buttons. */ | |||
/** An alert can contain action buttons. */ |
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 standardize on capitalization conventions across all components, but for now I think it's sufficient to ensure they are consistent within a single component. In this case, most were already lowercase.
* also allowed. If using negative values, the animation will start as if it had already been | ||
* playing for N seconds. | ||
* playing for that amount of time. |
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.
Since this is a string, it's not necessarily in seconds.
@@ -38,7 +38,7 @@ export interface AccordionProps extends UIComponentProps, ChildrenComponentProps | |||
/** Initial activeIndex value. */ | |||
defaultActiveIndex?: number[] | number | |||
|
|||
/** Only allow one panel open at a time. */ | |||
/** Only allow one panel to be expanded at a time. */ |
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.
Consistency: Accordion uses the word expanded
to describe its panels' open states, and that term is also already used in describing other props.
@@ -24,42 +24,42 @@ export interface AnimationProps | |||
/** The name for the animation that should be applied, defined in the theme. */ | |||
name?: string | |||
|
|||
/** The delay property specifies a delay for the start of an animation. Negative values are |
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.
Most components don't reiterate the name of the property in the doc string, which I think is a good thing. I've removed it from Animation to make it consistent with the rest of the components.
defaultChecked?: SupportedIntrinsicInputProps['defaultChecked'] | ||
|
||
/** Whether or not item is checked. */ |
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 believe checkbox
is meant by item
here.
Min words is listed as 5, but the the assertion contradicts this by asserting that words is _greater_ than min words.
Codecov Report
@@ Coverage Diff @@
## master #1992 +/- ##
=======================================
Coverage 77.02% 77.02%
=======================================
Files 158 158
Lines 5459 5459
Branches 1581 1597 +16
=======================================
Hits 4205 4205
Misses 1241 1241
Partials 13 13
Continue to review full report at Codecov.
|
Generated by 🚫 dangerJS |
DangerJS improperly flagging a whitespace fix in the Changelog. Ignoring. |
As I've been working on the new Stardust docs I've encountered various typos, grammatical errors, and tense/wording inconsistencies. Since the new docs are using the same exact schemas the current ones do, I figured I'd share the changes sooner than later :).
For wording changes, I tried to keep as true to the original intent as possible while cleaning up the language a bit. If I've gone astray with any of the changes, please let me know!