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

Search Functionailty (Make dicussions & discord visible) #232

Closed
BlackPhlox opened this issue Dec 30, 2021 · 5 comments · Fixed by #1075
Closed

Search Functionailty (Make dicussions & discord visible) #232

BlackPhlox opened this issue Dec 30, 2021 · 5 comments · Fixed by #1075
Labels
A-Home C-Feature A new feature, making something new possible C-Webdev

Comments

@BlackPhlox
Copy link
Contributor

BlackPhlox commented Dec 30, 2021

(WIP)

Part of #159 - Asset search
Related to #2 - Searchable bevy

Based on being active in the bevy discord help channel, some of the questions asked have already been discussed. In order to intrinsically prevent duplicates, we should use the website as a medium to redirect users for help.

Goal:
Encourage discovery though:

Pros & Cons:

+  Not having the costs of hosting a database
-  Not as customizable as it relies on GitHub and crates.io APIs

Requires metadata tags from github and or crates.io specified in #230

Prototype:

Where the URL looks something like https://bevyengine.org/assets?q=hide+mouse

And clicking on Search for “hide mouse” in discussions links to:
https://github.com/bevyengine/bevy/discussions?discussions_q=hide+mouse and
https://bevy-cheatbook.github.io/?search=hide%20mouse
for bevy-cheatbook

Group 88

@alice-i-cecile
Copy link
Member

https://dev-docs.bevyengine.org/bevy/index.html may also be worth searching, in addition to crates.io docs and the book.

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible C-Webdev A-Home labels Mar 30, 2022
@CooCooCaCha
Copy link
Contributor

CooCooCaCha commented Apr 3, 2022

If we want search-as-you-type then we'll need javascript.

Alternatively, it might be possible to implement search as an HTML form that refreshes the page every time a user searches. This would mean ditching zola in favor of a custom-built server that dynamically generates HTML. It's also, honestly, a sub-par user experience compared to search-as-you-type like the bevy cheatbook.

Either way, the dynamics need to take place somewhere since a purely static HTML + CSS site can't reconfigure itself based on user search input.

I haven't used any, but it seems there are some javascript search engines that are built to run in the browser. We could pair that with our own zola-generated javascript that uses the bevy-assets repo as a data source.

Additionally we'll have to think about how we want to update the DOM. Manually updating the DOM is error prone and doesn't scale as sites grow in functionality. It might be worth prototyping the manual route but if we keep going this direction I suspect we'll end up rediscovering why modern UI frameworks exist :). Just my 2c.

@BlackPhlox
Copy link
Contributor Author

Related #379

@d-bucur
Copy link
Contributor

d-bucur commented Aug 23, 2023

I have added a basic search in #734

The search link to GH Discussions and Bevy cheatbook are easy to implement as a link, discord search is a can of worms I don't want to open.

But I have a problem with the UX of this proposal. If I am on the asset page and searching for assets I don't want the first results to be to something else entirely. And searching for an asset uses completely different terms than searching a problem in Discussions or cheatbook, so it's likely there will be no results.

I propose to display these links only as a final resort if either the search result in assets is empty, or at the bottom of the page if the user scrolled down and didn't find what they were looking for.

@BlackPhlox
Copy link
Contributor Author

@d-bucur I agree, this is a much better approach, and UX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Home C-Feature A new feature, making something new possible C-Webdev
Projects
None yet
4 participants