The current behaviour will intersect if the page is scrolled about 90% down
which works okay for a small number of assets, but does not scale well with
large amounts of assets. Instead of relying in proportional values, it may be
more sensible to use a consistent measure for loading more pages. A simple and
sensible suggestion may be to load another page when there is only one more
viewport worth of assets to display. It can be refined and revisited in future,
but it seems to work relatively well in my testing and prevents the issues
which occur with large amounts of assets.
Co-authored-by: Alex <alex.tran1502@gmail.com>
The height of the search results element was unrestricted, which meant that the
asset visibility calculations were completely incorrect. The consequence of
this is that assets which should not have been visible, were. In practical
terms, all assets below the viewport were rendered when they shouldn't have
been which is terrible for performance. Limiting the height of the viewport
fixes that calculation and assets are correctly hidden.
The consequence of limiting the height of the viewport is that the intersector
then incorrectly thought the scroll position was always at the end. This has
been fixed by calculating the position of sliding window against the calculated
asset layout container height.
Co-authored-by: Alex <alex.tran1502@gmail.com>
* refactor: asset-store
* Potential fix for code scanning alert no. 152: Prototype-polluting function
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* 15712: Added keyboard shortcuts for opening add to album modal and highlighting/selecting an album to add to.
* 15712: Re-factored logic from template code into script. Extracted new album button into separate cmponent.
* 15712: Document new keyboard shortucts now that they work everywhere.
* 15712: Extract some constants/helper functions.
* 15712: Missing comma.
* 15712: Pulled logic out into separate unit testable class.
* 15712: Added a unit test.
* 15712: Move the modal back up to keep the github PR happy.
* 15712: PR feedback - renamed typescript files and switch to class bind directive.
* 15712:Move selection modal into correct package.
* 15712: Better naming of module and files.
* 15712: Add asset highlight using arrow keys.
* 15172: Add escape behaviour everywhere.
* 15712: Don't allow highlighting past start or end.
* 15712: Clear the highlight on changes to the component state.
* 15712: Use focus to track highlighted element.
* 15712: Rename highlight -> focussed.
* 15712: Better naming.
* 15712: Cleanup.
* 15712: Cleanup & simplify.
* 15712: bugfix for clicking on button.
* 15712: Cleanup.
* 15712: Rollback unnecessary changes.
* 15712: Add unit test.
* 15712: Add thumbnail unit test.
* 15712: Prettier.
* 15712: Fix merge issue.
* 15712: Add shortcut info.
* 15712: Fix linter.
* Work in progress - super quick asset store->state
* bugfix: deep linking to timeline, on scrub stop
* format, remove stale
* disable test, todo: fix test
* remove unused import
* Fix merge
* lint
* lint
* lint
* Default to non-wasm layout
* lint
* intobs fix
* fix rejected promise
* Review comments, static import wasm
* Back to dynamic
* try top-level-await
* back to the first solution, with more finesse
* comment out wasm for now
* back out the wasm/thumbhash/thumbnail changes
* lint
* Fully remove wasm
* lockfile
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
feat: Added shortcuts, shift-multi select and missing menu options to GalleryViewer (Search, Share, Memories)
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Squashed
* Change strategy - now pre-measure buckets offscreen, so don't need to worry about sub-bucket scroll preservation
* Reduce jank on scroll, delay DOM updates until after scroll
* css opt, log measure time
* Trickle out queue while scrolling, flush when stopped
* yay
* Cleanup cleanup...
* everybody...
* everywhere...
* Clean up cleanup!
* Everybody do their share
* CLEANUP!
* package-lock ?
* dynamic measure, todo
* Fix web test
* type lint
* fix e2e
* e2e test
* Better scrollbar
* Tuning, and more tunables
* Tunable tweaks, more tunables
* Scrollbar dots and viewport events
* lint
* Tweaked tunnables, use requestIdleCallback for garbage tasks, bug fixes
* New tunables, and don't update url by default
* Bug fixes
* Bug fix, with debug
* Fix flickr, fix graybox bug, reduced debug
* Refactor/cleanup
* Fix
* naming
* Final cleanup
* review comment
* Forgot to update this after naming change
* scrubber works, with debug
* cleanup
* Rename scrollbar to scrubber
* rename to
* left over rename and change to previous album bar
* bugfix addassets, comments
* missing destroy(), cleanup
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat: folder view poc
* fix(folder-view): ui modifications
* fix(folder-view): improves utility return types
* fix(folder-view): update getAssetsByOriginalPath
Endpoint now only returns direct children of the path instead of all images in all subfolders. Functions renamed and scoped to "folder", endpoints renamed
* fix(folder-view): improve typing
* fix(folder-view): replaces css with tailwind
* fix(folder-view): includes folders in main panel
* feat(folder-view): folder cache implementation
* fix(folder-view): can now search for absolute paths
* fix(folder-view): sets default sort to alphabetical by filename
* refactor/styling the browser view
* double click to navigate
* folder tree
* use correct side bar icon
* styling when selected
* correct open icon
* folder layout
* return assetReponseDto
* it's alive
* update new api
* more styling for folder tree
* use query params and path viewer
* use arrow up left for parent folder backward navigation
* use arrow up left for parent folder backward navigation
* encode URL
* handle long folder name
* refactor to the view controller
* remove unused code
* clear cache when logout
* cleaning up
* cleaning up web
* clean as new
* clean as new
* pr feedback + show asset name
* add tests
* add tests
* remove generated file
* lint
* revert docker-compose.dev file
* Update server/src/services/view.service.ts
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* Update server/src/services/view.service.ts
Co-authored-by: Jason Rasmussen <jason@rasm.me>
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* Remove asest redirect pages
* Rename route paths to handle optional assetId
* Update old references to new routes
* Load and display asset from all routes that can show assetId
* Add <main> in base layout, update portals to target it
* Wire up updating navigation in response to open/close/prev/next
* Replace events with navigation functions
* Add types to param matcher
* misc cleanup
* Fix reload on /search pages
* Avoid loading bar between photos nav. Delay loading bar by 200ms for all navigations
* Update url for maps routes. Note: on page reload, next/prev is not available
* Dynamically load asset-viewer on map page
* When reloading a url with assetUrl, hide background page to prevent flash during load
* Mostly style, review comments
* Load buckets for assets on demand
* Forgot this update call
* typo
* fix test
* Fix carelessness
* Review comment
* merge main
* remove assets
* fix submodule
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
* feat: hybrid search
* fixing normal search
* building out the query
* okla
* filters
* date
* order by date
* Remove hybrid search endpoint
* remove search hybrid endpoint
* faces query
* search for person
* search and pagination
* with exif
* with exif
* justify gallery viewer
* memory view
* Fixed userId is null
* openapi and styling
* searchdto
* lint and format
* remove term
* generate sql
* fix test
* chips
* not showing true
* pr feedback
* pr feedback
* nit name
* linting
* pr feedback
* styling
* linting
* add unicorn to eslint
* fix lint errors for cli
* fix merge
* fix album name extraction
* Update cli/src/commands/upload.command.ts
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
* es2k23
* use lowercase os
* return undefined album name
* fix bug in asset response dto
* auto fix issues
* fix server code style
* es2022 and formatting
* fix compilation error
* fix test
* fix config load
* fix last lint errors
* set string type
* bump ts
* start work on web
* web formatting
* Fix UUIDParamDto as UUIDParamDto
* fix library service lint
* fix web errors
* fix errors
* formatting
* wip
* lints fixed
* web can now start
* alphabetical package json
* rename error
* chore: clean up
---------
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>