Skip to content
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

Update vue 3 getting started sample code #120

Merged
merged 14 commits into from
Oct 31, 2022
Merged

Conversation

amit-ksh
Copy link
Contributor

@amit-ksh amit-ksh commented Oct 7, 2022

Pull Request

Related issue

Fixes #117

What does this PR do?

Update the vue 3 getting started sample code from vue 2 in README.md

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

@bidoubiwa
Copy link
Contributor

Hello @amit-ksh,
Thank you very much for contributing to Meilisearch ❤️.
However, I am not available on the weekend, but I will be back on Monday 😊.

PS: This message was sent automatically!

@amit-ksh amit-ksh changed the title Update vue 3 getting started sample code Update README.md Oct 9, 2022
@amit-ksh amit-ksh changed the title Update README.md Update vue 3 getting started sample code Oct 9, 2022
@bidoubiwa
Copy link
Contributor

Hey @amit-ksh ! Thanks for waiting, your PR flew under the radar! I'll be reviewing it ASAP!

@bidoubiwa bidoubiwa self-requested a review October 18, 2022 10:31
@bidoubiwa bidoubiwa added the skip-changelog The PR will not appear in the release changelogs label Oct 18, 2022
@bidoubiwa
Copy link
Contributor

I tried your sample out but unfortunately it does not work. Any idea why?

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <link rel="stylesheet"
    href="https://cdn.jsdelivr.net/npm/@meilisearch/instant-meilisearch/templates/basic_search.css" />
</head>

<body>
  <div id="app" class="wrapper">
    <ais-instant-search :search-client="searchClient" index-name="movies">
      <ais-configure :hits-per-page.camel="10" />
      <ais-search-box placeholder="Search here…" class="searchbox"></ais-search-box>
      <ais-hits>
        <div slot="item" slot-scope="{ item }">
          <ais-highlight :hit="item" attribute="title" />
        </div>
      </ais-hits>
    </ais-instant-search>
  </div>
</body>

<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-instantsearch/vue3/umd/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@meilisearch/instant-meilisearch/dist/instant-meilisearch.umd.min.js">
</script>

<script>
  const app = Vue
    .createApp({
      data() {
        return {
          searchClient: instantMeiliSearch('http://127.0.0.1:7700')
        }
      }
    })
    .use(VueInstantSearch)
    .mount("#app");
</script>

</html>

@amit-ksh
Copy link
Contributor Author

amit-ksh commented Oct 18, 2022

I don't know why it's not working, app is importing all the packages correctly but not able to use it plugin as well as the styled components.

@bidoubiwa
Copy link
Contributor

Is it working for you?

@amit-ksh
Copy link
Contributor Author

amit-ksh commented Oct 18, 2022

No, it's not working for me also. In the console, warning is logging out for meilisearch-instantsearch package

@bidoubiwa
Copy link
Contributor

😕 Tell me if you achieve to make it work. Meanwhile I put this in draft.

@bidoubiwa bidoubiwa marked this pull request as draft October 18, 2022 13:41
@amit-ksh
Copy link
Contributor Author

OK!

@amit-ksh
Copy link
Contributor Author

Hey @bidoubiwa! I fix the sample code, would you review it again?

@amit-ksh amit-ksh marked this pull request as ready for review October 21, 2022 03:57
@bidoubiwa
Copy link
Contributor

This message is sent automatically

Thanks again for contributing to Meilisearch ❤️
If you are participating in Hacktoberfest, and you would like to receive some gift from Meilisearch too, please complete this form.

Copy link
Contributor

@bidoubiwa bidoubiwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Sorry for the delay I was on sick leave.

I'm happy to see that the samples work with vue 3 :) Is it possible to give them the same style as the vue2 one?
The sample should be as minimal as possible

@amit-ksh
Copy link
Contributor Author

I will definitely give a try

@amit-ksh
Copy link
Contributor Author

vue meilisearch app

.code-samples.meilisearch.yaml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
.code-samples.meilisearch.yaml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@amit-ksh
Copy link
Contributor Author

Made all the requested changes.

Copy link
Contributor

@bidoubiwa bidoubiwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for fixing these bugs so quickly 🙏

Once you're done, can you put the two code samples in a new file named
.code-samples-vue-3.meilisearch.yaml
?

.code-samples.meilisearch.yaml Outdated Show resolved Hide resolved
.code-samples.meilisearch.yaml Outdated Show resolved Hide resolved
.code-samples.meilisearch.yaml Outdated Show resolved Hide resolved
.code-samples.meilisearch.yaml Outdated Show resolved Hide resolved
.code-samples.meilisearch.yaml Outdated Show resolved Hide resolved
.code-samples.meilisearch.yaml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
amit-ksh and others added 5 commits October 27, 2022 21:34
Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>
Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>
@amit-ksh
Copy link
Contributor Author

@bidoubiwa could you review my changes please?

Copy link
Contributor

@bidoubiwa bidoubiwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this small change I think the PR is good to be merged :)

@amit-ksh
Copy link
Contributor Author

Done!

Copy link
Contributor

@bidoubiwa bidoubiwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 🔥 Thanks a lot

@bidoubiwa bidoubiwa merged commit 3648d2b into meilisearch:main Oct 31, 2022
@bidoubiwa
Copy link
Contributor

This message is sent automatically

Thanks again for contributing to Meilisearch ❤️
If you are participating in Hacktoberfest, and you would like to receive some gift from Meilisearch too, please complete this form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog The PR will not appear in the release changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Vue 3 sample to getting started code sample
2 participants