Skip to content

Commit

Permalink
chore(docs): replace algolia/instantsearch.js with algolia/instantsea…
Browse files Browse the repository at this point in the history
…rch (#5843)

leftover from the monorepo migration, also some changes in the readmes to fix links more precise for vue and react
  • Loading branch information
Haroenv committed Sep 12, 2023
1 parent 9b2471e commit 2915469
Show file tree
Hide file tree
Showing 56 changed files with 2,619 additions and 4,275 deletions.
2 changes: 1 addition & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sandboxes": [
"instantsearchjs-es-template-pcw1k",
"github/algolia/instantsearch.js/tree/templates/react-instantsearch",
"github/algolia/instantsearch/tree/templates/react-instantsearch",
"/examples/react/default-theme",
"/examples/vue/default-theme"
],
Expand Down
140 changes: 70 additions & 70 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,76 @@ description: Help us improve InstantSearch
labels:
- triage
body:
- type: textarea
id: current-behavior
attributes:
label: 🐛 Current behavior
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: 🔍 Steps to reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to ...
2. Click on ...
3. Scroll down to ...
4. See error
- type: textarea
id: current-behavior
attributes:
label: 🐛 Current behavior
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: 🔍 Steps to reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to ...
2. Click on ...
3. Scroll down to ...
4. See error
You can attach screenshots by dragging and dropping, or selecting and pasting them in the text field.
validations:
required: true
- type: input
id: reproduction-links
attributes:
label: Live reproduction
description: |
A live example helps a lot! Fork the sandbox relevant to the library you're using, reproduce the bug, and paste the URL here.
You can attach screenshots by dragging and dropping, or selecting and pasting them in the text field.
validations:
required: true
- type: input
id: reproduction-links
attributes:
label: Live reproduction
description: |
A live example helps a lot! Fork the sandbox relevant to the library you're using, reproduce the bug, and paste the URL here.
<table>
<tr>
<th>Sandboxes</th>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch.js/tree/templates/instantsearch.js" target="_blank">InstantSearch.js</a></td>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch.js/tree/templates/react-instantsearch" target="_blank">React InstantSearch</a></td>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch.js/tree/templates/vue-instantsearch" target="_blank">Vue InstantSearch</a></td>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch.js/tree/templates/angular-instantsearch" target="_blank">Angular InstantSearch</a></td>
</tr>
</table>
<table>
<tr>
<th>Sandboxes</th>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch/tree/templates/instantsearch.js" target="_blank">InstantSearch.js</a></td>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch/tree/templates/react-instantsearch" target="_blank">React InstantSearch</a></td>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch/tree/templates/vue-instantsearch" target="_blank">Vue InstantSearch</a></td>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch/tree/templates/angular-instantsearch" target="_blank">Angular InstantSearch</a></td>
</tr>
</table>
placeholder: https://codesandbox.io/...
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: 💭 Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: input
id: version
attributes:
label: Package version
description: What library and version you're experiencing the issue with.
placeholder: e.g., instantsearch.js 4.49.2, react-instantsearch 6.38.1
validations:
required: true
- type: input
id: os
attributes:
label: Operating system
placeholder: e.g., macOS 13.1
- type: input
id: browser
attributes:
label: Browser
placeholder: e.g., Firefox 108.0.1
- type: checkboxes
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/algolia/.github/blob/main/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true
placeholder: https://codesandbox.io/...
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: 💭 Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: input
id: version
attributes:
label: Package version
description: What library and version you're experiencing the issue with.
placeholder: e.g., instantsearch.js 4.49.2, react-instantsearch 6.38.1
validations:
required: true
- type: input
id: os
attributes:
label: Operating system
placeholder: e.g., macOS 13.1
- type: input
id: browser
attributes:
label: Browser
placeholder: e.g., Firefox 108.0.1
- type: checkboxes
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/algolia/.github/blob/main/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://github.com/algolia/instantsearch.js/discussions/new?category=ideas&labels=triage&title=Feature%20request%3A%20
url: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage&title=Feature%20request%3A%20
about: Request a feature to add to InstantSearch.
- name: Ask a Question
url: https://github.com/algolia/instantsearch.js/discussions/new?category=q-a&labels=triage
url: https://github.com/algolia/instantsearch/discussions/new?category=q-a&labels=triage
about: Ask questions and discuss with other community members.
19 changes: 10 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@

Hello and welcome to the contributing guide for InstantSearch. Thanks for considering participating in our project 🙇

If this guide does not contain what you are looking for and thus prevents you from contributing, don't hesitate to leave a message on the [community forum](https://discourse.algolia.com/) or to [open an issue](https://github.com/algolia/instantsearch.js/issues).
If this guide does not contain what you are looking for and thus prevents you from contributing, don't hesitate to leave a message on the [community forum](https://discourse.algolia.com/) or to [open an issue](https://github.com/algolia/instantsearch/issues).

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Reporting an issue](#reporting-an-issue)
- [The code contribution process](#the-code-contribution-process)
- [Commit conventions](#commit-conventions)
Expand All @@ -36,7 +35,7 @@ If this guide does not contain what you are looking for and thus prevents you fr

Opening an issue is very effective way to contribute because many users might also be impacted. We'll make sure to fix it quickly if it's technically feasible and doesn't have important side effects for other users.

Before reporting an issue, first check that there is not an already open issue for the same topic using the [issues page](https://github.com/algolia/instantsearch.js/issues). Don't hesitate to thumb up an issue that corresponds to the problem you have.
Before reporting an issue, first check that there is not an already open issue for the same topic using the [issues page](https://github.com/algolia/instantsearch/issues). Don't hesitate to thumb up an issue that corresponds to the problem you have.

Another element that will help us go faster at solving the issue is to provide a reproducible test case. We often recommend to [use this CodeSandbox template](https://codesandbox.io/s/github/algolia/instantsearch-templates/tree/master/src/InstantSearch.js).

Expand Down Expand Up @@ -162,7 +161,7 @@ This monorepo has as goal to be used for all InstantSearch flavors and tools. To

The general philosophy of testing in InstantSearch follows [Testing Library's guiding principles](https://testing-library.com/docs/guiding-principles):

>The more your tests resemble the way your software is used, the more confidence they can give you.
> The more your tests resemble the way your software is used, the more confidence they can give you.
We rely on [Jest](https://jestjs.io/) for unit tests on all flavors of InstantSearch. In addition, [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) is used to test interactions in React InstantSearch.

Expand Down Expand Up @@ -214,7 +213,9 @@ fireEvent.click(button);
// Don't manually dispatch with lower-level APIs or create custom-made events,
// the browser might do other things you don't see or know about.
fireEvent(button, new MouseEvent('click', { bubbles: true, cancelable: true }));
button.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
button.dispatchEvent(
new MouseEvent('click', { bubbles: true, cancelable: true })
);
```

**✅ Correct**
Expand Down Expand Up @@ -284,8 +285,7 @@ await waitFor(() => {
});
```

> **Note**
>Sometimes, a second (focused) snapshot is clearer and shorter than a series of isolated assertions. Use your judgment to determine what will make the test the tersest and easiest to understand.
> **Note** Sometimes, a second (focused) snapshot is clearer and shorter than a series of isolated assertions. Use your judgment to determine what will make the test the tersest and easiest to understand.
### Testing a widget

Expand All @@ -294,6 +294,7 @@ Widgets in InstantSearch are building blocks that have a predefined behavior and
When testing a widget, you should focus on **user interactions, rendering, and possibly side-effects**.

For example, you should test:

- The rendering of a widget after passing all possible props.
- The rendering of a widget or its side-effects (e.g., URL updates when used with routing) after interacting with it.

Expand Down Expand Up @@ -338,12 +339,12 @@ yarn test:e2e:local
```

To run them on Sauce Labs:

```sh
yarn test:e2e:saucelabs
```

> **Note**
>Make sure to set up Sauce Labs credentials with the `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables.
> **Note** Make sure to set up Sauce Labs credentials with the `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables.
For more info, including how to write end-to-end tests, check the `tests/e2e` [CONTRIBUTING](./tests/e2e/CONTRIBUTING.md) and [README](./tests/e2e/README.md) files.

Expand Down
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

---

[![License][license-image]][license-url]
[![Build Status][ci-svg]][ci-url]
[![License][license-image]][license-url] [![Build Status][ci-svg]][ci-url]

[InstantSearch][instantsearch-docs] is a JavaScript library that lets you create an instant-search result experience using [Algolia][algolia-website]’s search API.

Expand All @@ -27,7 +26,6 @@ It is part of the InstantSearch family which is designed for different platforms
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Packages](#packages)
- [Contributing](#contributing)
- [License](#license)
Expand All @@ -44,7 +42,7 @@ It is part of the InstantSearch family which is designed for different platforms
| [`create-instantsearch-app`](packages/create-instantsearch-app) | [![create-instantsearch-app npm version](https://img.shields.io/npm/v/create-instantsearch-app.svg?style=flat-square)](https://npmjs.org/package/create-instantsearch-app) | Command-line utility to quickly bootstrap a project with InstantSearch |
| [`instantsearch.css`](packages/instantsearch.css) | [![instantsearch.css npm version](https://img.shields.io/npm/v/instantsearch.css.svg?style=flat-square)](https://npmjs.org/package/instantsearch.css) | Default CSS themes for InstantSearch |
| [`instantsearch.js`](packages/instantsearch.js) | [![instantsearch.js npm version](https://img.shields.io/npm/v/instantsearch.js.svg?style=flat-square)](https://npmjs.org/package/instantsearch.js) | InstantSearch.js |
| [`react-instantsearch`](packages/react-instantsearch) | [![react-instantsearch npm version](https://img.shields.io/npm/v/react-instantsearch.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch)| React InstantSearch bundled library |
| [`react-instantsearch`](packages/react-instantsearch) | [![react-instantsearch npm version](https://img.shields.io/npm/v/react-instantsearch.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch) | React InstantSearch bundled library |
| [`react-instantsearch-core`](packages/react-instantsearch-core) | [![react-instantsearch-core npm version](https://img.shields.io/npm/v/react-instantsearch-core.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch-core) | Runtime-independent React InstantSearch version |
| [`vue-instantsearch`](packages/vue-instantsearch) | [![vue-instantsearch npm version](https://img.shields.io/npm/v/vue-instantsearch.svg?style=flat-square)](https://npmjs.org/package/vue-instantsearch) | Vue InstantSearch |

Expand Down Expand Up @@ -80,16 +78,16 @@ InstantSearch is [MIT licensed][license-url].
<!-- Links -->

[algolia-website]: https://www.algolia.com/?utm_source=instantsearch.js&utm_campaign=repository "Algolia's website"
[instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/?utm_source=instantsearch.js&utm_campaign=repository "InstantSearch.js documentation"
[react-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react/?utm_source=instantsearch.js&utm_campaign=repository "React InstantSearch documentation"
[vue-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/vue/?utm_source=instantsearch.js&utm_campaign=repository "Vue InstantSearch documentation"
[angular-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/angular/?utm_source=instantsearch.js&utm_campaign=repository "Angular InstantSearch documentation"
[instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/?utm_source=instantsearch.js&utm_campaign=repository 'InstantSearch.js documentation'
[react-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react/?utm_source=instantsearch.js&utm_campaign=repository 'React InstantSearch documentation'
[vue-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/vue/?utm_source=instantsearch.js&utm_campaign=repository 'Vue InstantSearch documentation'
[angular-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/angular/?utm_source=instantsearch.js&utm_campaign=repository 'Angular InstantSearch documentation'
[instantsearch-android-github]: https://github.com/algolia/instantsearch-android
[instantsearch-ios-github]: https://github.com/algolia/instantsearch-ios
[instantsearch-angular-github]: https://github.com/algolia/angular-instantsearch
[contributing-bugreport]: https://github.com/algolia/instantsearch.js/issues/new?template=BUG_REPORT.yml&labels=triage
[contributing-featurerequest]: https://github.com/algolia/instantsearch.js/discussions/new?category=ideas&labels=triage&title=Feature%20request%3A%20
[contributing-newissue]: https://github.com/algolia/instantsearch.js/issues/new?labels=triage
[contributing-label-easy]: https://github.com/algolia/instantsearch.js/issues?q=is%3Aopen+is%3Aissue+label%3A%22Difficulty%3A+Easy%22
[contributing-label-bug]: https://github.com/algolia/instantsearch.js/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Bug%22
[contributing-label-chore]: https://github.com/algolia/instantsearch.js/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Chore%22
[contributing-bugreport]: https://github.com/algolia/instantsearch/issues/new?template=BUG_REPORT.yml&labels=triage
[contributing-featurerequest]: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage&title=Feature%20request%3A%20
[contributing-newissue]: https://github.com/algolia/instantsearch/issues/new?labels=triage
[contributing-label-easy]: https://github.com/algolia/instantsearch/issues?q=is%3Aopen+is%3Aissue+label%3A%22Difficulty%3A+Easy%22
[contributing-label-bug]: https://github.com/algolia/instantsearch/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Bug%22
[contributing-label-chore]: https://github.com/algolia/instantsearch/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Chore%22
95 changes: 50 additions & 45 deletions examples/js/calendar-widget/index.html
Original file line number Diff line number Diff line change
@@ -1,48 +1,53 @@
<html>

<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7.3.1/themes/algolia.min.css">
<link rel="stylesheet" type="text/css" href="main.css">
<link rel="stylesheet" type="text/css" href="calendar.css">
<title>InstantSearch Calendar Widget</title>
</head>

<body>
<header class="topbar">
<h1 class="title">
<a href=".">Calendar Widget Demo</a>
</h1>
<p class="subtitle">powered by
<a href="https://github.com/algolia/instantsearch.js/">InstantSearch.js</a>
</p>
</header>

<main class="wrapper">
<aside class="left">
<div id="refinement-list">
<h3>Dates</h3>
<div id="calendar" class="daterange"></div>
<head>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/instantsearch.css@7.3.1/themes/algolia.min.css"
/>
<link rel="stylesheet" type="text/css" href="main.css" />
<link rel="stylesheet" type="text/css" href="calendar.css" />
<title>InstantSearch Calendar Widget</title>
</head>

<body>
<header class="topbar">
<h1 class="title">
<a href=".">Calendar Widget Demo</a>
</h1>
<p class="subtitle">
powered by
<a href="https://github.com/algolia/instantsearch/">InstantSearch.js</a>
</p>
</header>

<main class="wrapper">
<aside class="left">
<div id="refinement-list">
<h3>Dates</h3>
<div id="calendar" class="daterange"></div>
</div>

<footer class="left-footer">
<p>
<a
href="https://github.com/algolia/instantsearch/tree/master/examples/calendar-widget"
>View on GitHub</a
>.
</p>
</footer>
</aside>

<div class="right">
<div id="search-box"></div>

<ul id="hits" class="hits-container"></ul>
</div>

<footer class="left-footer">
<p>
<a href="https://github.com/algolia/instantsearch.js/tree/master/examples/calendar-widget">View on GitHub</a>.
</p>
</footer>
</aside>

<div class="right">
<div id="search-box"></div>

<ul id="hits" class="hits-container"></ul>
</div>
</main>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js"></script>
<script src="https://unpkg.com/BaremetricsCalendar@1.0.11/public/js/Calendar.js"></script>
<script type="module" src="env.js"></script>
<script type="module" src="app.js"></script>
</body>

</main>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js"></script>
<script src="https://unpkg.com/BaremetricsCalendar@1.0.11/public/js/Calendar.js"></script>
<script type="module" src="env.js"></script>
<script type="module" src="app.js"></script>
</body>
</html>
Loading

0 comments on commit 2915469

Please sign in to comment.