Repository navigation
fix(ui): virtualize the long track lists and label every plugin world - #908
Merged
Merged
Conversation
…ed list The store card kept its own copy of the world-to-label table, written before the canvas world existed, so a canvas plugin in the store showed the raw waveflow:canvas/v1 string while the installed list already called it Canvas. Both cards now render one shared PluginWorldBadge, so a world added later is labelled in both places or in neither.
The liked view mapped every liked track into the DOM, artwork and all, and nothing bounds how many tracks someone likes. The rows now go through a virtualizer driven by the page scroller, like the playlist and library tables, with the same 56 px row pitch. The scrollMargin machinery those tables each copy is now one hook, usePageVirtualizer, which also re-measures when the view's content above the list changes size, not only the list or the scroller. Rows keep their markup, keys, double-click and Enter / Space play, the keyboard menu, the hover-only unlike button and the now-playing highlight; the divider moves from divide-y onto each row but the last.
These detail tables mapped every row on the grounds that one entity bounds its own list. That holds for an album, not for a genre, which can be a third of the library, nor for a year or a prolific artist. DetailTrackTable (genre and year) and ArtistTrackTable now go through usePageVirtualizer; the album view stays in flow. Row markup, keys, play-from-here indexing, the playing indicator, the like toggle, the album link and the keyboard menu are unchanged.
The history appends a page of 100 plays each time the sentinel comes into view and never drops one, so a long scroll back kept every row it passed mounted. It now virtualizes days against the page scroller: each day stays a whole, measured section, so its sticky header still docks under the top bar and is pushed off by the next day's, and the infinite-scroll sentinel still follows the list. Jumping to a month also meant to scroll back to the top, but it scrolled the window, which never scrolls; it now scrolls the page.
The invariant exempted every detail view of one entity, which covered genres and artists whose lists are not small. Only the album stays in flow now. Name usePageVirtualizer as the way a new list gets the page scroller, say how the history keeps its day groups, and drop the claim that statistics rows are virtualized: they are top-ten lists.
It only appeared on mouse hover, so a keyboard user tabbing to it, or a touch screen with no hover, had an invisible control. It now also shows when the row holds focus and on devices without hover, with a visible focus ring, like the other row actions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two frontend defects, plus one more found while fixing them.
The plugin store showed a raw world name
The store card kept its own copy of the world labels, which had no canvas entry, so a canvas plugin showed
waveflow:canvas/v1. Both cards now share onePluginWorldBadge(source, metadata, ui, canvas) and cannot drift apart again. All 17 locales already had the labels.Long track lists rendered every row
The project rule is virtual scroll against the page scroller for every long list. Five views broke it:
A shared
usePageVirtualizerhook holds the logic, and re-measures when content above the list changes size (a bio expanding, albums loading). Album detail is left as is, since an album is short by nature.Each view keeps its row markup, double-click, Enter and Space play from the right index, the keyboard and right-click menus, the now-playing highlight, and its loading and empty states.
Also fixed
invariants.mdandui.mddescribe the rule and the hook. A false claim that the statistics rows were virtualized is removed (they are top-10 lists).Checks
bun run typecheck,bun run lintandprettier --checkpass.To check in the app:
@coderabbitai review
Summary by CodeRabbit