Skip to content

The Market and Settings show as many panes as the window has room for - #72

Open
McCal-Codes wants to merge 1 commit into
mainfrom
two-panes
Open

McCal-Codes wants to merge 1 commit into
mainfrom
two-panes

Conversation

@McCal-Codes

Copy link
Copy Markdown
Owner

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:

  • Market list: with nothing open, the list takes the whole pane, in two columns once each gets about 320 dp. Before, it kept 360 dp next to empty black.
  • Packages and sources push over the list with a back label naming where Back goes (‹ Packages, ‹ Sources, or the source's name). The list keeps its scroll position per tab.
  • Settings: nested pages (a Focus, a tweak, Other Notifications) push inside the page column instead of opening a third column.
  • The Market's Settings tab gets Settings' iPhone layout beside the Market sidebar (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, LocalSettingsMaxColumns
  • MarketScreen.kt: beside replaces split for side by side, full-width list, two-column rows, hoisted list state, back titles
  • CustomizationSheet.kt: two small lines (the column cap, and split also needs two columns to spare)

Checked

  • Unit tests: 481 pass (new MarketPanesTest, SettingsColumnsTest updated for 1200 dp, LabSettingsParityTest expects 1200 in both the app and the lab).
  • On a Fold8 inner screen (Folio Dev): Packages list, a package pushed with ‹ Packages, a source page with ‹ Sources, a package from that source with ‹ Folio, system Back, the Market's Settings tab, and Focus › Sleep with ‹ Focus.
  • Not on a device: unfolded portrait and 1200 dp and wider (covered by the width rules' tests).

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +373 to +374
state = listState,
columns = if (narrow) 1 else marketListColumns(maxWidth.value),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment on lines +852 to +854
// 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) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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