Project

General

Profile

Actions

Story #3138

closed

[Workbench] UI improvements: Persistent top nav between pages

Added by Radhika Chippada over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Target version:
Start date:
07/22/2014
Due date:
% Done:

100%

Estimated time:
(Total: 4.00 h)
Story points:
2.0

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
  1. Display "loading" indication,
  2. Do an AJAX call to load just the "body-content DIV" part of the desired page,
  3. 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

Subtasks 2 (0 open2 closed)

Task #3310: Review branch: 3138-wiselinksResolvedRadhika Chippada07/22/2014

Actions
Task #3345: Remove all uses of :footer_js from workbenchResolvedRadhika Chippada07/22/2014

Actions
Actions #1

Updated by Radhika Chippada over 10 years ago

  • Assigned To set to Radhika Chippada
Actions #2

Updated by Tom Clegg over 10 years ago

  • Description updated (diff)
Actions #3

Updated by Tom Clegg over 10 years ago

  • Description updated (diff)
Actions #4

Updated by Radhika Chippada over 10 years ago

  • Status changed from New to In Progress
Actions #5

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.

Actions #6

Updated by Radhika Chippada over 10 years ago

  • Target version changed from 2014-07-16 Sprint to 2014-08-06 Sprint
Actions #7

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
Actions #8

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.

Actions #9

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.

Actions

Also available in: Atom PDF