-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1784 +/- ##
=======================================
Coverage 69.56% 69.56%
=======================================
Files 875 875
Lines 7596 7596
Branches 2219 2246 +27
=======================================
Hits 5284 5284
Misses 2304 2304
Partials 8 8 Continue to review full report at Codecov.
|
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.
Props
and Accessibility
tabs look good 👍 The Definition
and Usage
tabs need a little more organization.
The "Definition" of the component includes the default example and an example for each prop. You can think of the definition as showing one and only one example for each thing the component is capable of.
Example, imagine the Button component which has props like primary
, disabled
and loading
. Each prop is a part of the definition of the component, defining the boundaries of the component's features. The definition tab then would show one example for each prop.
Examples that are not showing a single prop, like those in https://stardust-react-bre8h5b64.now.sh/components/button/usage#usage, show ways of using the component that are beyond showing the definition of the component.
One other way to look at it is that the Definition tab should tell you, "Here's the component, its definition, and each thing it can do", while, the usage tab should tell you, "Here are some real world use cases you might need to know how to implement".
A good start would be moving all of the examples in the Usage section:
...to the Usage tab and leaving the examples under Types/States/Variations/Slots/etc under the Definition tab.
…to docs/component-tabs
@levithomason I have moved the Usage examples under Usage tab, while keeping the rest under Definition tab. |
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 looks like a good start that we can iterate on 👍 well done!
This PR changes the way component pages are rendered. The long page is no longer present, instead it is organized into the following categories: Definition, Usage, Props, Accessibility.
TODO:
tabBehavior, tabListBehavior => to make it accessible ✅
Usage.TryIt is broken ✅
fix links to sections ✅
when loading the component docs for the first time, the definition tab is empty ✅
fix highlight left sidebar item ✅