Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset lyrics view scroll position for new song #1607

Merged
merged 1 commit into from
May 17, 2024

Conversation

nukeop
Copy link
Owner

@nukeop nukeop commented May 17, 2024

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:

    • 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.


For more details, open the Copilot Workspace session.

@nukeop nukeop merged commit 113153a into master May 17, 2024
0 of 8 checks passed
@nukeop nukeop deleted the feature.reset-lyrics-scroll branch May 17, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant