-
Notifications
You must be signed in to change notification settings - Fork 55
feat(docs): make categories collapsible #1611
feat(docs): make categories collapsible #1611
Conversation
This pull request is automatically deployed with Now. Latest deployment for this branch: https://stardust-react-git-fork-lucivpav-docs-collapsible-categories.stardust-ui.now.sh |
Codecov Report
@@ Coverage Diff @@
## master #1611 +/- ##
=======================================
Coverage 71.46% 71.46%
=======================================
Files 845 845
Lines 6945 6945
Branches 1981 1981
=======================================
Hits 4963 4963
Misses 1976 1976
Partials 6 6
Continue to review full report at Codecov.
|
Co-Authored-By: Marija Najdova <mnajdova@gmail.com>
@@ -121,8 +121,6 @@ const webpackConfig: any = { | |||
src: paths.packageSrc('react'), | |||
docs: paths.base('docs'), | |||
}, | |||
// Allows to avoid multiple inclusions of the same module | |||
modules: [paths.base('node_modules')], |
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.
remix-run/react-router#6201 (comment)
The reason is here, we don't need this anymore due updates in Webpack config
@@ -32,7 +32,7 @@ class App extends React.Component<any, ThemeContextData> { | |||
})} | |||
> | |||
<PerfDataProvider> | |||
<Router /> | |||
<Routes /> |
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.
Renamed to avoid confusion in React Tree
docs/src/components/DocsLayout.tsx
Outdated
}, | ||
}, | ||
})} | ||
> | ||
<Sidebar /> | ||
<Sidebar width={sidebarWidth} treeSelectionStyle={treeSectionStyle} /> |
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.
Don't like this style passdown, but don't have better ideas
This PR changes the docs in a way that the sidebar categories can be collapsed. Previously this was not possible, as the sidebar component did not have a tree structure.
The sidebar items can also be accessed using keyboard only.