immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
47.3k stars 2.39k forks source link

Page up and page down keys now scroll to top and bottom of page #9446

Closed swishkin closed 4 months ago

swishkin commented 4 months ago

The bug

Page up and page down keys now scroll to top and bottom of page, respectively. Previously, the top two page-lengths could be scrolled in (with these two keys), but now only the very top page and the very bottom of the page can be navigated to using the page up/down keys.

To put it simply, the Page Up and Page down keys are working like Home and End would usually be expected to work.

The OS that Immich Server is running on

Artix Linux

Version of Immich Server

v1.104.0

Version of Immich Mobile App

v1.104.0

Platform with the issue

Your docker-compose.yml content

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ['start.sh', 'immich']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    command: ['start.sh', 'microservices']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    restart: always

volumes:
  model-cache:
networks:
  default:
    name: npm_default
    external: true

Your .env content

DB_DATABASE_NAME=immich
DB_USERNAME=immich
DB_PASSWORD=password
UPLOAD_LOCATION=/home/swishin/docker/immich/uploads/
DB_DATA_LOCATION=/home/swishkin/docker/immich/db/

Reproduction steps

1. Open Immich Timeline view
2. Press Page Down key on keyboard
3. Press Page Up key on keyboard

Instead of scrolling X page lengths down (I think one is typical, somewhat less might be desirable for overlap), the page is scrolled all the way to the bottom, then all the way to the top.

Ideally, this behavior should instead be achieved by hitting Home and End, respectively, while Page Up and Page Down should scroll up (about) one page or down (about) one page.

Relevant log output

[Nest] 7  - 05/13/2024, 8:31:11 PM     LOG [ImmichServer] Immich Server is listening on http://[::1]:3001 [v1.104.0] [PRODUCTION] 
[Nest] 7  - 05/13/2024, 8:31:12 PM     LOG [EventRepository] Websocket Connect:    I87v4p4rhCG-WSmWAAAB
[Nest] 7  - 05/13/2024, 8:40:24 PM     LOG [EventRepository] Websocket Connect:    MJonVBybufOKzYjwAAAD
[Nest] 7  - 05/13/2024, 8:40:38 PM     LOG [EventRepository] Websocket Disconnect: MJonVBybufOKzYjwAAAD
[Nest] 7  - 05/13/2024, 8:40:38 PM     LOG [EventRepository] Websocket Connect:    Is2CrG9lG4dYjc9mAAAF
[Nest] 7  - 05/13/2024, 8:40:57 PM     LOG [EventRepository] Websocket Connect:    Frf1UZzbeXzf0eNnAAAH
[Nest] 7  - 05/13/2024, 8:41:13 PM     LOG [EventRepository] Websocket Connect:    QxuiL9QS3Zo2gb2_AAAJ
[Nest] 7  - 05/13/2024, 9:02:03 PM     LOG [EventRepository] Websocket Disconnect: QxuiL9QS3Zo2gb2_AAAJ
[Nest] 7  - 05/13/2024, 9:02:14 PM     LOG [EventRepository] Websocket Disconnect: Frf1UZzbeXzf0eNnAAAH
[Nest] 7  - 05/13/2024, 9:29:32 PM     LOG [EventRepository] Websocket Disconnect: Is2CrG9lG4dYjc9mAAAF
[Nest] 7  - 05/13/2024, 9:29:32 PM     LOG [EventRepository] Websocket Disconnect: I87v4p4rhCG-WSmWAAAB
[Nest] 7  - 05/13/2024, 10:18:12 PM     LOG [EventRepository] Websocket Connect:    kuFnC7eJJ8DCU8Q3AAAL
[Nest] 7  - 05/13/2024, 10:18:31 PM     LOG [EventRepository] Websocket Disconnect: kuFnC7eJJ8DCU8Q3AAAL
[Nest] 7  - 05/13/2024, 10:25:17 PM     LOG [EventRepository] Websocket Connect:    yljPP0LpiFanCHasAAAN
[Nest] 7  - 05/13/2024, 10:25:23 PM     LOG [EventRepository] Websocket Connect:    Tc5saRpL26gQSyQzAAAP

Additional information

9397 was intended to fix a similar issue, but I'm experiencing a different (unwanted) behavior in its place.

Snowknight26 commented 4 months ago

Removing the PageUp/PageDown shortcuts from shortcutList in asset-grid.svelte and then adding tabindex="0" to the #asset-grid <section> element seems to make this work as expected, though you have to focus on the asset grid first.

9448

swishkin commented 4 months ago

I'm not sure if your merged PR in 1.105.0 is intended to have fixed this issue, but I'm still observing it with my server updated to 1.105.0 and with the web client showing 1.105.0.

Focusing the timeline (clicking in the area surrounding the images) doesn't impact the behavior. Is there something I'm missing?

Snowknight26 commented 4 months ago

No changes have gone out for this yet, as far as I'm aware.

swishkin commented 4 months ago

Thanks, wasn't sure if today's release included changes which were meant to fix this.