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

Thumbnail scrolling #207

Merged
merged 15 commits into from Sep 20, 2018
Merged

Thumbnail scrolling #207

merged 15 commits into from Sep 20, 2018

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Aug 29, 2018

See https://trello.com/c/JLpfTbmW/4-improve-thumbnails-loading-display

Instead of clicking up/down to load more thumbnails, the thumbnail panel is created at the full size (with only the visible thumbnails loaded) and more thumbnails are loaded when we scroll.
There are lots of different cases to handle and a lot has changed so everything needs testing:

  • Expected behaviour: any thumbnails that appear in the panel should be loaded (no empty grey squares).
  • While actually scrolling we don't load thumbnails, since that would load the whole dataset if you scroll fast from one end to the other. Instead, wait until scrolling slows / stops, then load thumbs for visible thumbnails.
  • You can see when loading is happening in the devtools Network tab.
  • In all scenarios below, check thumbs on load, then scroll about, then refresh thumbs (when scrollbar is in various locations).
  • Check that IE works.

Scenarios to test:

  • Single image in 1 or more Datasets, double-clicked in webclient. url like /webclient/img_detail/4413/?dataset=1301
    - Check that thumbs loaded from current parent Dataset (not a different Dataset that the image is in)
    - Try double-clicking images in webclient near the start of the Dataset and at the end. Thumb panel in iviewer should scroll to the show the selected image.
    - Try with a small Dataset (< 5 images) and as large as possible.
    - Remove the ?datasets=ID from the URL and reload. If image is in single Dataset, thumbs should be loaded. If more than 1 Dataset, thumbnail panel hidden.
  • Multiple selected images > Open with iviewer. Url like /iviewer/?images=4402,4403,4404,4405
  • Orphaned image, double-clicked in webclient. e.g. webclient/img_detail/57012/ should hide thumbnail panel.
  • Well - openwith > iviewer. Url /iviewer/?well=148 First image should be selected.
  • Datasets - openwith > iviewer. /iviewer/?dataset=10480 First image selected.

@mtbc
Copy link
Member

mtbc commented Aug 30, 2018

I suspect that dropping IE11 (or not) should be a clear, conscious decision given that we often choose to support old stuff.

@jburel
Copy link
Member

jburel commented Aug 31, 2018

Basic testing:

  • Open dataset with < 10 Images by double-clicking on an image. The correct thumbnails were loaded
  • Open a larger dataset (~80 images) double click on the first image visible thumbnails loaded. Scroll down to the bottom: more visible thumbnails are then loaded. Moving backward forward to load the rest of the thumbnails
  • Repeat the step above but this time double-click on the last image in the dataset. iviewer opens the correct image and the list of thumbnails displayed the portion of the list containing the image

@jburel
Copy link
Member

jburel commented Sep 13, 2018

Testing in Chrome

  • Remove the ?datasets=ID from the URL and reload. If image is in single Dataset, thumbs should be loaded. If more than 1 Dataset, thumbnail panel hidden.
  • Datasets - openwith > iviewer. /iviewer/?dataset=10480 First image selected.
  • Well - openwith > iviewer. Url /iviewer/?well=148 First image should be selected.
  • Orphaned image, double-clicked in webclient. e.g. webclient/img_detail/57012/ should hide thumbnail panel.

This works fine

Multiple selected images > Open with iviewer. Url like /iviewer/?images=4402,4403,4404,4405

If I select all the images in the dataset All the thumbnails are loaded
but If I open the dataset or double click on a thumbnail to open the viewer. Only few thumbnails are loaded.

@jburel
Copy link
Member

jburel commented Sep 13, 2018

I don't think we can drop IE

@jburel
Copy link
Member

jburel commented Sep 13, 2018

Safari:

  • Clicking on well with only one field does not hide the thumbnails panel. It is empty
    pr-207_safari

The problem only shows if the well has one field

@jburel
Copy link
Member

jburel commented Sep 13, 2018

Noticeable loading difference between FF and chrome
In FF I have time to see "Not Found"
even for small dataset

@jburel
Copy link
Member

jburel commented Sep 13, 2018

FF or Vivaldi
Same problem as the one described in #207 (comment)

This time
it does not work for well with multiple fields. (user-1 testImportCellWorksPlate)
pr-2017-ff

@mtbc
Copy link
Member

mtbc commented Sep 13, 2018

@jburel
Copy link
Member

jburel commented Sep 13, 2018

kymograph is correctly displayed cc @pwalczysko
pr-207-kymo

@jburel
Copy link
Member

jburel commented Sep 14, 2018

While testing 5.4.8
Looking at data belonging to another user when that user has not viewed the image
leads to "Not found" in the left-hand panel and empty bird eye view
we should handle such case a bit better

@will-moore
Copy link
Member Author

@jburel Re: "If I select all the images in the dataset All the thumbnails are loaded
but If I open the dataset or double click on a thumbnail to open the viewer. Only few thumbnails are loaded."
As long as all the thumbnails that are visible are loaded then I think this is OK?
I assume that the number of images listed with ?image=1,2,3 is not going to be larger than a safe number of thumbnails to load (e.g. 200, or even more).

@jburel
Copy link
Member

jburel commented Sep 14, 2018

All the thumbnails were loaded even the non visible when I do a selection of images
I probably select ~100

@will-moore
Copy link
Member Author

Also noticed that e.g. http://web-dev-merge.openmicroscopy.org/iviewer/?well=339085 (user-1) doesn't work (no thumbnails or image loaded).

@will-moore
Copy link
Member Author

Re: #207 (comment) The 'Not Found' in this case is the same as previously (not related to this PR). To fix that we could use /webclient/render_thumbnail/ID instead of /webgateway/render_thumbnail. Then we'd get the 'No Image' icon same as webclient?

@will-moore
Copy link
Member Author

Fixed the placeholder "Not Found" while images loading in Firefox.
Also fixed bugs with SPW images in a Well (/webclient/img_detail/ID/) and opening Well directly (/iviewer/?well=ID). In both cases, the thumbnails within the Well should be shown in the thumbnail_slider, even if it's only 1 field (same behaviour as before).

count = 0;
}
this.thumbnails.length = count;
this.thumbnails.fill({'version': 0, 'title': 'unloaded'});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given #207 (comment) is this okay?

@jburel
Copy link
Member

jburel commented Sep 19, 2018

  • Wells with 1 or multiple fields are now correctly displayed in FF, Vivaldi and Safari
  • I also select a large number of images, loading occurred when scrolling down the list

No cover yet: IE testing


/**
* the end index of the displayed thumbnails
* height of slider, so we which thumbs have scrolled into view
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing verb


/**
* @constructor
* @param {Context} context the application context (injected)
* @param {BindingEngine} bindingEngine the BindingEngine (injected)
*/
constructor(context, element, bindingEngine) {
constructor(context, element, bindingEngine, taskQueue) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declare new parameter

/**
* Loads unloaded thumbnails that scrolled into the thumbnail panel
*
* @param {number} scrollTop Current scroll position of the panel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

declare parameter

* Adds thumbnails to then be loaded.
* Adds thumbnails with Image IDs to this.thumbnails array.
* We create a new list from old, replacing the thumbnails (instead of
* modifying the old list) to make sure the changes is observed and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is/are

/**
* Adds thumbnails with Image IDs to this.thumbnails array.
* We create a new list from old, replacing the thumbnails (instead of
* modifying the old list) to make sure the changes is observed and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is/are

* modifying the old list) to make sure the changes is observed and
* UI updates.
*
* @param {Array.<Object>} thumbnails the thumbnails to be added
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thumbnails not a parameter

@jburel
Copy link
Member

jburel commented Sep 20, 2018

Testing in IE 11
it works nicely too

@jburel jburel merged commit 3c4a7cb into ome:master Sep 20, 2018
@jburel jburel added this to the 0.6.0 milestone Nov 14, 2018
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

Successfully merging this pull request may close these issues.

None yet

3 participants