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

Lightbox infinite scrolling improvements #3894

Merged

Conversation

DingDongSoLong4
Copy link
Collaborator

These are a few improvements to the lightbox, mostly to behaviour when using "infinite scrolling" (ie a touchpad or a mouse with a smooth wheel rather than discrete steps).

Detecting whether infinite scrolling is being used is done in a bit of a hacky way, but it seems to work well enough with my testing (a touchpad on a macbook). If infinite scrolling, then zooming and panning now takes the deltaY values associated with the scroll event into account, rather than zooming/panning by a fixed value for every single event, which was causing scrolling to effectively be super sensitive since infinite scrolling sends hundreds of events in quick succession.

It's still a bit finicky, and different browsers and setups are going to behave differently, but I've tried my best to make it work as sensibly as possible. Feedback and testing with such different setups is welcome.

When infinite scrolling is not detected, scrolling should should behave as before.

Then I've added a fairly rudimentary "snap to 1" effect, where if the zoom level is set close to 1 it will be set to exactly 1. Also there's now a minimum zoom level of 10%, which prevents the image from becoming extremely tiny (which can happen when scrolling quickly on a trackpad) thus making it difficult to zoom back out again.

@WithoutPants WithoutPants added the improvement Something needed tweaking. label Sep 17, 2023
@WithoutPants WithoutPants added this to the Version 0.23.0 milestone Sep 17, 2023
@WithoutPants WithoutPants merged commit 81f39bc into stashapp:develop Sep 18, 2023
2 checks passed
@DingDongSoLong4 DingDongSoLong4 deleted the lightbox-infinite-scrolling branch September 19, 2023 05:58
Dankonite added a commit to Dankonite/stash that referenced this pull request Sep 25, 2023
commit 165528f
Author: Maista <131594657+Maista6969@users.noreply.github.com>
Date:   Mon Sep 25 05:05:24 2023 +0200

    Fix false positive mismatch in Movie Scrape dialog (stashapp#4144)

    * Fix false positive mismatch in Movie Scrape dialog

    Scraping a movie by URL would show a difference in duration because the
    persisted value of duration was converted to HH:MM:SS while the newly
    scraped value was displayed without formatting: this makes sense because
    the newly scraped value is just a string and so could be anything

    This adds a check to see if the string is a number and converts it to
    HH:MM:SS format if possible

    * Fallback to original value if not a number

    ---------

    Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>

commit 9577600
Author: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
Date:   Mon Sep 25 12:27:20 2023 +1000

    Gallery URLs (stashapp#4114)

    * Initial backend changes
    * Fix unit tests
    * UI changes
    * Fix missing URL filters

commit a369e39
Author: Maista <131594657+Maista6969@users.noreply.github.com>
Date:   Mon Sep 25 04:25:24 2023 +0200

    Allow scene scrapers to return full movie data (stashapp#4147)

    Movies scraped from the scene scrape dialog can now create full movies
    just like the movie scrape dialog albeit without the helpful preview

commit bba60cc
Author: Flashy78 <90150289+Flashy78@users.noreply.github.com>
Date:   Sun Sep 24 19:24:08 2023 -0700

    Fix width of image selection arrow div (stashapp#4142)

commit ce55392
Author: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com>
Date:   Mon Sep 25 03:55:36 2023 +0200

    PerformerSelect Tagger bugfixes (stashapp#4148)

    * Fix Tagger PerformerSelect active highlight
    * Clear select on skip
    * Add back react-select className

commit 22350d3
Author: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
Date:   Mon Sep 25 11:53:47 2023 +1000

    Filter migration fix (stashapp#4151)

    * Exclude value for is null/not null

    Also includes changes to the error message in the migration to include the filter string.

    * Ignore null when setting from encoded criterion

commit 9f5bcca
Author: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
Date:   Mon Sep 25 09:35:55 2023 +1000

    Fix lightbox fullscreen issues (stashapp#4149)

    * Improve lightbox context hook
    * Prevent fullscreen drop while loading
    * Fix close not working from fullscreen

commit 462943a
Author: Flashy78 <90150289+Flashy78@users.noreply.github.com>
Date:   Thu Sep 21 14:24:06 2023 -0700

    Help text for animated image previews (stashapp#4139)

commit 636b0a3
Author: elkorol <57588838+elkorol@users.noreply.github.com>
Date:   Wed Sep 20 05:08:00 2023 +0100

    Add Icons to tags if they have parent/child tags (stashapp#3931)

    * Add Icons to tags if they have parent/child tags
    * Refactor TagLink
    ---------
    Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>

commit 36e9ed7
Author: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com>
Date:   Wed Sep 20 03:15:48 2023 +0200

    Fix bulk tagger again (stashapp#4133)

    * Add ForEndpoint method
    * Fix typo in schema 48 migration

commit 7ba7df0
Author: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com>
Date:   Wed Sep 20 03:11:27 2023 +0200

    Fix bulk movie update (stashapp#4130)

commit 3aa3515
Author: yoshnopa <40072150+yoshnopa@users.noreply.github.com>
Date:   Tue Sep 19 01:32:59 2023 +0200

    Allow Autoplay when loading the site first time (stashapp#4131)

commit 81f39bc
Author: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com>
Date:   Tue Sep 19 01:31:34 2023 +0200

    Lightbox infinite scrolling improvements (stashapp#3894)

commit 62173a9
Author: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com>
Date:   Mon Sep 18 01:39:56 2023 +0200

    Fix scene merge nil dereference (stashapp#4119)

commit 0b7dcbe
Author: Maista <131594657+Maista6969@users.noreply.github.com>
Date:   Fri Sep 15 01:08:55 2023 +0200

    Update htmlquery dependency (stashapp#4126)

commit f51ac81
Author: DrDaveUK <dr-dave@outlook.com>
Date:   Tue Sep 12 07:46:36 2023 +0100

    Scene Duplicate Checker UI & Feature Improvement (stashapp#4006)

    * UI Update to show which file is being deleted
    Added Selection dropwdown
    Added checkbox to ensure that the codecs are the same within the group

    * Refactor size options
    * Convert select box to dropdown
    * Internationalisation
    ---------
    Co-authored-by: Steve Enderby <vpn-enderbys@capitatflpp.onmicrosoft.com>
    Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>

commit a25286b
Author: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
Date:   Tue Sep 12 13:31:53 2023 +1000

    Multiple image URLs (stashapp#4000)

    * Backend changes - ported from scene impl
    * Front end changes
    * Refactor URL mutation code

commit 9f4d0af
Author: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com>
Date:   Tue Sep 12 02:53:32 2023 +0200

    Filter criterion fixes (stashapp#4090)

    * Reorder
    * Remove PhashDuplicateCriterion
    * Improve DurationInput
    * Register abloop outside of player init function
    * Remove none criterion
    * Typing improvements
    * Move makeCriteria to ListFilterModel
    * Separate PathCriterionOption
    * Add makeCriterion arg to StringCriterionOption
    * Remove unused options args
    * Add DurationCriterionOption
    * Use createNumberCriterionOption
    * Add StringBooleanCriterion

commit 0d13eec
Author: MrX292 <42774880+MrX292@users.noreply.github.com>
Date:   Tue Sep 12 02:37:49 2023 +0200

    Update Configuration.md (stashapp#4108)

commit 4a9fdc8
Author: its-josh4 <74079536+its-josh4@users.noreply.github.com>
Date:   Mon Sep 11 17:36:48 2023 -0700

    Remove vendored dependencies (stashapp#4110)

commit b36aa74
Author: its-josh4 <74079536+its-josh4@users.noreply.github.com>
Date:   Sun Sep 10 21:43:42 2023 -0700

    Fixed: CopyFile not working (stashapp#4104)

commit da38ec0
Author: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
Date:   Mon Sep 11 14:41:13 2023 +1000

    Fix rating and country filters (stashapp#4105)

    * Fix country criterion
    * Fixing rating criterion

commit 798db1a
Author: its-josh4 <74079536+its-josh4@users.noreply.github.com>
Date:   Sun Sep 10 19:48:39 2023 -0700

    Improve error reporting when moving a transcoded file fails (stashapp#4101)

commit 06d7630
Author: its-josh4 <74079536+its-josh4@users.noreply.github.com>
Date:   Sun Sep 10 19:46:21 2023 -0700

    Do not log ECONNRESET errors when serving transcoded video files (stashapp#4099)

commit 953867f
Author: CJ <72030708+Teda1@users.noreply.github.com>
Date:   Sun Sep 10 21:45:58 2023 -0500

    Adjust compact details (stashapp#4098)

commit f237a58
Author: yoshnopa <40072150+yoshnopa@users.noreply.github.com>
Date:   Mon Sep 11 04:39:55 2023 +0200

    Frontpage Mobile Fix (stashapp#4057)

    Change CSS To show Correct dimensions on Mobile

commit 24e4719
Author: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com>
Date:   Mon Sep 11 04:24:15 2023 +0200

    Model refactor, part 2 (stashapp#4092)

    * Move conversions into changesetTranslator
    * Improve mutation error messages
    * Use models.New and models.NewPartial everywhere
    * Replace getStashIDsFor functions
    * Remove ImageCreateInput
    * Remove unused parameters
    * Refactor matching functions
    ---------
    Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>

commit cf3301c
Author: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
Date:   Mon Sep 11 10:50:24 2023 +1000

    Handle equality when scraping scene performers (stashapp#4094)

commit 50c4ac9
Author: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com>
Date:   Fri Sep 8 03:33:16 2023 +0200

    Thumbnail scrubber improvements (stashapp#4081)

    * Remove deps from useDebounce hook
    * Add useThrottle hook
    * Throttle preview scrubber
    * Scrubber improvements
halkeye pushed a commit to halkeye/stash that referenced this pull request Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Something needed tweaking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants