Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Above max slides of the slider #43

Closed
pwalczysko opened this issue Jan 20, 2016 · 7 comments
Closed

Above max slides of the slider #43

pwalczysko opened this issue Jan 20, 2016 · 7 comments

Comments

@pwalczysko
Copy link

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
Copy link
Author

cc @will-moore

@dpwrussell dpwrussell changed the title BUG: above max slides of the slider Above max slides of the slider Jan 25, 2016
@dpwrussell dpwrussell added the bug label Jan 25, 2016
@dpwrussell
Copy link
Collaborator

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
Copy link
Contributor

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
Copy link
Collaborator

Changed to that behaviour in ae4e8a8. 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
Copy link
Collaborator

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
Copy link
Contributor

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
Copy link
Collaborator

Yeah, not much I can do anyway.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants