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

Styling and extending the search bar #1460

Open
fnielsen opened this issue Jun 18, 2021 · 8 comments · Fixed by #1485
Open

Styling and extending the search bar #1460

fnielsen opened this issue Jun 18, 2021 · 8 comments · Fixed by #1485
Labels
JavaScript some Scholia code is in JavaScript monadical options suggested for Monadical
Milestone

Comments

@fnielsen
Copy link
Collaborator

fnielsen commented Jun 18, 2021

Styling and extending the search bar in the menu and on the front page. Make it more similiar the search bar on Wikidata.

  • Add borders to the items.
  • Add "more" option, so items beyond 10 can be selected.
  • Let the "enter" in the search bar call the "/search" view
  • Navigate with the mouse buttons (like in the Wikidata interface where up and down buttons select items).
@fnielsen fnielsen added JavaScript some Scholia code is in JavaScript monadical options suggested for Monadical labels Jun 18, 2021
@Daniel-Mietchen Daniel-Mietchen added this to the 30 June 2021 milestone Jun 21, 2021
DanielFLopez added a commit to Monadical-SAS/scholia that referenced this issue Jul 7, 2021
add select2 for search bar
@carlinmack
Copy link
Collaborator

Can the new search be added to this page https://scholia.toolforge.org/search? @DanielFLopez

@DanielFLopez
Copy link
Contributor

Can the new search be added to this page https://scholia.toolforge.org/search? @DanielFLopez

Do you mean the select2 plugin? We think that the advanced search has some special characteristics, such as the identification of Doi and arXiv, this requires certain validations and handling of special cases, so it should be kept on the backend side, with the plugin all these cases should be moved to the font. @carlinmack

@carlinmack
Copy link
Collaborator

I think you're misunderstanding me. The search with autocomplete is already available on the home page and every other page. This search box https://scholia.toolforge.org/search does not have the autocomplete.

@DanielFLopez
Copy link
Contributor

Yes, that's because Select2 can also retrieve results from other data sources, like a remote JSON API, the search from the main page works that way, but the advanced search processes the text in the backend to detect the Doi, arXiv codes and it redirects them to their pages, why then what would be the difference between the home search and advance search?

@carlinmack
Copy link
Collaborator

I guess I kind of understand, however I still think that all search boxes should be as powerful as they can be. As in, I don't see why the search results page search box doesn't have the autocomplete. I think at this point it would be easier for me to make the PR myself?

@carlinmack
Copy link
Collaborator

@fnielsen can this be closed? or anything else to be done

@egonw
Copy link
Collaborator

egonw commented Aug 28, 2021

@carlinmack, one thing I don't like of the new search functionality is that I have to click twice before I can start typing. First click is to get the new UI, resulting in (without cursor focus):

image

and then a second click is needed to give focus to the second search so that I can type things:

image

@carlinmack
Copy link
Collaborator

carlinmack commented Aug 28, 2021

Yeah I think it's due to the plugin being used (select2) is meant to be used for dropdowns rather than search input. I would suggest instead using the HTML < datalist> element to provide the autocomplete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScript some Scholia code is in JavaScript monadical options suggested for Monadical
Projects
Development

Successfully merging a pull request may close this issue.

6 participants