forge
Explore
Log in

Don't you dare go Hollow

✉️ collapse the messages folder rail into a toolbar

Browse files at this commit

c8367007a19a6cfb1e545bbe4ae9e9c4b9ce3856Burak BoduroğluParent: d95087e
  • refactor
    • ✉️ collapse the messages folder rail into a toolbar
Show full message
refactor: ✉️ collapse the messages folder rail into a toolbar
- the page carried its own left sidebar next to the app shell's, so two
  vertical navs sat side by side and the reading pane lost width
- folders are now a horizontal toolbar above the list, scrollable on
  narrow screens, with compose pushed to the trailing edge
src/pages/messages-page.tsxmodified+15 -15
@@ -165,14 +165,14 @@ export default function MessagesPage() {
165165 <RouteGuard>
166166 <div class="min-h-[calc(100vh-7rem)] bg-background">
167167 <section class="data-shell overflow-hidden p-0 border-none">
168- <div class="flex flex-col md:flex-row min-h-[calc(100vh-7rem)]">
169- {/* Gmail Left Sidebar */}
170- <aside class="w-full md:w-60 border-r bg-card/60 p-4 shrink-0 space-y-6">
168+ <div class="flex min-h-[calc(100vh-7rem)] flex-col">
169+ {/* Folder toolbar — the app shell already owns the global sidebar. */}
170+ <aside class="flex flex-wrap items-center gap-2 border-b bg-card/60 px-3 py-2.5">
171171 {/* Compose Button */}
172172 <Button
173173 variant="outline"
174- size="lg"
175- class="w-full justify-start gap-3 text-xs"
174+ size="sm"
175+ class="order-2 ml-auto h-9 shrink-0 rounded-lg text-xs"
176176 onClick={() => {
177177 setReplyData(null);
178178 setComposeOpen(true);
@@ -182,14 +182,14 @@ export default function MessagesPage() {
182182 <span>{t("messages.newMessage")}</span>
183183 </Button>
184184
185- {/* Gmail Folder Navigation List */}
186- <nav class="space-y-1">
185+ {/* Folder navigation stays compact, leaving the only sidebar to the app shell. */}
186+ <nav class="order-1 flex min-w-0 max-w-full flex-1 items-center gap-1 overflow-x-auto">
187187 <button
188188 type="button"
189189 class={cn(
190- "flex h-9 w-full items-center justify-between rounded-r-full px-4 text-xs font-semibold transition-colors",
190+ "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",
191191 folder() === "inbox"
192- ? "bg-primary/10 text-primary font-bold"
192+ ? "bg-primary/10 text-primary"
193193 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"
194194 )}
195195 onClick={() =>
@@ -214,9 +214,9 @@ export default function MessagesPage() {
214214 <button
215215 type="button"
216216 class={cn(
217- "flex h-9 w-full items-center justify-between rounded-r-full px-4 text-xs font-semibold transition-colors",
217+ "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",
218218 folder() === "sent"
219- ? "bg-primary/10 text-primary font-bold"
219+ ? "bg-primary/10 text-primary"
220220 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"
221221 )}
222222 onClick={() =>
@@ -236,9 +236,9 @@ export default function MessagesPage() {
236236 <button
237237 type="button"
238238 class={cn(
239- "flex h-9 w-full items-center justify-between rounded-r-full px-4 text-xs font-semibold transition-colors",
239+ "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",
240240 folder() === "archive"
241- ? "bg-primary/10 text-primary font-bold"
241+ ? "bg-primary/10 text-primary"
242242 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"
243243 )}
244244 onClick={() =>
@@ -258,9 +258,9 @@ export default function MessagesPage() {
258258 <button
259259 type="button"
260260 class={cn(
261- "flex h-9 w-full items-center justify-between rounded-r-full px-4 text-xs font-semibold transition-colors",
261+ "flex h-8 shrink-0 items-center justify-between gap-2 rounded-lg px-3 text-xs font-semibold transition-colors",
262262 folder() === "trash"
263- ? "bg-destructive/10 text-destructive font-bold"
263+ ? "bg-destructive/10 text-destructive"
264264 : "text-muted-foreground hover:bg-muted/40 hover:text-foreground"
265265 )}
266266 onClick={() =>