Skip to content

feat: Remember the episode List/Grid view and add it to the series page - #1168

Open
MrRussLuther wants to merge 4 commits into
DonutWare:developfrom
MrRussLuther:feat/episode-view-type-persist
Open

MrRussLuther wants to merge 4 commits into
DonutWare:developfrom
MrRussLuther:feat/episode-view-type-persist

Conversation

@MrRussLuther

@MrRussLuther MrRussLuther commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request Description

The season page's List/Grid toggle now persists in client settings instead of resetting to Grid every time a season is opened. The series page gets the same toggle (Row, List, Grid) next to the favorite, played and more buttons, sharing the one setting, so whatever you picked last is what you get on either page.

How it fits together:

  • EpisodeDetailsViewType moves from episode_details_list.dart into client_settings_model.dart so it can be stored on ClientSettingsModel as a nullable episodeViewType. Null keeps today's behaviour: Grid on the season page, the horizontal row on the series page, so nothing changes until someone picks a view.
  • The segmented button that was inlined in season_detail_screen.dart is now EpisodeViewTypeSelector, used by both pages. On the series page it's icon-only with tooltips to keep the action row compact, and it's hidden for d-pad input so the TV layout is untouched.
  • In List or Grid the series page shows the next-up season, same as the row does now. The season picker still works, and "All" shows every season under its own header. EpisodePosters only takes a viewType and falls through to the existing row when it's null, so the row code path is unchanged.

One new l10n key (row), added at the end of app_en.arb. Generated files were regenerated with build_runner and reformatted at 120 columns.

Issue Being Fixed

Discussion #1155. The season page's view choice doesn't stick, and the series page has no way to see episodes as a list at all.

Screenshots / Recordings

Same series page, same scroll position, with the new selector next to the heart, played and more buttons. Row (unchanged default):

Series page, Row

List:

Series page, List

Grid:

Series page, Grid

Tested On

  • Android
  • Android TV
  • iOS
  • Linux
  • Windows
  • macOS
  • Web

Checklist

  • If a new package was added, did you ensure it works for all supported platforms? Is the package well maintained (no new packages)
  • Check that any changes are related to the issue at hand.

The season page view toggle now persists in client settings instead of resetting to grid.
The series page gets the same toggle next to the season picker (row, list, grid), sharing the
same setting. Unset keeps the current defaults: grid on seasons, the horizontal row on series.
MrRussLuther added a commit to MrRussLuther/Fladder that referenced this pull request Oct 13, 2026
The series and season pages scroll in a SingleChildScrollView, so the shrink-wrapped list and
grid laid out every episode up front and long seasons stalled while switching to List or Grid.
Each item now renders a placeholder of the expected height until it comes within 1.5 viewports
of the page's scroll view, then builds once and stays built. The horizontal row was already lazy
and is unchanged.

@PartyDonut PartyDonut left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely sure if this is something we should merge right now. The season details screen is due for a proper re-design.

Any chance we could atleast simplify the deferred_build or use a CustomScrollView for now?

// Outer and inner card padding, plus the gap between poster and text when side by side.
final posterWidth = wide ? (constraints.maxWidth - 32 - 16) / 4 : constraints.maxWidth - 32;
final placeholderHeight = posterWidth / 1.76 + 32 + (wide ? 0 : 120);
return DeferredBuild(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big fan of this. I'm assuming this is to fix this sizing issues with the shrinkWrapped ListView?

Maybe better to fix it by using a CustomScrollView for now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a sizing fix. The list and grid are shrink-wrapped inside the scaffold's SingleChildScrollView, so every episode gets laid out and starts loading its image at once. The season page already does that today, but on the series page with "All" selected it's the whole show, and that stalled on long series. DeferredBuild was a way to get lazy building without touching the scaffold.

A CustomScrollView fixes it properly, but only if the episode list becomes a sliver of the page's scroll view. That scroll view lives in DetailScaffold (a SingleChildScrollView wrapping a Stack over the backdrop) and is shared by every detail screen, so it felt like redesign territory rather than something to fold into this PR.

I've dropped DeferredBuild and its test instead. List and Grid on the series page now behave like the season page does today, and the lazy list can come with the redesign. If you'd like the scaffold on slivers before then, happy to do that as its own PR.

Drops DeferredBuild per review. The list and grid go back to the plain shrink-wrapped
widgets the season page uses today; a lazy list needs the detail scaffold on slivers,
which belongs with the screen redesign.

This reverts commit c6518dc.
@MrRussLuther

Copy link
Copy Markdown
Contributor Author

Fair enough on the redesign. I've trimmed the PR to the feature itself: the persisted setting, the shared selector and the series page toggle. The season screen part is a net removal (the inlined segmented button becomes the shared selector), so if the redesign replaces the screen the setting and selector carry over and only the list gets swapped. Merged develop in as well.

If you'd rather hold it until the redesign that's fine too, just say and I'll park it.

This branch has not been deployed

No deployments
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.

2 participants