Idea #3138
closed[Workbench] UI improvements: Persistent top nav between pages
Description
When navigating inside Workbench (at least sometimes, but ideally always), the top nav should stay stable and the page content area should indicate "loading". (Currently, after clicking a link, the user experiences a delay, then the entire page goes blank, then the next page appears.)
An easy strategy to solve [most of] this problem is to replace regular links with Javascript code to- Display "loading" indication,
- Do an AJAX call to load just the "body-content DIV" part of the desired page,
- Replace the current body-content div with the new one.
The "wiselinks" gem can do most of this work for us, and lets us enable it selectively so we don't unwittingly break a bunch of stuff (which is what will happen if we turn on "turbolinks").
Caveats:- This tends to break the javascript-embedded-in-page pattern (especially (only?) with
content_for :footer_js
). Temporary solution: don't use wiselinks when linking to pages that use that pattern. Long term solution: Don't use the javascript-embedded-in-page pattern. - Also won't play well with "change breadcrumbs depending on which page you're looking at" system
Updated by Radhika Chippada over 10 years ago
- Assigned To set to Radhika Chippada
Updated by Radhika Chippada over 10 years ago
- Status changed from New to In Progress
Updated by Radhika Chippada over 10 years ago
- Story points changed from 1.0 to 2.0
Adding one more story point for learning wiselinks and how to use it.
Updated by Radhika Chippada over 10 years ago
- Target version changed from 2014-07-16 Sprint to 2014-08-06 Sprint
Updated by Ward Vandewege over 10 years ago
- Subject changed from Workbench UI improvements: Persistent top nav between pages to [Workbench] UI improvements: Persistent top nav between pages
Updated by Brett Smith over 10 years ago
Reviewing c3d4b39
- The loading animation does not work intended on my Firefox 30. When a wiselink is clicked, the old content is wiped out and then immediately fades back in. The new content renders whenever it arrives in the browser. One idea: would it maybe help if you fade out on a page:loading event, and fade in on page:always or page:done?
- The documentation indicates that wiselink event handlers must manually fill in analytics details. I wonder if the same is true in our case as well—especially since the branch moves
piwik_tracking_tag
to the page head, where it won't be reloaded when wiselinks are followed. Is there any way for us to be sure that this branch doesn't interfere with analytics?
Thanks.
Updated by Radhika Chippada over 10 years ago
- Status changed from In Progress to Resolved
When wiselinks is initialized, selection.js is not working. Tom and I discussed this. According to Tom, we want to stop using selection.js very soon. Hence, we do not want to invest time now to make selection.js to work when wiselinks is on. Hence, for the time being, I commented out wiselinks object initialization. We will turn it on when we resolve the selection.js issue.