fix(mobile): plan landscape collapse + person picker, Odin page scroll, plan toolbar stacking
- PlanGrid maxHeight gets a 360px floor: calc(100dvh - 240px) left <160px in phone landscape and the rows vanished under the sticky header - Phones get a person picker above the plan grid (one column at a time, defaults to the logged-in user) - the multi-person grid never fit a portrait viewport; desktop unchanged - Odin chat height uses 100svh instead of 100dvh: dvh grows live as Android Chrome collapses its address bar, so the page always allowed a chrome-height scroll; svh sizes for the bar-visible viewport (verified zero overflow at 390x844 via Playwright) - Plan toolbar stacks into full-width rows on xs (headerActionsSx pattern from the detail pages); Dnes/arrows and Tyden/Mesic stay paired on one row each Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -667,19 +667,29 @@ export default function PlanWork() {
|
||||
</Box>
|
||||
)}
|
||||
|
||||
{/* Mobile: stacked full-width rows (same pattern as headerActionsSx on
|
||||
the detail pages); sm+ keeps the single wrapping toolbar row. The
|
||||
paired controls (Dnes/arrows, Týden/Měsíc) stay together as one
|
||||
full-width row each. */}
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
flexWrap: "wrap",
|
||||
alignItems: "center",
|
||||
flexDirection: { xs: "column", sm: "row" },
|
||||
flexWrap: { sm: "wrap" },
|
||||
alignItems: { xs: "stretch", sm: "center" },
|
||||
gap: 1.5,
|
||||
mb: 2,
|
||||
}}
|
||||
>
|
||||
{/* Nav buttons grouped so they stay on one row when the toolbar
|
||||
wraps on mobile. */}
|
||||
<Box sx={{ display: "inline-flex", gap: 1 }}>
|
||||
<Button variant="outlined" color="inherit" onClick={goToToday}>
|
||||
<Box sx={{ display: "flex", gap: 1 }}>
|
||||
<Button
|
||||
variant="outlined"
|
||||
color="inherit"
|
||||
onClick={goToToday}
|
||||
sx={{ flex: { xs: 1, sm: "0 0 auto" } }}
|
||||
>
|
||||
Dnes
|
||||
</Button>
|
||||
<Button
|
||||
@@ -701,8 +711,8 @@ export default function PlanWork() {
|
||||
</Box>
|
||||
<Box
|
||||
sx={{
|
||||
flex: 1,
|
||||
minWidth: 220,
|
||||
flex: { sm: 1 },
|
||||
minWidth: { sm: 220 },
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
@@ -727,7 +737,11 @@ export default function PlanWork() {
|
||||
<Box
|
||||
role="group"
|
||||
aria-label="Měřítko zobrazení"
|
||||
sx={{ display: "inline-flex", gap: 1 }}
|
||||
sx={{
|
||||
display: "flex",
|
||||
gap: 1,
|
||||
"& > button": { flex: { xs: 1, sm: "0 0 auto" } },
|
||||
}}
|
||||
>
|
||||
<Button
|
||||
variant={view === "week" ? "contained" : "outlined"}
|
||||
|
||||
Reference in New Issue
Block a user