From 44ed0a5715aa97a7888bd77791e4a60167dbc283 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 24 Nov 2026 05:14:27 +0200 Subject: [PATCH] Show skeletons during library navigation and align popular track scrolling --- AGENTS.md | 2 + CHANGELOG.md | 6 ++ src/i18n/phrases.rs | 4 +- templates/player/artist_popular_tracks.html | 4 +- templates/player/scripts.html | 48 +++++++++++---- templates/player/search_group_scripts.html | 34 ++++------- templates/player/shell.html | 37 ++++++++++-- templates/player/skeleton_cards.html | 11 ++++ templates/player/skeleton_styles.css | 25 ++++++++ templates/player/skeleton_tracks.html | 10 ++++ templates/player/styles.html | 1 + tests/browser-page-loading.cjs | 66 +++++++++++++++++++++ tests/browser-search-groups.cjs | 10 ++-- tests/federation_navigation.test.cjs | 1 + 14 files changed, 213 insertions(+), 46 deletions(-) create mode 100644 templates/player/skeleton_cards.html create mode 100644 templates/player/skeleton_styles.css create mode 100644 templates/player/skeleton_tracks.html create mode 100644 tests/browser-page-loading.cjs diff --git a/AGENTS.md b/AGENTS.md index a7ed8bb..1e3ae74 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -3,3 +3,5 @@ Give player controls immediate visual feedback. Use short transitions in both directions when menus and dialogs open or close, sections expand or collapse, and items appear or disappear. Match the pace of nearby controls, typically 120–160 ms, and keep the surrounding layout steady. Honor `prefers-reduced-motion` and keep controls responsive to repeated clicks and keyboard input during transitions. + +When a view or section waits for its first data, show a quiet skeleton matching its final layout, including on mobile. Reuse the player's card and track placeholders. Keep existing content visible during background refreshes and pagination. Replace placeholders as soon as data, an empty result, or an error arrives. Announce loading once to assistive technology and keep decorative shapes hidden from it. diff --git a/CHANGELOG.md b/CHANGELOG.md index 379a17b..c3c5dcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ ## v0.16.4 — 2026-11-24 +- Artist, playlist and release pages immediately show the outline of the artwork + and track list while opening. The catalog and initial search use matching + placeholders as well. +- Expanding an artist's popular tracks scrolls to the section heading. + Collapsing the list returns to the top of the artist page. + - Personal settings group language and Last.fm side by side and bring offline storage, the cache limit and saved music together in one compact panel. - Connected devices use compact lists with counts, separate mobile tabs for diff --git a/src/i18n/phrases.rs b/src/i18n/phrases.rs index f921932..fb6effe 100644 --- a/src/i18n/phrases.rs +++ b/src/i18n/phrases.rs @@ -414,6 +414,7 @@ translations! { player_collection_empty: "No playlists yet." , "Плейлистов пока нет."; player_rename_playlist: "Rename Playlist" , "Переименовать плейлист"; player_playlist_name: "Playlist name" , "Название плейлиста"; + player_playlist_unavailable: "Playlist unavailable" , "Плейлист недоступен"; player_playlist_cover: "Playlist cover" , "Обложка плейлиста"; player_edit_playlist_cover: "Edit playlist cover" , "Изменить обложку плейлиста"; player_playlist_cover_auto: "Automatic" , "Авто"; @@ -685,8 +686,9 @@ translations! { player_seen: "seen" , "видели"; player_eta: "eta" , "осталось"; player_loading_history: "Loading history..." , "Загрузка истории..."; - player_loading_release: "Loading release…" , "Загрузка релиза…"; + player_loading_content: "Loading…" , "Загрузка…"; player_release_unavailable: "Release unavailable" , "Релиз недоступен"; + player_artist_unavailable: "Artist unavailable" , "Исполнитель недоступен"; player_federated_result: "Available from the federation" , "Доступно в федерации"; player_loading_more: "Loading more..." , "Загружаю ещё..."; player_failed_load_history: "Failed to load history" , "Не удалось загрузить историю"; diff --git a/templates/player/artist_popular_tracks.html b/templates/player/artist_popular_tracks.html index 2375f12..df48afd 100644 --- a/templates/player/artist_popular_tracks.html +++ b/templates/player/artist_popular_tracks.html @@ -1,6 +1,6 @@
-

{{ t.player_top_tracks }}

+

{{ t.player_top_tracks }}

# {{ t.player_title }} @@ -22,7 +22,7 @@