Skip to content

feat(mobile): playing icon + skip-deleted-on-tap + gray deleted index#14441

Merged
dylanjeffers merged 1 commit into
mainfrom
feat/mobile-collection-tile-playing-icon-deleted
Jun 2, 2026
Merged

feat(mobile): playing icon + skip-deleted-on-tap + gray deleted index#14441
dylanjeffers merged 1 commit into
mainfrom
feat/mobile-collection-tile-playing-icon-deleted

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Follow-up to #14440 — the original PR merged before this commit landed. Re-applying the three remaining behaviors on a fresh branch off main.

1. Speaker icon next to the title when actively playing

Mirrors what TrackTile shows via LineupTileMetadata: a small IconVolumeLevel2 fills the line next to the title text while one of this collection's tracks is the currently-playing track AND the audio engine is actually playing (not paused).

const { getTrackId, getPlaying } = playbackSelectors
const isPlaying = useSelector((state) => getPlaying(state) && isActive)
{isPlaying ? (
  <IconVolumeLevel2 fill={primary} size='m' style={styles.playingIndicator} />
) : null}

Same icon, same fill (useThemeColors().primary), same size='m'. Restructured styles.titleTouchable to be a row container (flexDirection: 'row', alignItems: 'center') and added styles.titleText: { flexShrink: 1 } so a long title shrinks instead of pushing the icon off-tile.

2. Skip deleted-by-artist tracks on the tile-level tap

Previously handlePress fell back to tracks[0]?.track_id as the start track — if the first track was deleted, the tap dispatched playback for an unplayable track. Now:

const startTrackId =
  currentTrack && !currentTrack.is_delete
    ? currentTrack.track_id
    : tracks.find((t) => !t.is_delete)?.track_id
if (!startTrackId) return

Picks the current track only if it's one of ours AND not deleted, else the first non-deleted track. If every track in the collection is deleted, the tile tap is a no-op.

The per-row tap was already a no-op for playback — the list-level Pressable only fires handlePressTitle (navigate to the collection page), never a play action. The real playability concern was at the tile-level tap, which this covers.

3. Gray the index column on deleted rows

CollectionTileTrackList's TrackItem already grayed the title, the by <artist> line, and the [Deleted by Artist] marker. The number column was still rendered in the regular subdued color, which read as "row partially deleted." Added deleted && styles.deleted to the index Text's style array so the whole row consistently grays out.

Files

Net diff: +55 / −5.

Verification

  • tsc --noEmit clean in packages/mobile.
  • Mobile manual: play a track inside a collection in the feed lineup → speaker icon shows next to the collection title.
  • Mobile manual: pause playback → speaker icon disappears (title still tinted active).
  • Mobile manual: tap a collection tile whose first track is deleted → playback starts on the first non-deleted track (not on the deleted one).
  • Mobile manual: collection where every track is deleted → tile tap is a no-op.
  • Mobile manual: deleted row in the tracklist is fully grayed out (index, title, "by ", "[Deleted by Artist]" all in the subdued color).

🤖 Generated with Claude Code

Two adjacent CollectionTile-in-lineup behaviors per design feedback:

1. **Speaker icon next to the title when actively playing.** Mirrors
   what TrackTile shows via LineupTileMetadata: a small IconVolumeLevel2
   fills the line next to the title text while one of this collection's
   tracks is the currently-playing track AND the audio engine is
   actually playing (not paused). Same icon, same fill color
   (`useThemeColors().primary`), same `size='m'`. New
   `isPlaying = useSelector((state) => getPlaying(state) && isActive)`
   matches the derivation in LineupTileMetadata exactly.

   Restructured `styles.titleTouchable` to be a row container
   (`flexDirection: 'row', alignItems: 'center'`) and added
   `styles.titleText` (`flexShrink: 1`) so the title text shrinks to
   make room for the icon instead of pushing it off the tile.

2. **Don't try to play a deleted-by-artist track.** Previously
   `handlePress` fell back to `tracks[0]?.track_id` as the start
   track — if the first track had been deleted, the tile tap dispatched
   playback for an unplayable track. Now picks the current track only
   if it's one of ours AND not deleted, else the first non-deleted
   track; if every track in the collection is deleted, the tile tap is
   a no-op.

3. **Gray the index column on deleted rows.** `CollectionTileTrackList`'s
   `TrackItem` already grays the title, the "by <artist>" line, and the
   "[Deleted by Artist]" marker. The number column was still rendered
   in the regular subdued color, which read as "row partially deleted."
   Added `deleted && styles.deleted` to the index Text's style array so
   the whole row consistently grays out.

The deleted-row tap itself was already a no-op for playback — the
list-level Pressable only fires `handlePressTitle` (navigate to
collection page). The real playability concern was at the tile-level
tap handler, which (1) now covers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 2, 2026

⚠️ No Changeset found

Latest commit: 5962811

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers dylanjeffers merged commit 5b17d94 into main Jun 2, 2026
3 checks passed
@dylanjeffers dylanjeffers deleted the feat/mobile-collection-tile-playing-icon-deleted branch June 2, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant