-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix: timeline scroll after navigate #23664
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
Conversation
| const isDirectTimelineLoad = isDirectNavigation && !isAssetViewerPage; | ||
| const isNavigatingFromAssetViewer = !isDirectNavigation && hasNavigatedToOrFromAssetViewer; | ||
| const scrollToAssetQueryParam = isDirectTimelineLoad || isNavigatingFromAssetViewer; | ||
| void scrollAfterNavigate({ scrollToAssetQueryParam }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@midzelis this is quite invasive. I couldn't find any scenario where we don't want to scroll. Could you explain in which case we don't want to scroll?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine always attempting to scroll to query param for all timeline/asset-viewer routes if it works and solves the problem.
This is less important since #22838 was merged. Previously, if you had scrolled when reloading the timeline due to a browser back or asset-viewer back-arrow, and the asset you were viewing was mid-viewport, if you had scrolled again to that asset, it would always move the asset to the top/left of the viewport, moving it away from its current mid-viewport position.
However, there is still one place where you don't really want to scroll - and thats on direct loads of asset-viewer. (i.e. /photos/<id>?at=<id>) - that may be a bit contrived, because you'd never really want to specify an ?at= param on the asset-viewer routes, but because the asset-viewer loads literally on top of the timeline components, this might have caused issues.
The bigger problem is the fact that several timebucket API calls, memories API calls, etc are called on asset-viewer routes - which are completely invisible behind the asset-viewer. But thats a task for another day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh got it that makes sense. Then I'd like to go with this solution for now. And yeah, the asset viewer only being a full screen overlay makes a lot of things kind of annoying; definitely warrants a larger discussion eventually
|
Preview environment has been removed. |
alextran1502
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and worked well
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/immich-app/immich-machine-learning](https://github.com/immich-app/immich) | minor | `v2.2.3` -> `v2.3.1` | | [ghcr.io/immich-app/immich-server](https://github.com/immich-app/immich) | minor | `v2.2.3` -> `v2.3.1` | --- ### Release Notes <details> <summary>immich-app/immich (ghcr.io/immich-app/immich-machine-learning)</summary> ### [`v2.3.1`](https://github.com/immich-app/immich/releases/tag/v2.3.1) [Compare Source](immich-app/immich@v2.3.0...v2.3.1) ##### v2.3.1 ##### Hot fixes Fixed an issue where the new version notification pop-up causes the web app to enter a rendering loop and freeze up. > \[!IMPORTANT] > We encourage all users to update to this version to avoid the issue that will happen when the next minor update is available, i.e., `v2.4.0` ##### What's Changed ##### 🐛 Bug fixes - fix: supporter badge by [@​jrasm91](https://github.com/jrasm91) in [#​24012](immich-app/immich#24012) - fix: new update notification cause rendering loop by [@​alextran1502](https://github.com/alextran1502) in [#​24013](immich-app/immich#24013) **Full Changelog**: <immich-app/immich@v2.3.0...v2.3.1> ### [`v2.3.0`](https://github.com/immich-app/immich/releases/tag/v2.3.0) [Compare Source](immich-app/immich@v2.2.3...v2.3.0) ##### v2.3.0 *Loa loa loa, the stock is running low on [Retro DVD ](https://immich.store/products/immich-retro)**📀**! If you want to get one for yourself, you still can, but once this batch is gone, we won’t be making any more, **EVER!** So get one while you can from [immich.store](https://immich.store/)!* <img alt="image" src="https://github.com/user-attachments/assets/f5977e5f-aabe-4c7a-a8d3-ee44b43b0f15" /> > \[!IMPORTANT]\ > We will start the work on removing the old mobile timeline soon. If you are still using the old timeline, please make sure to switch to the new timeline. If this message does not make sense to you, you can ignore it as you are already on the new timeline ##### Highlights Welcome to the release `v2.3.0` of Immich. This version comes with enhancements to the OCR feature and many bug fixes. This release also introduces foundational support for workflows and an application restore mechanism directly in the web UI. Let’s dive into some of the highlights below - OCR Improvements - Add/move action in mobile app - Delete synchronization - Android - Notable fixes: app freezes on resume on iOS - Sneak peek: Maintenance mode and workflow ##### Add/move action in mobile app The asset viewer in the mobile app now includes an “Add to” button that lets you quickly add an asset to an album, the locked folder, or the archive. Thanks [@​happychriss](https://github.com/happychriss)! <p align="center"> <img width="300" alt="Tapping the Add to button presents a menu to add/move an asset" src="https://github.com/user-attachments/assets/21327e0b-ae5f-43b2-9f44-b75655895852" /> </p> ##### OCR Improvement This release includes several enhancements to the OCR feature. There are now language-specific OCR model variants, extending support to Greek, Korean, Russian, Belarusian, Ukrainian, Thai, and languages using the Latin script. All variants (including the existing models) support English as well. There is also an English-only model that performs better for libraries where multilingual support is not needed. To switch to one of these models, you can navigate to the [OCR settings](https://my.immich.app/admin/system-settings?isOpen=machine-learning+ocr), choose the relevant model, save, then re-run OCR on all assets through the [Job Status](https://my.immich.app/admin/jobs-status) page. <p align="center"> <img width="800" alt="image" src="https://github.com/user-attachments/assets/86008221-4116-43d3-bd0d-f954e0e1a83a" /> </p> The OCR information can now be viewed by toggling a button in the web viewer. You can hover the mouse over the text and copy it. <p align="center"> <img width="500" alt="image" src="https://github.com/user-attachments/assets/693bcfd0-f4f0-40c1-a292-403b04166514" /> </p> ##### Delete synchronization on Android. This release restores the previous mechanism for synchronizing the deletion action between the web and the mobile app. In addition to putting the asset in Immich’s trash bin, the mechanism also puts the deleted asset in the device’s trash system when the app opens. The mechanism has been reworked to align with the new data sync mechanism in the mobile app. You can enable the mechanism in the `App Settings > Advanced > Sync Remote Deletions` <p align="center"> <img width="400" alt="image" src="https://github.com/user-attachments/assets/60d3f53d-a5f8-4235-944d-0e2e80040148" /> </p> ##### Notable fixes: app freezes on resume on iOS Previously, iOS background tasks, such as local or remote data sync and background uploads, could abruptly terminate database operations when the iOS’s background time expires, leaving the database lock unreleased. It leads to an annoying symptom: the app appears to freeze when opening from the background, requiring a hard restart (swipe up to close, then reopen) to regain access to the database. The bug happened sporadically and was incredibly hard to track down. Thanks to the relentless pursuit of the bug, we believe it has been caught through our extensive testing. Please let us know if you are still getting “bugged” by this one in the new version. ##### Sneak peek: Maintenance mode and workflow We can’t contain the excitement to share two exciting items in the work, which have some portions already merged into the server, and are ready to be built upon ##### Maintenance mode This mode will allow the admin to put the server into a state where no one can access it without entirely shutting it down. This paves the way for restoring the server from a previous point in time directly from the web UI, no more fidgeting with the terminal. <https://github.com/user-attachments/assets/26aa5f7f-5e5f-45b5-aa89-347325f10f41> ##### Workflow The foundation of workflows and plugins also made its way to the server; the UI is being worked on. This feature will enable many more custom use cases that are not available in the core application. The community can write custom plugins and share them. We are very excited to see this happening faster than anticipated. Below is a screenshot of how the feature could look. <p align="center"> <img width="600" height="4574" alt="image" src="https://github.com/user-attachments/assets/c0fccc92-6d9b-41e9-b271-574568425ba3" /> <img width="600" height="1822" alt="image" src="https://github.com/user-attachments/assets/c8991763-cd45-4c1e-90ad-5a1179eef789" /> </p> ##### What's Changed ##### 🚀 Features * feat: Add random memories resource by @​jpg0 in immich-app/immich#20025 * feat(mobile): Quick date picker in the search page by @​exelix11 in immich-app/immich#22653 * feat: workflow foundation by @​alextran1502 in immich-app/immich#23621 * feat(mobile): add to album from asset viewer by @​happychriss in immich-app/immich#23608 * feat: maintenance mode by @​insertish in immich-app/immich#23431 * feat(mobile): location edit from asset viewer by @​bwees in immich-app/immich#23925 * feat: timeline e2e tests by @​midzelis in immich-app/immich#23895 * feat: show OCR bounding box by @​alextran1502 in immich-app/immich#23717 ##### 🌟 Enhancements * fix(web): add URLs to results in large files utility by @​Snowknight26 in immich-app/immich#23617 * feat(ml): add preload and fp16 settings for ocr by @​mertalev in immich-app/immich#23576 * feat(ml): multilingual ocr by @​mertalev in immich-app/immich#23527 * feat(mobile): Show lens model information in the asset viewer detail panel by @​fabianbees in immich-app/immich#23601 * feat: lazy load thumbnails on people and place list by @​lukashass in immich-app/immich#23682 * feat: make memories slideshow duration configurable by @​meesfrensel in immich-app/immich#22783 * feat(mobile): chat-style for asset activity view by @​idubnori in immich-app/immich#23347 * feat: show update version info by @​alextran1502 in immich-app/immich#23698 * feat(mobile): album activity deep link by @​idubnori in immich-app/immich#23737 * feat(web): animate gifs on hover by @​meesfrensel in immich-app/immich#23198 * feat(web): disable searching by disabled features by @​meesfrensel in immich-app/immich#23798 * feat: library details page by @​danieldietzler in immich-app/immich#23908 * feat(web): always view original of animated images by @​meesfrensel in immich-app/immich#23842 * feat: add originalPath for external library assets in dedupe by @​kprkpr in immich-app/immich#23710 ##### 🐛 Bug fixes * feat: exif medium tests by @​jrasm91 in immich-app/immich#23561 * fix(web): fix timezone dropdown for timestamps lacking milliseconds by @​skatsubo in immich-app/immich#23615 * fix(web): "select all" button in trash and permanently deleted count by @​Yonyc in immich-app/immich#23594 * fix: fully sync local library on app restart by @​alextran1502 in immich-app/immich#23323 * fix: check if unmetered instead of wifi by @​shenlong-tanwen in immich-app/immich#23380 * fix(mobile): Add fade-in to asset viewer transition by @​goalie2002 in immich-app/immich#23692 * fix(web): i18n for admin>users>sessions by @​meesfrensel in immich-app/immich#23756 * feat: opt-in sync of deletes and restores from web to Android (beta timeline) by @​PeterOmbodi in immich-app/immich#20473 * fix(mobile): Set dynamic height of actions row in BottomSheet by @​vitoksmile in immich-app/immich#23755 * fix(mobile): Hide download button in asset viewer "immersive mode" by @​goalie2002 in immich-app/immich#23720 * fix(mobile): sync album and asset activity state when add/remove asset level activity by @​idubnori in immich-app/immich#23484 * fix(server): properly handle HEAD requests to SSR paths by @​dav-wolff in immich-app/immich#23788 * fix(web): make sliding window cover all visible space to show small number of assets by @​meesfrensel in immich-app/immich#23796 * refactor: shared links modals by @​danieldietzler in immich-app/immich#23803 * chore: bump background_downloader by @​shenlong-tanwen in immich-app/immich#23839 * fix(server): include the previous year in memories for January 1, 2, 3 by @​skatsubo in immich-app/immich#23832 * fix: timeline scroll after navigate by @​danieldietzler in immich-app/immich#23664 * fix: prefer filename from body over path in mime validation by @​shenlong-tanwen in immich-app/immich#23810 * fix(web): keep album timeline when selecting cover by @​roadev in immich-app/immich#23819 * fix: word wrap on custom link preview by @​100daysummer in immich-app/immich#23942 * fix(mobile): delete from device warning shows incorrectly by @​YarosMallorca in immich-app/immich#23935 * fix: deep link to last asset by @​midzelis in immich-app/immich#23920 * fix: null dereference when canceling bucket in album by @​midzelis in immich-app/immich#23924 * fix: incorrect header height calculation in estimated month height by @​midzelis in immich-app/immich#23923 * chore: update drift by @​alextran1502 in immich-app/immich#23877 * chore: reset remote sync on app update by @​shenlong-tanwen in immich-app/immich#23969 * fix(server): copy relevant panorama tags to preview image by @​meesfrensel in immich-app/immich#23953 * fix: unarchive action doesn't update archive page by @​midzelis in immich-app/immich#23987 ##### 📚 Documentation * chore: update config.json example by @​bo0tzz in immich-app/immich#23471 * fix(docs): bump docs for PG versions by @​mmomjian in immich-app/immich#23714 * feat: endpoint descriptions by @​jrasm91 in immich-app/immich#23813 * feat: endpoint versioning by @​jrasm91 in immich-app/immich#23858 * chore: include link to discord server when referencing contribution channel by @​Hritik14 in immich-app/immich#23728 * fix(docs): update Readme links by @​mmomjian in immich-app/immich#23959 ##### 🌐 Translations * chore(web): update translations by @​weblate in immich-app/immich#23449 ##### New Contributors * @​FreeWind6 made their first contribution in immich-app/immich#23627 * @​Yonyc made their first contribution in immich-app/immich#23594 * @​fabianbees made their first contribution in immich-app/immich#23601 * @​exelix11 made their first contribution in immich-app/immich#22653 * @​AlexanderS made their first contribution in immich-app/immich#23838 * @​Hritik14 made their first contribution in immich-app/immich#23728 * @​roadev made their first contribution in immich-app/immich#23819 * @​zebrapurring made their first contribution in immich-app/immich#22145 * @​happychriss made their first contribution in immich-app/immich#23608 * @​insertish made their first contribution in immich-app/immich#23948 * @​100daysummer made their first contribution in immich-app/immich#23942 * @​kprkpr made their first contribution in immich-app/immich#23710 **Full Changelog**: <immich-app/immich@v2.2.3...v2.3.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41LjAiLCJ1cGRhdGVkSW5WZXIiOiI0Mi41LjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImltYWdlIl19--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/2112 Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]>
Fixes #23547