Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(www): Persist search pane on plugin lib (#10590)
Fixes #9084. Incorporate layout plugin for smoother browsing on plugin lib. ![kapture 2018-12-20 at 16 19 09](https://user-images.githubusercontent.com/3461087/50314130-4e204a80-0473-11e9-8e29-b3ccf93d3f06.gif)
- Loading branch information
1 parent
a5b218e
commit 3d7b1c3
Showing
8 changed files
with
172 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react" | ||
import PropTypes from "prop-types" | ||
|
||
import Layout from "../layout" | ||
import PageWithPluginSearchBar from "../page-with-plugin-searchbar" | ||
|
||
const PluginLibraryWrappedLayout = props => { | ||
const { children, location } = props | ||
|
||
return ( | ||
<Layout location={location}> | ||
<PageWithPluginSearchBar isPluginsIndex location={location}> | ||
{children} | ||
</PageWithPluginSearchBar> | ||
</Layout> | ||
) | ||
} | ||
|
||
PluginLibraryWrappedLayout.propTypes = { | ||
children: PropTypes.node.isRequired, | ||
location: PropTypes.object.isRequired, | ||
} | ||
|
||
export default PluginLibraryWrappedLayout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from "react" | ||
import PluginLibraryWrapper from "../components/layout/plugin-library-wrapper" | ||
|
||
export default props => { | ||
if (props.pageContext.layout === `plugins`) { | ||
return ( | ||
<PluginLibraryWrapper location={props.location}> | ||
{props.children} | ||
</PluginLibraryWrapper> | ||
) | ||
} | ||
return <>{props.children}</> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters