TheGame
TheGame copied to clipboard
Adding Global Search Functionality
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.
- 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
- 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.
Update: Now trying AsyncSelect component from react-select
Update
https://user-images.githubusercontent.com/53316345/148214203-0e90d2f6-ef39-4c04-9eea-aedf4765be46.mov
:
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 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
Update :