-
Notifications
You must be signed in to change notification settings - Fork 499
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
doc(orga): Add intro pages to connector, component and guides #1476
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extends archetypes/single-column-formatted.pug | ||
include mixins/nav-main.pug | ||
|
||
block content | ||
.content | ||
.documentation-section | ||
div!=contents | ||
h2 Table of content | ||
+nav(navPath, navigation, title, headings) |
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,16 @@ | ||
mixin nav(currentPath, navItems, title, headings) | ||
ul.category-content | ||
if navItems | ||
+navRec(currentPath, navItems, title, 2) | ||
|
||
mixin navRec(currentPath, navItems, title, depth) | ||
for navItem in navItems | ||
- var isCurrentFile = navItem.path === currentPath; | ||
- var className = ['sidebar-element', ('level-h' + depth), (isCurrentFile ? 'navItem-active' : 'navItem')]; | ||
- var activeClass = isCurrentFile ? 'navItem-active' : ''; | ||
li(class=className) | ||
a(href=h.publicPath(navItem.path) class=activeClass)=navItem.title | ||
if navItem.metadata.source | ||
span | ||
| - | ||
a(href=navItem.metadata.source) source code |
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 was deleted.
Oops, something went wrong.
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,18 @@ | ||
--- | ||
title: Components | ||
layout: main-entry.pug | ||
category: component | ||
tocVisibility: false | ||
--- | ||
|
||
|
||
react-instantsearch provides a root component and widgets. The root component | ||
will provide the children a context to let them interact with Algolia. The | ||
widgets are the components who have the ability to interact with the context. | ||
|
||
## Widgets | ||
|
||
The widgets are plain components that are connected to the instantsearch context. | ||
To make this connection, they are wrapped using our collection of Higher Order | ||
Components that we call connectors. | ||
|
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,16 @@ | ||
--- | ||
title: Connectors | ||
layout: main-entry.pug | ||
category: HOC | ||
tocVisibility: false | ||
--- | ||
|
||
Connectors are higher order components. They encapsulate the logic for | ||
a specific kind of widget and they provide a way to interact with | ||
the instantsearch context. | ||
|
||
As higher order components, they have an outer component API that we call | ||
**exposed props** and they will provide some other props to the wrapped | ||
components which are called the **provided props**. | ||
|
||
Connectors are exposed so that you can create your own widgets very easily. |
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 |
---|---|---|
@@ -1,11 +1,10 @@ | ||
--- | ||
title: Examples | ||
layout: examples.pug | ||
layout: main-entry.pug | ||
category: examples | ||
tocVisibility: false | ||
--- | ||
# Examples | ||
|
||
* e-commerce: [live demo](examples/e-commerce/index.html) [code](https://github.com/algolia/instantsearch.js/tree/v2/docgen/src/examples/e-commerce) | ||
* tourism: [live demo](examples/tourism/index.html) [code](https://github.com/algolia/instantsearch.js/tree/v2/docgen/src/examples/tourism) | ||
* media: [live demo](examples/media/index.html) [code](https://github.com/algolia/instantsearch.js/tree/v2/docgen/src/examples/media) | ||
* Material-UI: [live demo](examples/material-ui/index.html) [code](https://github.com/algolia/instantsearch.js/tree/v2/docgen/src/examples/material-ui) | ||
To demonstrate the flexibility of react-instantsearch we have created some demos. | ||
If you think that there is a missing use-case don't hesitate to create an issue | ||
on [our github page](https://github.com/algolia/instantsearch.js/issues). |
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
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,11 @@ | ||
--- | ||
title: Guides | ||
layout: main-entry.pug | ||
category: guide | ||
tocVisibility: false | ||
--- | ||
|
||
In order to complete your knowledge of react-instantsearch, we wrote a series | ||
of guides. Each guide covers a specific subject from a pratical point of view. | ||
|
||
If you think that a subject is not covered [drop us an issue on github](https://github.com/algolia/instantsearch.js/issues). |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 plan to have this page displaying the examples more like the IS.js doc? (with images and re-adding source code links)
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.
Definitely something that would be a nice improvement. The idea is to have a quick first pass at it and then later on improve on it.