SETI / rms-opus

PDS OPUS - Outer Planets Data Search Tool
Apache License 2.0
10 stars 7 forks source link

Remember nav bar clicks during normalizeinput so we can process them later #978

Closed rfrenchseti closed 4 years ago

rfrenchseti commented 4 years ago

Description of changes:

Previously we simply turned off clicks for the browse tab when calling normalizeinput, since if the inputs came back invalid we didn't want to switch tabs. Now we remember which tab the user clicked on, and when normalizeinput is done we jump to that tab, if any. Note we now do this for all tabs, not just browse, so that when the user has an illegal input we don't let them leave the search tab.

Known problems:

None.

juzen2003 commented 4 years ago

One issue: (Only happened when there is a delay that allows user to perform multiple actions between the return of normalize input and switching to browse tab) Here are steps to reproduced the issue:

  1. Add an API (~3000) delay.
  2. Open a range input widget and add another input set to have multiple input sets in the widget.
  3. Type something good in a range input and focus out to click Browse tab, but then move to another input quickly.
  4. In another input set, quickly type something bad.
  5. OPUS will go to browse tab with the search constraints in step 3 (URL with search terms from step 2) but without search constraints from step 4. There will be no image displayed and results will be “?” in browse tab.
  6. And then we will stuck in browse tab, can’t go to any other tabs.
rfrenchseti commented 4 years ago

OK I think I fixed that bug. Please look at the code and try to break it again.