mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +00:00
feat(settings): results-only search, keyboard nav, flash animation, Ctrl+F (#264)
Follow-up on #263. Refines the cross-tab search into a proper command-palette-ish flow and polishes the UX around it. Results-only mode: - When a query is active, the tab content is hidden entirely; the results list is the only thing shown. Unified list (was: in-place current-tab filter + "In other tabs" panel underneath), sorted with current-tab matches first and then by score. - Removed the DOM-based hide/show logic and its CSS helper class, the dead searchOtherTabs i18n key, and the searchHits/otherTabHits state. Keyboard navigation inside the search field: - ↓/↑ moves selection through the result list (clamped, no wrap). - Enter activates the selected item (same flow as a click — clears query, switches tab, scrolls + opens + flashes the target). - Mouse hover syncs with the keyboard selection so the two input modes don't fight each other. - Selected item gets accent-border + tinted background; scrollIntoView with block:'nearest' keeps it visible when the list is long. Ctrl/Cmd+F (Settings page only): - Window keydown listener registered on mount, removed on unmount → the shortcut is live only while Settings is rendered. - Opens the search input, focuses + selects it even if already open. - preventDefault blocks the native WebKit find bar. - Placeholder now hints at the shortcut: "… (Ctrl+F)" / "… (⌘F)" on macOS, no new i18n keys needed. Target flash animation: - After navigating from a result, the target SettingsSubSection gets a 1.4s accent-colored border + glow pulse so the user immediately sees which entry the result pointed at. Reflow trick lets it retrigger when clicking the same result twice. Misc: - "Next Track Buffering" → "Buffering" in all 8 locales + the section comment in Settings.tsx. The SETTINGS_INDEX keeps "next track" as a keyword so old search habits still find it. Co-authored-by: Psychotoxical <dev@psysonic.app> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
ae7b94f190
commit
f0e5b2542b
+1
-2
@@ -710,7 +710,6 @@ export const enTranslation = {
|
||||
aboutContributorsCount_other: '{{count}} contributions',
|
||||
searchPlaceholder: 'Search settings…',
|
||||
searchNoResults: 'No settings match your search.',
|
||||
searchOtherTabs: 'In other tabs',
|
||||
integrationsPrivacyTitle: 'Privacy notice',
|
||||
integrationsPrivacyBody: 'All integrations on this tab are <strong>opt-in</strong> and send data to external services or to your Navidrome server when enabled. Last.fm receives your listening history, Discord shows the currently playing track in your profile, Bandsintown is queried per artist to fetch tour dates, and the Now-Playing share publishes your current track to other users of your Navidrome server. If you don\'t want any of this, simply leave the corresponding section disabled.',
|
||||
homeCustomizerTitle: 'Home Page',
|
||||
@@ -797,7 +796,7 @@ export const enTranslation = {
|
||||
gaplessDesc: 'Pre-buffer next track to eliminate gaps between songs',
|
||||
preloadMode: 'Preload Next Track',
|
||||
preloadModeDesc: 'When to start buffering the next track in the queue',
|
||||
nextTrackBufferingTitle: 'Next Track Buffering',
|
||||
nextTrackBufferingTitle: 'Buffering',
|
||||
preloadHotCacheMutualExclusive: 'Preload and Hot Cache serve the same purpose — only one can be active at a time. Enabling one will automatically disable the other.',
|
||||
preloadOff: 'Off',
|
||||
preloadBalanced: 'Balanced (30 s before end)',
|
||||
|
||||
Reference in New Issue
Block a user