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

[Bug]: The Search History from Search Bar and Search Icon is not consistent #3676

Open
1 task done
krishi-agrawal opened this issue Feb 13, 2025 · 10 comments
Open
1 task done
Labels
area/typescript Specify what technical area given issue relates to. Its goal is to ease filtering good first issues. good first issue Good for newcomers

Comments

@krishi-agrawal
Copy link

Describe the bug you found in AsyncAPI Docs.

The Search History from Search Bar and Search Icon is not consistent. This might create confusion for users.

Steps to Reproduce:
Go to https://www.asyncapi.com/docs

Attach any resources that can help us understand the issue.

Searching through the Search icon:
Image

Searching through the Search bar:
Image

Code of Conduct

  • I agree to follow this project's Code of Conduct
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@krishi-agrawal
Copy link
Author

Hello @devilkiller-ag , can you review this issue? I would like to work on it.

@Recxsmacx
Copy link

/assign

Recxsmacx added a commit to Recxsmacx/website that referenced this issue Feb 14, 2025
Related to asyncapi#3676

Unify the search history between the search bar and search icon.

* Introduce a shared search history state in `components/AlgoliaSearch.tsx`.
* Update `SearchButton` in `components/AlgoliaSearch.tsx` to use the shared search history state.
* Modify `AlgoliaModal` in `components/AlgoliaSearch.tsx` to accept and update the shared search history state.
* Update `SearchButton` usage in `components/navigation/NavBar.tsx`, `components/navigation/MobileNavMenu.tsx`, `components/Hero.tsx`, and `components/navigation/DocsMobileMenu.tsx` to pass the shared search history state.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/asyncapi/website/issues/3676?shareId=XXXX-XXXX-XXXX-XXXX).
@krishi-agrawal
Copy link
Author

@Recxsmacx I was planning on working on this.

@anshgoyalevil
Copy link
Member

Feel free to create a PR @krishi-agrawal
@Recxsmacx I am closing your PR because issues are required to be triaged before creating a PR.

@anshgoyalevil anshgoyalevil added good first issue Good for newcomers area/typescript Specify what technical area given issue relates to. Its goal is to ease filtering good first issues. and removed 🐞 docs bug labels Feb 16, 2025
@anshgoyalevil anshgoyalevil changed the title [Docs Bug 🐞 report]: The Search History from Search Bar and Search Icon is not consistent [Bug]: The Search History from Search Bar and Search Icon is not consistent Feb 16, 2025
@krishi-agrawal
Copy link
Author

I made changes to make the search histories consistent, but there is an issue. Now I am able to Search all the 'resources' from my Search bar as well(which was meant to Search docs) , a feature which was expected only from the Navbar search icon I believe. How should I proceed?

@KunalNasa
Copy link
Contributor

Changing title below search bar to "recent searches in docs" and "recent searches in website" would be a better alternative for this problem. This will provide a more context of the search history to user.

Recxsmacx added a commit to Recxsmacx/website that referenced this issue Feb 18, 2025
Fixes asyncapi#3676

Update search functionality to make search history consistent between search bar and search icon.

* Update `AlgoliaModal` component in `components/AlgoliaSearch.tsx` to use `INDEX_NAME` for both search placeholders and index name.
* Update `SearchButton` component in `components/navigation/DocsNavWrapper.tsx` to use `INDEX_NAME` for searching resources.
* Update `SearchButton` component in `components/navigation/DocsMobileMenu.tsx` to use `INDEX_NAME` for searching resources.
* Update `SearchButton` component in `components/navigation/NavBar.tsx` to use `INDEX_NAME` for searching resources.
* Update `SearchButton` component in `components/navigation/MobileNavMenu.tsx` to use `INDEX_NAME` for searching resources.
@Recxsmacx
Copy link

@anshgoyalevil I nearly solved this one what to do now??

@anshgoyalevil
Copy link
Member

@Recxsmacx Its always better to read contributing guidelines before jumping in to create a PR

@sambhavgupta0705
Copy link
Member

@anshgoyalevil what's the issue here.I cannot understand it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/typescript Specify what technical area given issue relates to. Its goal is to ease filtering good first issues. good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants