Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Browser "back" button function #386

Closed
tomas-pluskal opened this issue Mar 3, 2019 · 4 comments
Closed

Browser "back" button function #386

tomas-pluskal opened this issue Mar 3, 2019 · 4 comments

Comments

@tomas-pluskal
Copy link
Contributor

Hi,
I am using version 1.1.0.beta12 and Chrome browser.

After performing a blast search, I get the results page. When I click the "Back" button in the browser, it takes me back to the initial page of sequenceserver, but the sequence that I blasted, the database selection, and the blast parameters have all disappeared. If I want to search the same sequence in a different database with the same parameters, I need to fill everything again.

I think

  1. The "back" button should take the user to the original form with the same values that the user provided. Alternatively, there could be a button like "Modify search" in the results page that would take the user back to the search page with the original values pre-filled.
  2. There should be a button like "New search" in the results page that would take the user back to the empty start page.
@yeban
Copy link
Collaborator

yeban commented Mar 8, 2019

This and a few other issues like this is why we still have the beta tag. As a temporary workaround, I hold the Cmd button on my Mac when I click submit. This opens the results page in a new tab (works in Chrome). Surely one should be able to do the same in Chrome on Linux/Windows using Ctrl button?

I agree that the back button should take the user back to the filled form. But I am not so sure about 'modify search' and 'new search' buttons in the results page. I do think that a 'reset form' / 'start new' button would be handy on the search page.

I also want SequenceServer to pre-populate the form with data (query, selected databases, advanced options) from the last search anytime a user visits the search page. This is one of the reasons I want a 'reset form' / 'start new' button on the search page rather on the results page. What do you think about that?

@tomas-pluskal
Copy link
Contributor Author

A "reset form" button at the search page would be good, too, I agree. But IMHO the "edit search" / "new search" buttons on the results page are quite essential. The function of the browser's back button can be tricky to define in a platform- and browser-independent manner. Also, consider that people might want to integrate sequenceserver with their other systems and may therefore want to submit searches to sequenceserver directly from other websites. In that case, they would have no way to reach the sequenceserver search page or modify the search, because the browser back button would take them back to the other website.

Note that NCBI Blast also has an "Edit and Resubmit" button on the results page.

@yeban
Copy link
Collaborator

yeban commented Apr 3, 2019

Sorry, I have not responded because I don't have clarity on the implementation. Give me a couple more days. If you want to send a PR for your markdown request in the meantime, I should be able to review it.

@yeban
Copy link
Collaborator

yeban commented Apr 22, 2020

Back button in the browser now takes you back to a filled search form instead of resetting it. The underlying implementation is such that new and edit search buttons can be easily added, either directly into SequenceServer or by the website that embeds SequenceServer.

I agree with having new and edit search buttons in SequenceServer's results page, however, I don't have the capacity to implement it at the moment - adding new user-interface elements requires considerable thought. We can keep that for a 2.0.x point release or 3.0.

Three things to remember for anyone wanting to implement this, including my future self:

  1. New search: point browser to / in a new tab
  2. Edit search: point browser to /?job_id=my_job_id
  3. SequenceServer stores the last job_id in sessionStorage and transparently adds /?job_id=my_job_id if found. This is why new search should open in a new tab. But it would be easy to add a parameter that bypasses/clears sessionStorage.

@yeban yeban closed this as completed in 111ad66 Nov 26, 2020
yeban added a commit that referenced this issue Nov 30, 2020
Two things: First, clear sessionStorage before sending to search form,
thus fixing a bug in the implementation. Second, clear query string
when search form is reloaded similar to sessionStorage (#481).

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants