feat(ui): usable on phones without changing the desktop layout
Deploy / deploy (push) Successful in 3m19s
Deploy / deploy (push) Successful in 3m19s
At phone width the sidebar stayed 240px wide, leaving pages a ~135px strip. Below md it is now hidden behind a menu button in the header and opens as a drawer (closes on navigation, backdrop, X or Escape); from md up the sidebar is unchanged. Page wrappers use p-4 on phones and keep p-6/p-8 from md. Shot detail: on phones the thumbnail takes the full width with the details below it instead of pushing them off screen, the action buttons wrap, and the tab bar scrolls sideways. Desktop sizing is kept as it was. Every change is behind a md: breakpoint, so the desktop layout is the same. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,7 +69,7 @@ export default async function KanbanPage({
|
||||
]);
|
||||
|
||||
return (
|
||||
<div className="p-6 space-y-6 max-w-[1800px] mx-auto">
|
||||
<div className="p-4 md:p-6 space-y-6 max-w-[1800px] mx-auto">
|
||||
{/* Breadcrumb */}
|
||||
<div className="flex items-center gap-2 text-sm text-muted-foreground">
|
||||
<Link href="/projects" className="hover:text-foreground transition-colors">
|
||||
|
||||
@@ -123,7 +123,7 @@ export default async function ProjectPage({ params }: { params: Promise<{ id: st
|
||||
const doneTasks = project.tasks.filter((t) => t.status === "DONE").length;
|
||||
|
||||
return (
|
||||
<div className="p-8 space-y-6 max-w-[1600px] mx-auto">
|
||||
<div className="p-4 md:p-8 space-y-6 max-w-[1600px] mx-auto">
|
||||
{/* Breadcrumb */}
|
||||
<div className="flex items-center gap-2 text-sm text-zinc-500">
|
||||
<Link href="/projects" className="hover:text-white transition-colors">
|
||||
|
||||
@@ -230,7 +230,7 @@ export default function ShotDetailPage() {
|
||||
const { Icon: StatusIcon } = statusCfg;
|
||||
|
||||
return (
|
||||
<div className="p-6 space-y-6 max-w-[1400px] mx-auto">
|
||||
<div className="p-4 md:p-6 space-y-6 max-w-[1400px] mx-auto">
|
||||
{/* Breadcrumb */}
|
||||
<div className="flex items-center gap-2 text-sm text-muted-foreground">
|
||||
<Link href="/projects" className="hover:text-foreground transition-colors">
|
||||
@@ -245,7 +245,9 @@ export default function ShotDetailPage() {
|
||||
</div>
|
||||
|
||||
{/* Header */}
|
||||
<div className="flex items-start gap-6">
|
||||
{/* Phones: back button, then a full-width thumbnail, then the details
|
||||
below it. From md: one row, as on desktop. */}
|
||||
<div className="flex flex-wrap md:flex-nowrap items-start gap-4 md:gap-6">
|
||||
{/* Thumbnail – cinema scope 2.39:1 */}
|
||||
<Button variant="ghost" size="icon" asChild className="-ml-2 h-8 w-8">
|
||||
<Link href={`/projects/${params.id}`}>
|
||||
@@ -253,7 +255,7 @@ export default function ShotDetailPage() {
|
||||
</Link>
|
||||
</Button>
|
||||
{shotThumbnail(shot) && (
|
||||
<div className="relative flex-shrink-0 w-72 aspect-[2.39] rounded-lg overflow-hidden border border-border">
|
||||
<div className="relative flex-shrink-0 w-full md:w-72 aspect-[2.39] rounded-lg overflow-hidden border border-border">
|
||||
|
||||
<Image
|
||||
src={shotThumbnail(shot)!}
|
||||
@@ -263,10 +265,10 @@ export default function ShotDetailPage() {
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-3">
|
||||
|
||||
<h1 className="text-2xl font-bold font-mono">{shot.shotCode}</h1>
|
||||
<div className="space-y-2 min-w-0 w-full md:w-auto md:min-w-min">
|
||||
<div className="flex flex-wrap items-center gap-3">
|
||||
|
||||
<h1 className="text-2xl font-bold font-mono break-all md:break-normal">{shot.shotCode}</h1>
|
||||
|
||||
{/* Shot version badge — click to edit for managers */}
|
||||
{canManage ? (
|
||||
@@ -424,7 +426,7 @@ export default function ShotDetailPage() {
|
||||
)}
|
||||
|
||||
{canManage && (
|
||||
<div className="ml-auto shrink-0 flex items-center gap-2">
|
||||
<div className="ml-auto shrink-0 flex flex-wrap md:flex-nowrap items-center gap-2 w-full md:w-auto">
|
||||
{/* Internal approval action */}
|
||||
{canInternallyApprove && shot.shotApprovalStatus === "PENDING" && (
|
||||
<Button
|
||||
@@ -510,7 +512,8 @@ export default function ShotDetailPage() {
|
||||
|
||||
{/* Tabs */}
|
||||
<div>
|
||||
<div className="flex border-b border-border mb-5">
|
||||
{/* Phones: five tabs are wider than the screen, so the bar scrolls sideways. */}
|
||||
<div className="flex border-b border-border mb-5 overflow-x-auto overflow-y-hidden md:overflow-visible [&>button]:shrink-0 [&>button]:whitespace-nowrap">
|
||||
<button
|
||||
onClick={() => setActiveTab("tasks")}
|
||||
className={cn(
|
||||
|
||||
@@ -48,7 +48,7 @@ export default function ProjectsPage() {
|
||||
useScrollMemory("projects", pageRef, !isLoading);
|
||||
|
||||
return (
|
||||
<div ref={pageRef} className="p-8 space-y-6 max-w-[1600px] mx-auto">
|
||||
<div ref={pageRef} className="p-4 md:p-8 space-y-6 max-w-[1600px] mx-auto">
|
||||
<div className="flex items-center justify-between gap-4 mb-8">
|
||||
<div>
|
||||
<h1 className="text-3xl font-bold text-white">Projects</h1>
|
||||
|
||||
Reference in New Issue
Block a user