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

Adding Search button #104

Open
yitik-kawatra opened this issue Apr 17, 2020 · 10 comments
Open

Adding Search button #104

yitik-kawatra opened this issue Apr 17, 2020 · 10 comments

Comments

@yitik-kawatra
Copy link
Contributor

For #93

We can add a search button on the nav bar to search for the events by the event name.

@lisa761
Copy link
Member

lisa761 commented Apr 17, 2020

Hi, @yitik-kawatra That's a great idea, but it will require ML no? Until obviously, we use the exact name for searching and loop through all the events present. Have you given the implementation any thought? Although, you don't absolutely have to, its a great idea!

@yitik-kawatra
Copy link
Contributor Author

yitik-kawatra commented Apr 17, 2020

We will not require ML, It can be done by javascript and we can filter the events each time the person type a letter means on every letter pressed we can filter the events with the corresponding search.

@lisa761
Copy link
Member

lisa761 commented Apr 17, 2020

Sorry, that was a typo :(
Yeah, that could be done, what do you think about its time complexity?

Its a great idea altogether, but I am afraid, implementation through javascript will really restrict it(?). Searching is something that many people adopt ML to do for greater efficiency and accuracy.

Can you elaborate some more on your implementation? Do you mean, for eg. If I type i first, then it will show me all the events that have i in the beginning, or all the events that have i anywhere? And if you mean the latter, then what about when I type ie, would it show me all the events that have i and e or will it compare based on the sequence of those letters, that is, tell me all the events that have ie in that exact order? Here also, I guess the latter would be a better option. So overall, you will read the input of the search and apply it on the previous results to loop through them again and find the matching events based on the sequence of the letters, if I am right? At what point, will you terminate this search? And listening for every key press might bring in some trouble if someone is typing an entire word without a pause (I am not too sure), do you think that would create a problem? Have you implemented this before? Its a great idea and I am not opposed to the implementation you are suggesting, per se.

@soumyaa1804
Copy link
Member

soumyaa1804 commented Apr 17, 2020

@yitik-kawatra, the idea to implement search is great but I don't think we'll be able to implement it rn as the events name are all hardcoded and we don't actually parse it from a JSON file or any other data file to render it on the main page. The search feature would be doable if we create a JSON file that will have details of all the events and then loop through it to find the correct match.

Doing it this way would also be a helpful step in taking the project toward Do Not Repeat Yourself principle by implementing this piece of code through a javascript function that loops through the data file and rendering the event card for every event instead of repeating that piece of code for every event.

@lisa761
Copy link
Member

lisa761 commented Apr 17, 2020

Like @soumyaa1804 explained, actually getting into it would entail a lot of changes in the current implementation. As for moving it towards a non-repetitive goal, it would be an enhancement that should be implemented regardless of this, and separately from this.

I don't think it would be fair to have someone spend a lot of time making the relevant changes to implement this, when its not for the real website. It would be an amazing feature, and I am sure we could incorporate it at a later time. And if @yitik-kawatra would like to, we can hit him up when we do do it.

But if you still would like to go ahead with this without changing a lot of the implementation, I think, it could be manageable if we just create an array or an object with hard-coded values in javascript.

@yitik-kawatra
Copy link
Contributor Author

Yes i have tried to implement it through javascript but I also think that it will take lot more of time and i won't be able to give that much of time so will try another features which can be implemented in given time.

@lisa761
Copy link
Member

lisa761 commented Apr 17, 2020

That's alright too.

@tichnas
Copy link
Contributor

tichnas commented Apr 17, 2020

I'm not sure if I should ask this here, please ignore if I shouldn't. I know how to filter search results by using JS but can anyone tell me how will we update the webpage after searching without reloading? (Not in this particular case, but in general)

@soumyaa1804
Copy link
Member

@tichnas, that's totally alright to ask it here. Here is a YouTube tutorial you can go through.

@tichnas
Copy link
Contributor

tichnas commented Apr 17, 2020

@tichnas, that's totally alright to ask it here. Here is a YouTube tutorial you can go through.

Thanks for a quick reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants