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

Instant update after UI actions #180

Open
ahmedatia opened this issue Feb 10, 2018 · 4 comments
Open

Instant update after UI actions #180

ahmedatia opened this issue Feb 10, 2018 · 4 comments

Comments

@ahmedatia
Copy link

Hello folks,

Thanks a lot for this awesome project.

I'm noticing that most of UI actions are only applied after changing the current view to another one. Examples of that;

  • Click on a lisiting result header to sort result
  • Show / hide recent queries list
  • Delete an item from the recent queries list
  • Mark search query as a favourite one

I find this behavior consistent and this left me wondering; is that on purpose? or am I missing something?

@ScottLouvau
Copy link
Collaborator

Are you talking about when the URL updates or the UI itself? We tried to make the URL update infrequently to reduce the length of the back button history in the browser, but the UI should request and show updates rapidly when the query changes. We only rerun the query about every 250ms as you type so that fast typists don't cause excessive quey load. If you are making changes in the UI and it doesn't update, please let us know which browser you're using and send us some sample steps. Thanks!

@jeffersonking
Copy link
Collaborator

jeffersonking commented Feb 13, 2018 via email

@ahmedatia
Copy link
Author

Thanks Scott and Jeff.

I'm referring to UI updates. This is happening in both FF & Chrome (latest stable release) on Windows 8.1.

Sample One (in both FF & Chrome)

  1. Perform a search query
  2. Click on Site Title or Help icon to switch to the Help view and then return back to the Start view, the most recent search query/queries is not listed in the Recent list
  3. Refresh the page, the most recent queries now appear in the Recent list

Sample Two (in FF)

  1. In home/start view, hover on an item in the Recent list and click "Delete" button
  2. Following the delete action, item still appears in Recent list
  3. Refresh the page or switch the view and then return back to home/start view, the deleted item is now removed from the list.

Using DevTools to monitor/track the updates of "recents" localstorage key, it is not instantly updated following the applied UI action e.g. delete a recent item, mark search query as a favourite one etc...

Please let me know should any further clarifications required.

@jeffersonking
Copy link
Collaborator

Hi Ahmed, thanks for providing those repros!

Regarding sample one: that is a bug. Short term fix is to call mru.push() on when the query is cleared. Longer term fix is likely to simply commit the mru after a fixed timeout, rather than wait for a subsequent event. I will put it on our backlog.

Regarding sample two: I was not able to repro because we don't test in Firefox. However, this issue is likely here: https://github.com/Microsoft/elfie-arriba/blob/6fa8cec2e2194147d1377bed0582a2534a15724f/Arriba/Arriba.Web/js/utilities.js#L104. My guess that is that it should work if you provide the right Event ctor for Firefox.

Hope that helps!

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

No branches or pull requests

3 participants