Skip to content

Rewrite subject details page with adaptive multi-column layouts#3127

Open
Him188 wants to merge 8 commits into
mainfrom
subject-details-adaptive-layout
Open

Rewrite subject details page with adaptive multi-column layouts#3127
Him188 wants to merge 8 commits into
mainfrom
subject-details-adaptive-layout

Conversation

@Him188

@Him188 Him188 commented Jul 7, 2026

Copy link
Copy Markdown
Member

Implements the Figma redesign of the subject details page (design source: Figma 「💡 条目详情重设计(定稿)」, three-pane 1600dp board as the baseline) with three adaptive layouts, replacing the previous single-column-at-all-sizes UI. The data layer (SubjectDetailsState/factory/loader/VM and all interaction state holders) is reused as-is; only the UI/layout layer is rewritten. Navigation contract is unchanged.

Layouts

Breakpoint Layout
< 600dp Compact: existing header + tabs, new details-tab content
600–1600dp Two-pane: sidebar + content stream (narrow tier under 1000dp shrinks the sidebar)
>= 1600dp Three-pane: sidebar + content + rail (rating / popular reviews / staff cards)

Breakpoints are computed from the actually available width, not the window width, so the page renders correctly when embedded in the episode-page bottom sheet (max 640dp) and the search list-detail pane.

Highlights

  • Unified whole-page scrolling; M3 sticky top bar shows the subject title once the in-page title scrolls away; the 12dp top padding scrolls with content
  • Desktop reviews path restored: preview cards (two-pane footer / three-pane rail card) open a full comment sheet with a write-review entry; the rating summary block is clickable and the rating card has an explicit rate entry (你的评分: N / 打分)
  • Episodes: paged grid on desktop (max 2 rows per page, pager replaces the count label when paging, initial page contains the current episode); horizontal strip on mobile with an episode-count link opening the episode list dialog
  • View-all sheets for characters, staff and related subjects backed by the existing full pagers
  • Sidebar actions per the design: full-width play and collection buttons (no episode-list icon button)
  • Deleted the dead 525-line DetailsTab.kt; section metrics (paddings, gaps, card sizes, histogram, tag style) aligned to measured Figma values
  • Deterministic Skiko screenshot tests for all breakpoints + scrolled state; EpisodePaging unit tests
  • Fixes a real-device bug found during verification: the details tab could not scroll back to the episodes section after its data loaded asynchronously (LazyColumn anchor + connected-scroll interaction)

Screenshots

All screenshots below are the packaged desktop app running against the production API (subject: Dr.STONE SCIENCE FUTURE Part 3, real account data).

单栏 Compact (420dp 窗口)

选集横滑自动定位到当前集 36,「看过 11 (35) · 全 13 话 ›」打开完整选集列表:

双栏 Medium (1400×900)

行内评分直方图右对齐;13 集一页容纳,header 显示集数文案:

三栏 Expanded (1680×1000)

右栏:评分卡(含「你的评分: 6」打分入口)/ 热门评价(真实评论 + 查看全部)/ 制作人员:

窄双栏 (700×900, 播放页 bottom sheet / 分屏场景)

侧栏收缩、隐藏行内直方图;选集分页且初始页含当前集(7 – 12 / 13):

整页滚动 + M3 粘性标题栏 (1680, 滚动后)

内嵌场景:搜索页 list-detail 详情栏 (无职转生)

按可用宽度(而非窗口宽度)选择布局的效果——详情栏内正确渲染双栏并启用选集分页:

Verification

  • :app:shared:ui-subject + :app:shared compile on desktop and Android; full Skiko screenshot test suite green
  • Verified end-to-end with the packaged desktop app and the Android app on an emulator against the production API

Screenshots are hosted on the pr-assets/subject-details-adaptive branch; delete it after merge if desired.

🤖 Generated with Claude Code

Him188 and others added 8 commits July 7, 2026 20:47
… clarity and coverage in new and updated tests
…WindowSizeClass` for extra-large breakpoint detection
Implement the Figma redesign of the subject details page with three
breakpoints: compact (<600dp, existing header/tabs with new details tab
content), two-pane (600-1600dp, sidebar + content stream) and three-pane
(>=1600dp, sidebar + content + rail with rating/reviews/staff cards).

- Compute breakpoints from the actually available width, so the page
  renders correctly when embedded in the episode page bottom sheet and
  the search list-detail pane; add a narrow two-pane tier (600-1000dp)
- Unified whole-page scrolling with an M3 sticky top bar that shows the
  subject title after the in-page title scrolls away
- Desktop reviews path: preview cards (two-pane footer / three-pane
  rail) opening a full comment sheet with a write-review entry backed by
  the extracted EditableRatingDialogsHost; rating summary is clickable
  and the rating card has an explicit rate entry
- Paged episode grid on desktop (max 2 rows per page, initial page
  contains the current episode) and a horizontal episode strip on
  mobile, with an episode-count link opening the episode list
- View-all sheets for characters, staff and related subjects
- Delete the obsolete DetailsTab and align section metrics (spacing,
  paddings, card sizes, tag style, rating histogram) with the design
- Add deterministic Skiko screenshot tests covering all breakpoints and
  the scrolled state, plus EpisodePaging unit tests

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The episodes section item was emitted conditionally, so when episode
data arrived it was inserted above the LazyColumn's scroll anchor and
the connected-scroll setup prevented scrolling back up to reveal it
(reproduced on a real device). Emit the item unconditionally and gate
the content inside instead, so it expands in place when data loads.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Remove the episode-list icon button next to the play button (not in the
design; episode interactions go through the content grid) and make both
the play button and the collection type button fill the sidebar width.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Character medium images are mostly tall full-body renders; the 76dp circular
crop cut figures at the hip. Render them in a 2:3 rounded card with
ContentScale.Fit instead so the whole image is visible.

SubjectCollectionTypeButton applied the caller's modifier to a wrapper Box
while the inner button hugged content, so fillMaxWidth never reached the
button; propagate min constraints so the sidebar button actually fills.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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