marklogic-community / data-explorer

Data Explorer Tool
Other
15 stars 4 forks source link

Usability - Use a load indicator for XHR requests #133

Closed nlaprell closed 6 years ago

nlaprell commented 6 years ago

There should be a visual load indicator when a user triggered XHR is processing so the user has feedback that something is happening. Currently, the UI appears unresponsive when (for example) creating large queries or views, as clicking submit has a 2 - 3 second lag before the navigation is updated.

Proposed solutions:

nlaprell commented 6 years ago

Created a script that tracks XHR calls/completions and toggles the display of a wait cursor while there are outstanding requests. A delay is used to prevent flickering of the cursor or display for very fast responses.

cskeefer commented 6 years ago

As an option, I've used this in the past.

nlaprell commented 6 years ago

Thanks, @cskeefer. This looks solid. The main difference between that and my approach is that what I wrote automatically applies to all requests, while this has to be applied to each $http request or promise individually. There are pros and cons to each, so I created the branch /feature/133-alt-load-indicator which uses this plugin and submitted a pull request/review for feedback on both approaches.

nlaprell commented 6 years ago

Merged into master.