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

Add Search Option #3

Closed
Gituser143 opened this issue May 23, 2021 · 6 comments · Fixed by #26
Closed

Add Search Option #3

Gituser143 opened this issue May 23, 2021 · 6 comments · Fixed by #26
Labels
enhancement New feature or request help wanted Extra attention is needed medium-priority

Comments

@Gituser143
Copy link
Owner

Description

Add functionality to be able to search for coins, either by name or symbol.

Proposed Solution

Add preferably a search window or shortcut to search for coins. Search can be done either naively, or through a regex maybe? (Unsure of how to search).

@Gituser143 Gituser143 added enhancement New feature or request help wanted Extra attention is needed high-priority medium-priority and removed high-priority labels May 23, 2021
@prithvianilk
Copy link

Hello,

Do you want to search in real-time?
Meaning, as the user types some text, the list will update with corresponding symbols.
The user can then choose the ticker they want by moving up / down, and then they will be redirected to the coin's own view.

Or,
Do you want a search bar, where users can type an input string and post validation (if it is a valid ticker) they will be redirected to the coin's own view?

@Gituser143
Copy link
Owner Author

Gituser143 commented Jun 4, 2021

Hi @prithvianilk! I'm not particular about either of the two methods, they both seem great! I'd prefer whichever can be easily implemented from the two (I feel updating real time might be harder said than done).

On the other hand, maybe just displaying a scrollable list of results from a given search query might be the best of both worlds.

What do you think would be better?

@prithvianilk
Copy link

Yup, I agree that the scrollable list of results idea is easier to implement than the real-time update and gives an option to scroll through the list ( so "ET", would yield a list of "ETH" and "ETC"), but it has one problem. Since Crypto tickers/symbols are usually only ~4 characters, the list itself would be pretty small. If someone searches for a ticker and searches correctly, it does not make sense to show a list of one element, similarly, if they misspell, they might get an empty list.

So a simple search and validation + redirect ( or error message due to invalid ticker ) would be better than a list.

Let me know what you think about it!
I probably will pick up this task :)

@Gituser143
Copy link
Owner Author

Gituser143 commented Jun 4, 2021

That's a fair point, but the search should match both the symbol and the name of the coin too. So if someone searches for "car", ADA should pop up in the list, because it's name is "Cardano". Additionally, I don't think it's a good idea to directly jump into the coin page for a matching coin post search (I'm biased towards showing a results list, even if it's a short one).

Edit: Error message when the list is empty does sound like a good idea to me though!

@prithvianilk
Copy link

The name + ticker search sounds good.
I am thinking of popping up a search table, similar to help, on pressing <C-s>.
Is this fine?

@Gituser143
Copy link
Owner Author

The name + ticker search sounds good.
I am thinking of popping up a search table, similar to help, on pressing <C-s>.
Is this fine?

Sounds perfect! Feel free to open a draft PR if you'd want to!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed medium-priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants