The globe opens full screen; a phone held sideways keeps its feed
On a phone the globe is a banner above the feed; a tap on it now opens it full screen over everything, with a close button (Escape closes it too), the focus moving to that button and back, and the feed underneath kept as it was but out of reach (inert). The camera refits the new shape. Held sideways, a phone (a window at most 30rem tall, the new short: variant) has no room for the banner: the banner and its toggle give way to a button that opens the globe full screen. isMobileMedia, which picks the first visit's default, agrees with Tailwind's md now (it was off by one) and counts a phone held sideways. GlobePanel tells its state (data-globe-state). Phone flows: the globe opens full screen and closes, and a sideways phone keeps a feed at least 180px tall with no sideways scroll. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
8f15d0d5c1
commit
931b7fcff1
9 files changed
+139
-8
No files matched your search
+15
-4
@@ -13,11 +13,13 @@
|
||||
the stream tells is applied at once. *@
|
||||
<div class="flex flex-col lg:grid lg:grid-cols-[minmax(0,1fr)_minmax(320px,42%)] gap-3 md:gap-4 w-full h-full">
|
||||
|
||||
<aside class="@(Filter.ShowGlobe ? "block" : "hidden") lg:block lg:order-last relative h-56 sm:h-64 lg:h-full flex-none min-h-0 rounded-xl neo-raised neo-xs overflow-hidden">
|
||||
<GlobePanel @ref="globe" ScrollContainerId="@ScrollId" Posts="posts" />
|
||||
@* full screen over everything once a phone's banner is tapped; the feed underneath stays as it was, out of reach *@
|
||||
<aside class="@GlobeClass" role="@(globeExpanded ? "dialog" : null)" aria-modal="@(globeExpanded ? "true" : null)"
|
||||
aria-label="@(globeExpanded ? Localizer["Globe"] : null)">
|
||||
<GlobePanel @ref="globe" ScrollContainerId="@ScrollId" Posts="posts" @bind-Expanded="globeExpanded" />
|
||||
</aside>
|
||||
|
||||
<section class="flex flex-col gap-3 min-h-0 flex-1 lg:h-full">
|
||||
<section class="flex flex-col gap-3 min-h-0 flex-1 lg:h-full" inert="@globeExpanded">
|
||||
@if (!isComposing)
|
||||
{
|
||||
@* on a phone a new post starts from a button under the thumb; from md, from the feed's tabs *@
|
||||
@@ -27,7 +29,7 @@
|
||||
<i class="ion-md-create text-xl" aria-hidden="true"></i>
|
||||
</DButton>
|
||||
}
|
||||
<FeedTabs Filter="Filter" Groups="groups" Lists="lists" UnreadNotifications="unreadNotifications" UnreadConversations="unreadConversations" Stats="FeedStats()" IsComposing="isComposing" OnCompose="ToggleCompose"
|
||||
<FeedTabs Filter="Filter" Groups="groups" Lists="lists" UnreadNotifications="unreadNotifications" UnreadConversations="unreadConversations" Stats="FeedStats()" IsComposing="isComposing" OnCompose="ToggleCompose" OnGlobeFull="() => globeExpanded = true"
|
||||
OnChanged="ChangeFeed" />
|
||||
|
||||
<div class="relative flex-1 min-h-0 neo-inset neo-xs rounded-xl">
|
||||
@@ -141,6 +143,15 @@
|
||||
string loadError;
|
||||
bool isLoadingMore;
|
||||
bool isComposing;
|
||||
bool globeExpanded;
|
||||
|
||||
// a phone's banner (none when the phone is held sideways: the feed would have no room), the column from lg, or
|
||||
// full screen
|
||||
string GlobeClass => globeExpanded
|
||||
? "fixed inset-0 z-[70] block h-dvh w-full overflow-hidden bg-base-100"
|
||||
: Filter.ShowGlobe
|
||||
? "block max-lg:short:hidden lg:block lg:order-last relative h-56 sm:h-64 lg:h-full flex-none min-h-0 rounded-xl neo-raised neo-xs overflow-hidden"
|
||||
: "hidden lg:block lg:order-last relative h-56 sm:h-64 lg:h-full flex-none min-h-0 rounded-xl neo-raised neo-xs overflow-hidden";
|
||||
(double Latitude, double Longitude)? position;
|
||||
string positionError;
|
||||
string loadedPersonaId;
|
||||
|
||||
Reference in new issue
Block a user