TheGame icon indicating copy to clipboard operation
TheGame copied to clipboard

Adding Global Search Functionality

Open Udit-takkar opened this issue 2 years ago • 5 comments

What would you like to be added?

Listing Everything that has to be done here and also discussing the implementation.

Design :- https://www.figma.com/file/M3BpWO13WJVp7YivScL6K9/Dashboard?node-id=86%3A107 Search bar would be present on the navbar.

  1. Auto Completion Search Results :- Whenever User types in the search bar he would be shown possible search results from tables players, patrons and guilds as shown in design.

Debouncing:- To prevent multiple queries to the database on every keystroke. Use react-select for building the UI instead of Input.

Displaying Search Suggestions:- How to make query faster as it would be searching across multiple tables ? Using #990 would help but would it give desirable performance and not very slow? Implementation fuzzy search:- https://hasura.io/docs/latest/graphql/core/databases/postgres/schema/custom-functions.html#example-fuzzy-match-search-functions

  1. New Search Page:- Which would display all the results and filter by Players, Patrons and Guilds.

Managing the state of filters and displaying different components depending on what is active like Guilds or players and implementing infinite lazy loading. Search Query to search guild by name and indexing that table.

Why is this needed?

To search from any page across different data.

Udit-takkar avatar Dec 30 '21 16:12 Udit-takkar

Update: Now trying AsyncSelect component from react-select

Udit-takkar avatar Jan 04 '22 19:01 Udit-takkar

Update

https://user-images.githubusercontent.com/53316345/148214203-0e90d2f6-ef39-4c04-9eea-aedf4765be46.mov

:

Udit-takkar avatar Jan 05 '22 11:01 Udit-takkar

Great work so far @Udit-takkar 🙌 Just to ask/confirm - will it be possible to search Players by their ETH address, too? Otherwise, is there anything blocking you from moving forward with this? Please, let me know!

davort avatar Jan 11 '22 06:01 davort

@davort sorry i was currently busy with my exams. Yeah it would support searching by address. Currently one can search through guild and player table and i am building the rest

Udit-takkar avatar Jan 27 '22 07:01 Udit-takkar

Update : Screenshot 2022-01-27 at 7 44 48 PM

Udit-takkar avatar Jan 27 '22 14:01 Udit-takkar