German-BioImaging / webtagging

Extensions to OMERO.web to enhance tagging and searching
http://help.openmicroscopy.org/web-tagging.html
GNU Affero General Public License v3.0
4 stars 6 forks source link

Above max slides of the slider #43

Closed pwalczysko closed 8 years ago

pwalczysko commented 8 years ago

When the maximum of the possible hits is reached (in the screenshotted case 2), then the slider should either stop or be re-stepped so that you cannot slide to 3, 4, 5,... (see second screenshot) screen shot 2016-01-20 at 11 25 42 screen shot 2016-01-20 at 11 25 52

pwalczysko commented 8 years ago

cc @will-moore

dpwrussell commented 8 years ago

I have changed the slider so that the max value is the number of images. So if you go from a dataset with 10 images to a dataset with 2, it will change from 10 to 2, and then back to 10 if you switch back.

The potential issue with this is whether we want to allow the user to filter out all the tags? e.g.

a_b.jpg
b_c.jpg
c_d.dv

In this example, the maximum of the slides would be 3 as there are three images. However, there is no token that is present on all three images so moving the slider to 3 would result in showing no unmapped tokens. The alternative is that I can clip the maximum to be the highest number of occurrences. E.g. in the above example, the maximum would be 2 because the highest count of any token across all images is two (2 'b's, 2 'c's and 2 'jpg's). Thoughts?

will-moore commented 8 years ago

I would just keep the behaviour the same in every case: Max is always the number of images. Users will see that sometimes all of the unmapped tokens get filtered out, but they might even use this as a quick way of seeing if there are any tokens present on all images. At least they will be able to understand how the slider range is calculated, if it always matches the image count. Hmmm - I wonder if the slider is usable on a Dataset with 200 images?!

dpwrussell commented 8 years ago

Changed to that behaviour in ae4e8a850d1cfba1d642b9293c53519b09495b51. There is a minor issue with the slider not updating properly when the slider is in the far left position (1) and a new dataset is selected (default to position 2). This is internal to the slider component, but I will look into it before closing this.

dpwrussell commented 8 years ago

I think this is actually a problem with how the sliders are implemented in the browser. I can see that the range slider component is being updated in the HTML with the correct values, but if the slider is at the far-left, it will get stuck there when choosing another dataset even if the value changes to something else.

I think the is quite minor so I'm inclined to accept that small visual blemish and move on. If it gets fixed in the browsers that is great, but later on we could look at implementing a custom slider that doesn't have this problem, but I definitely don't have time to do that at the moment.

will-moore commented 8 years ago

You're saying that if the slider is in position 1 and you move to a new Dataset then the slider stays at 1, even though the threshold actually goes to default 2? Sounds fine to me, as long as the slider still works OK after that.

dpwrussell commented 8 years ago

Yeah, not much I can do anyway.