feat(native): Android tablets get the shortcuts, two panes meet at a foldable's fold

The Android shell now reports keyCommands and windowLayout, so the large
screen layout no longer assumes an iPad:

- The keyboard host hands the shortcuts to the app whenever the shell has
  the keyCommands feature, whatever the platform. Before it also required
  iOS, so an Android tablet with a keyboard answered the keys in the page
  and never listed them in the system's shortcuts.
- useWindowFold follows the layout the Android shell reports (feature
  windowLayout). When a vertical fold separates the window, a foldable half
  open like a book, MobileShell marks it with data-fold and its place, and
  the leading pane (the trip's plan, a tab's summary, a list beside its
  detail) ends at the fold while the trailing one starts there, on either
  reading direction. A flat fold that does not separate stays one screen.
- The split size class starts at 840pt, Android's expanded width, instead
  of 900pt, so a foldable unfolded on its side (about 841dp) gets two panes
  like an iPad does. An 11" iPad upright (834pt) stays a single pane. The
  address screen of the native shell follows the same width.
- TrekShell exports NativeWindowLayout for it.

Also: the sheet's width and anchor types and the collab board type stay
private to their modules, which nothing else imports (knip).
This commit is contained in:
Maurice
2026-11-07 17:27:19 +01:00
parent 7083667cbf
commit 6906f80ff8
14 changed files with 255 additions and 17 deletions
+18
View File
@@ -589,6 +589,24 @@
--m-pane-trail-w: env(viewport-segment-width 1 0, 50vw);
}
}
/* The Android app reports a foldable's fold itself (native/windowFold.ts):
MobileShell marks a vertical fold that separates the window with data-fold
and its place in --m-fold-start/--m-fold-end, and the panes meet there. The
leading side follows the reading direction, the fold's place does not. */
.m-root[data-fold='vertical'] {
--m-pane-aside-w: calc(var(--m-fold-start) - var(--m-rail-w, 0px));
--m-pane-trail-w: calc(100vw - var(--m-fold-end));
}
.m-root[data-fold='vertical'] .m-trip {
--trip-pane-open: calc(var(--m-fold-start) - var(--m-rail-w, 0px));
}
:root[dir='rtl'] .m-root[data-fold='vertical'] {
--m-pane-aside-w: calc(100vw - var(--m-fold-end) - var(--m-rail-w, 0px));
--m-pane-trail-w: var(--m-fold-start);
}
:root[dir='rtl'] .m-root[data-fold='vertical'] .m-trip {
--trip-pane-open: calc(100vw - var(--m-fold-end) - var(--m-rail-w, 0px));
}
.m-pane-aside {
width: var(--m-pane-aside-w);
}