Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes various improvements and bug fixes to the
Lyrics.svelte
andplayer.ts
files. The changes focus on enhancing user experience, improving error handling, and optimizing the scrolling behavior for lyrics.Enhancements to user experience:
src/lib/components/Lyrics.svelte
: Updated the toast message and added a description and action for creating an event. Simplified the scrolling behavior for better user experience. [1] [2]src/lib/components/Player.svelte
: Adjusted the width of the song-info section to 30% for better layout.Improved error handling:
src/lib/player.ts
: Added error handling to set default colors and provide friendly error messages. Implemented retry logic for initializing the app and checking song changes. [1] [2] [3] [4] [5] [6] [7] [8] [9]Optimized scrolling behavior:
src/lib/components/Lyrics.svelte
: Replaced the smooth scrolling function with a debounced scroll function to delay execution and prevent frequent scrolling.src/lib/components/Lyrics.svelte
: Added immediate scrolling after hover ends for better user interaction.These changes collectively enhance the functionality and robustness of the application, providing a smoother user experience and better handling of potential errors.Fixes #
Proposed Changes