Repository navigation
feat(macOS): unify song table columns with All Songs View Options, add interactive Like column and clickable Artist/Album links - #544
Open
vizmoe wants to merge 1 commit into
Conversation
chenqi92
reviewed
Dec 2, 2026
chenqi92
left a comment
Owner
There was a problem hiding this comment.
- Album page: the track list changed from
LazyVStacktoVStack, so every row of a large album or box set is built at once. Please keep it lazy. - Artist / album text cells:
MacSongLinkTextCellView.hitTestreturns the button whenever the click lands on the text, so a single click there navigates instead of playing, and Cmd/Shift-click selection is lost over that text. Songs without an album or artist ID still look like links. Please drop this, or make it a View Options switch that is off by default and ignores clicks with modifiers. - View Options: Album, Artist and Playlist pages now share the All Songs layout (all 12 columns, widths and order), so changing one page changes every page and All Songs too. Please give the detail pages their own scope with the defaults they had before.
- Artist page, Popular: the "N plays" text is gone and the row is now the full table row. Please keep the existing Popular row.
- macOS 15 scrolling: the new cells use plain
Button,.onHoverand.help. In scrolling lists main usesPMScrollingButton/pmScrolling*because each pointer region is re-registered every frame on macOS 15 (#380). Please use those. layout()callsfittingSizeon the format pill and the link button for every row on every layout pass. Measure the text once (attributedStringValue.size()as before, or cache by string).- Like column: for saved column orders it lands at the end, after Bit Depth; place it after Format. Show the outline heart only on hover, and the filled heart when the song is liked.
ArtistAllSongsView.displayedSongssorts the artist's whole song list insidebodyon the main actor. Sort off the main actor, asSongListSnapshotdoes for All Songs.- Album rows went from
ButtontoonTapGesture, so VoiceOver no longer finds a button to play the row. Add.isButtonand a default action, or keep theButton. - Tests:
MacSongTableLayout.sharedLibrarywritesUserDefaults.standard. Snapshot/restore puts it back, but a crashed run resets the developer's table settings and sets the migration flag. Inject a suite instead.Task.sleep(160 ms)insettlemakes the tests timing-dependent. - The iOS artist song list gained
.songRowColumnsContainer()and lost its Mac padding/background. The PR doesn't mention iOS, so please say what this changes there. - The commit message is missing
refs #542. After rebasing, thePlaylistDetailView.swiftfile-size baseline needs recomputing (main has changed it).
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.
Closes #542
Summary
Unifies macOS song table columns across All Songs, Album Detail, Artist Detail (Popular Songs), and Artist → All Songs using All Songs as the canonical source of truth and honoring shared View Options settings, adds an interactive Favorite (Like) column and immediate Play Count display, and makes Artist and Album cells clickable to navigate to their detail views.
Changes
Primuse/Views/Mac/MacSongTableLayout.swift,Primuse/Views/Mac/MacSongTableRowCells.swift):MacSongTableLayout.sharedLibrary, persisted row density (MacSongsRowDensity: Compact 34pt / Standard 40pt / Relaxed 48pt), and reusableMacSongTableViewOptionsPopover..likedcolumn (using existing localized keysmart_field_isFavorite) enabled by default with a one-time migration for existing saved library layouts that respects subsequent user hides.MacSongTableLayoutclass body to store only properties andinit(tighteningobservable-class-body.tsvfrom 13 → 0).MacSongTableHorizontalContainer,MacSongTableOrdinalCell,MacSongTableRowCells,MacSongTableRowButton,MacSongTableLikeButton,MacSongTableArtistCell,MacSongTableAlbumCell) and AppKit interactive cells (MacSongLikedCellView,MacSongLinkTextCellView).AlbumDetailView.swift,ArtistDetailView.swift,ArtistDetailView+Catalog.swift,SongListView.swift,SongListView+Catalog.swift,SongListView+HeaderActions.swift,SongListView+SortOrder.swift):AlbumDetailViewtracks andArtistDetailViewpopular songs to the shared layout with View Options popovers (albumDetail.viewOptions,artistDetail.viewOptions) synced in real time withSongListView.ArtistAllSongsViewfrom a stackedSongRowViewcard list toMacSongNativeTableViewwith shared View Options, header sorting, resize/reorder writeback, context menu, and locate-current-song support.MacSongFormatCellViewpill width calculation (ceil(pillLabel.fittingSize.width)) so short codec labels like"WAV"/"FLAC"no longer truncate to"...".PlayHistoryStore.shared.playCountsBySongIDfallback on first frame inSongListViewso Play Count populates without waiting for the async refresh.MacSongTableRowCells.swift,SongListView+SortOrder.swift,PlaylistDetailView.swift,MacRoute.swift,MacDetailContainer.swift):library.toggleLiked(songID:)without triggering row playback; duplicate heart icon in.titleis hidden while.likedis visible; interactive cells yield to row selection when batch selection is active.ArtistAllSongsViewontoMacDetailContainer'sNavigationPath(MacArtistAllSongsDestinationvia.primuseDetailOpenArtistAllSongs) so drillingArtist → All Songs → Album/Artistand navigating back behaves consistently.PlaylistDetailView(MacPlaylistSongCells) with the.likedbutton and clickable Artist / Album cells for consistency.Primuse.xcodeproj/project.pbxproj,PrimuseMacTests/MacUnifiedSongTableTests.swift,scripts/gate/baselines/):Primuse.xcodeprojwith XcodeGen 2.46.0.MacUnifiedSongTableTestscovering row-density persistence/reset, one-time column migration, format pill non-truncation,ArtistAllSongsViewnative table sync/sorting/Like/navigation,AlbumDetailViewandArtistDetailViewView Options sync, and tight hit-testing / batch-selection passthrough.observable-class-body.tsvandfile-size.tsvfor modified files.Cross-Platform Impact
AlbumDetailView,ArtistDetailView,ArtistDetailView+Catalog,SongListView,PlaylistDetailView) preserve existing iOS layouts and navigation; verified via iOS compilation.Verification
PrimuseMacTests:xcodebuild test -scheme PrimuseMac(MacUnifiedSongTableTests,MacSongTableAndIconTests,MacPageKindRoutingTests) — 25/25 passed on9528f80c09.Primuse(iOS):xcodebuild build-for-testing -scheme Primuse -destination 'generic/platform=iOS' CODE_SIGNING_ALLOWED=NO— TEST BUILD SUCCEEDED (local CoreSimulator runtime version mismatch prevented launching an iOS simulator; compilation ofPrimuse+PrimuseTestspassed).MISE_XCODEGEN_VERSION=2.46.0 ruby scripts/check-widget-platforms.rb— passed.MISE_XCODEGEN_VERSION=2.46.0 python3 -I scripts/gate/gate.py --root . --require-all --strict-baselines --range origin/main..HEAD&--commits origin/main..HEAD— 0 errors, 0 warnings, 0 skipped.