Bug #4836
closed
[Workbench] Ensure first tab content loads when shown, even if location hash indicated a different tab during initial page render
Added by Tom Clegg about 10 years ago.
Updated about 10 years ago.
Description
These two links show me one collection in the Data collections tab.
However, if I load this page...
...the tab heading says "Data collections (1)" but when I click it, I get a table with name and description headings but no collections.
It looks like the "load content for collections table" trigger fires during initial page load (and only if that tab is active), and should also (instead?) fire when that tab/table is first exposed.
- Description updated (diff)
- Category set to Workbench
- Assigned To set to Brett Smith
- Target version changed from Bug Triage to 2015-01-07 sprint
- Status changed from New to In Progress
At 3233ded:
Diagnosis makes sense, thank you.
However, I suspect the
is(':visible')
test is still needed. Even though it's no longer needed to prevent infinite-scroll content from going into the wrong div, it
is needed to prevent infinite-scroll content from being loaded into an invisible div merely because it would have reached its load threshold if it were visible. For example, with
3233ded, I can do this:
- View my home project (lots of content on collections and jobs/pipelines tabs)
- Click the jobs/pipelines tab (first page of j/p loads)
- Click the collections tab (first page of collections loads)
- Scroll down
- The infinite scroll code notices I have scrolled beyond threshold for the j/p content, and (according to chrome network activity) loads another page of j/p. But this is a (probably) a waste of time, because I'm not even looking at that tab.
Would something like this address the issue, without causing invisible content to be loaded?
Tom Clegg wrote:
Would something like this address the issue, without causing invisible content to be loaded?
That makes sense, thanks for catching that. Implemented with some additional bounds checking in ab6840d1. Ready for another look.
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|commit:1a72b1b7b46d771129c1ec93221a5934fa33ef75.
Also available in: Atom
PDF