The Market and Settings show as many panes as the window has room for - #72
McCal-Codes wants to merge 1 commit into
Conversation
Three panes only from 1200 dp (DeX, a big tablet); on the Fold8's inner screen that's two, as iPad's App Store and Settings do. The Market's list takes the whole pane when nothing is open, in two columns, and a package or source pushes over it with a back label naming where it goes. Settings pushes nested pages instead of opening a third column, and inside the Market beside its sidebar it uses the iPhone layout, so the sidebar, list and page never add up to three.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac9e56ae7a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| state = listState, | ||
| columns = if (narrow) 1 else marketListColumns(maxWidth.value), |
There was a problem hiding this comment.
Keep the selected row anchored when changing columns
When a two-column list is scrolled within a section and the user opens a package, this switches the list to one column while reusing the same LazyListState. Each section is a single lazy item, so the saved pixel offset now points roughly half as far through its rows and the selected package can move offscreen, losing the master-detail navigation context. Preserve an entry-level anchor or scroll the selected row into view when changing the column count.
Useful? React with 👍 / 👎.
| // Row by row, left to right, so reading order and TalkBack's order stay the list's order. | ||
| for (pair in inSection.chunked(columns)) { | ||
| Row(Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) { |
There was a problem hiding this comment.
Apply the column count to update rows
When the Installed tab has updates and its pane is at least 640 dp wide, only the normal section rows are chunked into columns; the separate updates group above remains a single stack of full-width MarketRows. This leaves half of the newly available list capacity unused and makes the same package list alternate between one- and two-column layouts, so the update group should use the same chunking logic.
Useful? React with 👍 / 👎.
Row S7 in the 0.6.7 plan. The number of panes now comes from the window's width, the way iPad's App Store and Settings do it: 1 under 600 dp, 2 from 600 dp, 3 only from 1200 dp. A pane is never left empty.
On the Fold8's inner screen (932 dp) that means two:
LocalSettingsMaxColumns), so sidebar, list and page never add up to three.From 1200 dp (DeX, a large tablet) the list stays beside what it opened, which is today's layout.
Where
SizeClass.kt:THREE_PANES_DP,marketListBeside,marketListColumns,settingsColumnsBesideSidebar,LocalSettingsMaxColumnsMarketScreen.kt:besidereplacessplitfor side by side, full-width list, two-column rows, hoisted list state, back titlesCustomizationSheet.kt: two small lines (the column cap, andsplitalso needs two columns to spare)Checked
MarketPanesTest,SettingsColumnsTestupdated for 1200 dp,LabSettingsParityTestexpects 1200 in both the app and the lab).