Skip to content

feat(customization): add toggle to expand long track titles#1617

Open
Thomas05000005 wants to merge 1 commit into
finamp-app:redesignfrom
Thomas05000005:feat/expand-track-titles-995
Open

feat(customization): add toggle to expand long track titles#1617
Thomas05000005 wants to merge 1 commit into
finamp-app:redesignfrom
Thomas05000005:feat/expand-track-titles-995

Conversation

@Thomas05000005

@Thomas05000005 Thomas05000005 commented May 4, 2026

Copy link
Copy Markdown

Summary

Adds a new "Expand long track titles" toggle in Customization Settings. When enabled, track titles in album/artist/genre/playlist tile lists drop the per-tile height cap and the soft maxLines: 2 ellipsis, so titles that previously got cut to a single line (with "...") on narrow window widths now use a second line and the tile grows to fit.

Closes #995

Implementation (in lib/components/AlbumScreen/track_list_tile.dart)

  • Pulled the title Text out of the inline tree into a titleTextWidget local so it can be conditionally wrapped.
  • Removed the BoxConstraints(maxHeight: defaultTileHeight) ceiling on the title Column when the toggle is on, so the column can grow with its content.
  • Switched the column to mainAxisSize: MainAxisSize.min and mainAxisAlignment: MainAxisAlignment.start when expanded - the previous MainAxisSize.max + spaceEvenly was distributing fixed space across the rigid 60-px tile, which is what was clipping the second line on narrow windows.
  • When expanded the title is rendered raw (with vertical padding) instead of inside a Flexible(flex: 3), and the subtitle's Flexible is set to flex: 0 so it requests no extra space - both changes are needed for MainAxisSize.min to actually shrink-wrap.
  • Title's maxLines becomes null and overflow: TextOverflow.visible when expanded; softWrap: true is explicit.

Other PRs:

  • lib/models/finamp_models.dart: new expandTrackTitles field on FinampSettings (@HiveField(150)) + DefaultSettings.expandTrackTitles = false (off by default - no behavior change for existing users).
  • lib/services/finamp_settings_helper.dart: reset added to resetCustomizationSettings().
  • lib/screens/customization_settings_screen.dart: new ExpandTrackTitlesToggle widget, placed right after OneLineMarqueeTextSwitch (the closest semantic neighbor - both control how text is presented in tiles).
  • lib/l10n/app_en.arb: expandTrackTitlesTitle / expandTrackTitlesSubtitle.
  • Generated files (finamp_models.g.dart, finamp_settings_helper.g.dart) regenerated via dart run build_runner build --delete-conflicting-outputs; flutter gen-l10n regenerated AppLocalizations getters.

Why this stops at 2 lines (and not "as many as needed")

The original report asked for titles to wrap on as many lines as needed. Tested locally on Windows desktop, the practical effect of the toggle is to free titles from "1 line + ellipsis" up to two full lines - ListTile Material's title slot does not grow much past two lines without dropping the ListTile widget entirely. I chose to stop here on purpose, for two reasons that came up in the issue thread:

  1. @Chaphasilor's reservation on scrolling performance ("it could cause issues with scrolling performance since not all tracks will have the same height any more"): two lines means tile heights stay close to uniform and the existing ListView scroll performance is preserved. Letting tiles grow to 4-5 lines for occasional classical-music titles would create much larger height variance.
  2. Layout consistency: the existing tile structure (leading cover, title column, trailing duration/actions) was designed around a ~60-px tile. Two lines is the largest height where the tile layout still looks cohesive without the trailing actions feeling detached.

If reviewers prefer a true "as-many-lines-as-needed" behavior, I'd be happy to take a follow-up PR that drops the ListTile widget for tracks and uses a Material + InkWell + Padding + Row skeleton - that's the cleanest way to lift the cap without fighting ListTile's internal layout. Just say the word.

Test plan

Tested on Windows desktop (flutter run -d windows) against a real Jellyfin server with a classical-music-style album that has long track titles like "Becoming one of 'The People' Becoming…":

  • Toggle appears in Settings → Customization, between "One-line marquee text" and "Release date format"
  • Toggling persists across app restarts
  • On a narrow window with the toggle off, long titles get cut to 1 line with (existing behavior)
  • On the same narrow window with the toggle on, the same titles wrap onto 2 lines and the tiles grow to fit
  • On wide windows, behavior is unchanged either way (titles already fit on a single line)
  • Reset button on Customization Settings restores the toggle to off

Code assistance

Used Claude (LLM) to scaffold the new setting following CONTRIBUTING.md, to iterate on the Column constraints after the first attempts (dropping the height cap alone was not enough; mainAxisSize and the Flexible wrappers also had to flip), and to verify the chosen 2-line cap against the maintainer's perf concern.

Adds an "Expand long track titles" toggle in the customization settings
that lets the track list show titles on more than two lines when needed,
instead of always truncating with an ellipsis.

The toggle is stored on a new HiveField (150) on FinampSettings, defaults
to false (current behaviour), and is read by `TrackListTile` to switch
the title/subtitle column between the fixed two-line layout and a
growing one driven by `MainAxisSize.min` with `TextOverflow.visible`
on the title.

Closes finamp-app#995
@Thomas05000005
Thomas05000005 force-pushed the feat/expand-track-titles-995 branch from 6304f5a to c257e34 Compare May 20, 2026 09:13
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