feat(settings): global Advanced Mode toggle + playlist page layout (#556) (#720)

Adds a per-element visibility toggle for the playlist detail page (Add
Songs, Import CSV, Download ZIP, Cache Offline, Suggestions) and reworks
the way uncommon options are surfaced: instead of a per-tab collapsible
group, a global "Advanced" toggle in the Settings header reveals all
`advanced` sub-sections across every tab and marks each one with a small
badge. Sets the pattern up so any future advanced option lives in its
natural tab, gated by the same switch.

- New `advancedSettingsEnabled` boolean on `authStore`
  (UiAppearance slice, persisted with the rest of the store).
- `SettingsSubSection` gains an `advanced?: boolean` prop. Hidden when
  the toggle is off; renders an "Advanced" pill in the header when on.
- Settings header gets a Toggle-Switch next to the search lupe.
- `PersonalisationTab` flattens — Sidebar + Home stay always visible;
  Artist sections, Queue Toolbar, and the new Playlist layout get
  `advanced` and disappear by default. `PersonalisationAdvancedGroup`
  component + CSS removed.
- New `playlistLayoutStore` (Zustand + persist, items[{id,visible}] +
  rehydrate sanitize) following the queueToolbarStore pattern.
- `PlaylistHero` and `PlaylistSuggestions` gate the four toolbar buttons
  and the suggestions rail on the store directly.
- One-time migration in MainApp on mount: if the user had opened the
  old per-tab Advanced group (`psysonic_personalisation_advanced_open
  === 'true'`) OR already customised any of the three sub-sections,
  Advanced Mode auto-enables on first launch. Idempotent via a
  localStorage flag; legacy key removed afterwards.
- New i18n keys `settings.advancedMode`, `settings.advancedModeTooltip`,
  `settings.advancedBadge`, `settings.playlistLayout*` in all 9 locales.

Reuses kveld9's design from PR #556; not merged because the locale split
landed afterwards. Credited under the existing kveld9 entry in
settingsCredits.ts.

Co-authored-by: Kveld. <kveld912@proton.me>
This commit is contained in:
Frank Stellmacher
2026-05-15 15:55:11 +02:00
committed by GitHub
parent e1283f4068
commit 651a3f276a
24 changed files with 404 additions and 39 deletions
+6
View File
@@ -270,6 +270,12 @@ export const settings = {
artistLayoutSimilar: 'Ähnliche Künstler*innen',
artistLayoutAlbums: 'Alben',
artistLayoutFeatured: 'Auch enthalten auf',
playlistLayoutTitle: 'Playlist-Seitenlayout',
playlistLayoutDesc: 'Einzelne Elemente auf der Playlist-Seite ein- oder ausblenden.',
playlistLayoutReset: 'Zurücksetzen',
advancedMode: 'Erweitert',
advancedModeTooltip: 'Erweiterte Optionen in allen Settings-Tabs anzeigen. Community-Beiträge, die nicht zwingend der Design-Philosophie der Maintainer von Psysonic entsprechen.',
advancedBadge: 'Erweitert',
sidebarDrag: 'Ziehen zum Umsortieren',
sidebarFixed: 'Immer sichtbar',
randomNavSplitTitle: 'Mix-Navigation aufteilen',
+6
View File
@@ -273,6 +273,12 @@ export const settings = {
artistLayoutSimilar: 'Similar artists',
artistLayoutAlbums: 'Albums',
artistLayoutFeatured: 'Also featured on',
playlistLayoutTitle: 'Playlist page layout',
playlistLayoutDesc: 'Show or hide individual elements on the playlist page.',
playlistLayoutReset: 'Reset to default',
advancedMode: 'Advanced',
advancedModeTooltip: 'Show advanced options across all Settings tabs. Community contributions that do not necessarily reflect the design philosophy of the Psysonic maintainers.',
advancedBadge: 'Advanced',
sidebarDrag: 'Drag to reorder',
sidebarFixed: 'Always visible',
randomNavSplitTitle: 'Split Mix navigation',
+6
View File
@@ -270,6 +270,12 @@ export const settings = {
artistLayoutSimilar: 'Artistas similares',
artistLayoutAlbums: 'Álbumes',
artistLayoutFeatured: 'También presente en',
playlistLayoutTitle: 'Diseño de la página de playlists',
playlistLayoutDesc: 'Mostrar u ocultar elementos individuales en la página de playlists.',
playlistLayoutReset: 'Restablecer a predeterminado',
advancedMode: 'Avanzado',
advancedModeTooltip: 'Mostrar opciones avanzadas en todas las pestañas de ajustes. Aportes de la comunidad que no reflejan necesariamente la filosofía de diseño de los mantenedores de Psysonic.',
advancedBadge: 'Avanzado',
sidebarDrag: 'Arrastra para reordenar',
sidebarFixed: 'Siempre visible',
randomNavSplitTitle: 'Dividir navegación Mix',
+6
View File
@@ -268,6 +268,12 @@ export const settings = {
artistLayoutSimilar: 'Artistes similaires',
artistLayoutAlbums: 'Albums',
artistLayoutFeatured: 'Apparaît aussi sur',
playlistLayoutTitle: 'Mise en page de la playlist',
playlistLayoutDesc: 'Afficher ou masquer des éléments individuels sur la page de la playlist.',
playlistLayoutReset: 'Réinitialiser',
advancedMode: 'Avancé',
advancedModeTooltip: 'Afficher les options avancées dans tous les onglets des paramètres. Contributions de la communauté qui ne reflètent pas nécessairement la philosophie de conception des mainteneurs de Psysonic.',
advancedBadge: 'Avancé',
sidebarDrag: 'Glisser pour réorganiser',
sidebarFixed: 'Toujours visible',
randomNavSplitTitle: 'Diviser la navigation Mix',
+6
View File
@@ -267,6 +267,12 @@ export const settings = {
artistLayoutSimilar: 'Lignende artister',
artistLayoutAlbums: 'Album',
artistLayoutFeatured: 'Også med på',
playlistLayoutTitle: 'Sideoppsett for spilleliste',
playlistLayoutDesc: 'Vis eller skjul individuelle elementer på spillelistesiden.',
playlistLayoutReset: 'Tilbakestill til standard',
advancedMode: 'Avansert',
advancedModeTooltip: 'Vis avanserte alternativer i alle innstillinger-faner. Bidrag fra fellesskapet som ikke nødvendigvis gjenspeiler design-filosofien til Psysonic-vedlikeholderne.',
advancedBadge: 'Avansert',
sidebarDrag: 'Dra for å endre rekkefølge',
sidebarFixed: 'Alltid synlig',
randomNavSplitTitle: 'Del Mix-navigasjon',
+6
View File
@@ -268,6 +268,12 @@ export const settings = {
artistLayoutSimilar: 'Soortgelijke artiesten',
artistLayoutAlbums: 'Albums',
artistLayoutFeatured: 'Ook te horen op',
playlistLayoutTitle: 'Afspeellijst pagina-indeling',
playlistLayoutDesc: 'Individuele elementen op de afspeellijstpagina tonen of verbergen.',
playlistLayoutReset: 'Standaard herstellen',
advancedMode: 'Geavanceerd',
advancedModeTooltip: 'Toon geavanceerde opties in alle instellingstabbladen. Bijdragen van de community die niet noodzakelijk de ontwerpfilosofie van de Psysonic-onderhouders weerspiegelen.',
advancedBadge: 'Geavanceerd',
sidebarDrag: 'Slepen om te herordenen',
sidebarFixed: 'Altijd zichtbaar',
randomNavSplitTitle: 'Mix-navigatie splitsen',
+6
View File
@@ -273,6 +273,12 @@ export const settings = {
artistLayoutSimilar: 'Artiști similari',
artistLayoutAlbums: 'Albume',
artistLayoutFeatured: 'Prezentat și pe',
playlistLayoutTitle: 'Aspect pagină playlist',
playlistLayoutDesc: 'Afișează sau ascunde elemente individuale pe pagina playlistului.',
playlistLayoutReset: 'Resetare la implicit',
advancedMode: 'Avansat',
advancedModeTooltip: 'Afișează opțiuni avansate în toate filele de setări. Contribuții ale comunității care nu reflectă neapărat filozofia de design a mentenanților Psysonic.',
advancedBadge: 'Avansat',
sidebarDrag: 'Trage pentru a reordona',
sidebarFixed: 'Mereu vizibil',
randomNavSplitTitle: 'Navigare Mix împărțită',
+6
View File
@@ -284,6 +284,12 @@ export const settings = {
artistLayoutSimilar: 'Похожие исполнители',
artistLayoutAlbums: 'Альбомы',
artistLayoutFeatured: 'Также участвует в',
playlistLayoutTitle: 'Макет страницы плейлиста',
playlistLayoutDesc: 'Показать или скрыть отдельные элементы на странице плейлиста.',
playlistLayoutReset: 'Сбросить',
advancedMode: 'Дополнительно',
advancedModeTooltip: 'Показывать расширенные параметры во всех вкладках настроек. Вклады сообщества, которые не обязательно соответствуют дизайн-философии мейнтейнеров Psysonic.',
advancedBadge: 'Дополнительно',
sidebarDrag: 'Перетащите для порядка',
sidebarFixed: 'Всегда показывать',
randomNavSplitTitle: 'Разделить навигацию микса',
+6
View File
@@ -268,6 +268,12 @@ export const settings = {
artistLayoutSimilar: '相似艺术家',
artistLayoutAlbums: '专辑',
artistLayoutFeatured: '也参与了',
playlistLayoutTitle: '播放列表页面布局',
playlistLayoutDesc: '在播放列表页面上显示或隐藏各个元素。',
playlistLayoutReset: '重置为默认',
advancedMode: '高级',
advancedModeTooltip: '在所有设置选项卡中显示高级选项。由社区贡献,未必体现 Psysonic 维护者的设计理念。',
advancedBadge: '高级',
sidebarDrag: '拖动以重新排序',
sidebarFixed: '始终显示',
randomNavSplitTitle: '拆分混音导航',