Implements automatic resetting of the lyrics view to the top for each new song to enhance user experience.
Action and Reducer Updates:
Adds a new action LYRICS_RESET_SCROLL in packages/app/app/actions/lyrics.ts to manage the resetting of the lyrics scroll position.
Introduces a new action creator lyricsResetScroll that dispatches LYRICS_RESET_SCROLL.
Modifies lyricsSearch function to dispatch lyricsResetScroll before starting a new lyrics search, ensuring the lyrics view is reset at the start of each song.
Updates LyricsReducer in packages/app/app/reducers/lyrics.ts to handle the LYRICS_RESET_SCROLL action by resetting the lyrics search result, effectively clearing the view.
Lyrics View Component Enhancement:
Implements a useEffect hook in packages/app/app/components/LyricsView/index.tsx to listen for changes in the lyrics search result and automatically scroll the lyrics view to the top.
These changes collectively ensure that users will start at the top of the lyrics for every new song, addressing the issue raised in the repository.
Related to #1606
Implements automatic resetting of the lyrics view to the top for each new song to enhance user experience.
Action and Reducer Updates:
LYRICS_RESET_SCROLL
inpackages/app/app/actions/lyrics.ts
to manage the resetting of the lyrics scroll position.lyricsResetScroll
that dispatchesLYRICS_RESET_SCROLL
.lyricsSearch
function to dispatchlyricsResetScroll
before starting a new lyrics search, ensuring the lyrics view is reset at the start of each song.LyricsReducer
inpackages/app/app/reducers/lyrics.ts
to handle theLYRICS_RESET_SCROLL
action by resetting the lyrics search result, effectively clearing the view.Lyrics View Component Enhancement:
useEffect
hook inpackages/app/app/components/LyricsView/index.tsx
to listen for changes in the lyrics search result and automatically scroll the lyrics view to the top.These changes collectively ensure that users will start at the top of the lyrics for every new song, addressing the issue raised in the repository.
For more details, open the Copilot Workspace session.