From 5573ebb8d2eeb58af24f1c58625b2225634a6fba Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Sun, 27 Jul 2025 15:07:18 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Redesign=20Collection=20Card=20L?= =?UTF-8?q?ayout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✨ Layout Improvements: - Moved Owner/Public badges as floating chips over thumbnails - Fixed truncated title and description by removing inline badges - Added proper spacing and line-height for better readability - Removed PermissionIndicator from inline position 🆕 New Creator/View Section: - Added creator avatar and name below tags - Added View button for better UX - Separated with border-top for visual hierarchy - Creator info shows first letter avatar and username 🔧 Enhanced Interactions: - Edit/Delete buttons now only show on hover - Better button positioning and spacing - Improved click targets and accessibility The layout now has proper spacing and no truncated text! 🎯 --- pages/collections.js | 104 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 84 insertions(+), 20 deletions(-) diff --git a/pages/collections.js b/pages/collections.js index 640dd09..0748e7b 100644 --- a/pages/collections.js +++ b/pages/collections.js @@ -256,12 +256,25 @@ export default function Collections() { // If there's a custom image, show it if (image) { return ( -
+
{collection.name} + {/* Floating badges over custom image */} +
+ {collection.userRole === 'owner' && ( + + 👑 Owner + + )} + {collection.isPublic && ( + + 🌍 Public + + )} +
); } @@ -269,11 +282,24 @@ export default function Collections() { // If no cards, show crying emoji if (!thumbnails || thumbnails.length === 0) { return ( -
+
😢

No cards yet

+ {/* Floating badges over empty state */} +
+ {collection.userRole === 'owner' && ( + + 👑 Owner + + )} + {collection.isPublic && ( + + 🌍 Public + + )} +
); } @@ -282,7 +308,7 @@ export default function Collections() { const gridCards = thumbnails.slice(1, 5); // Get up to 4 cards for the 2x2 grid return ( -
+
{/* Main card (larger, left side) */}
{mainCard ? ( @@ -321,6 +347,20 @@ export default function Collections() { })}
+ + {/* Floating badges over card layout */} +
+ {collection.userRole === 'owner' && ( + + 👑 Owner + + )} + {collection.isPublic && ( + + 🌍 Public + + )} +
); }; @@ -448,25 +488,14 @@ export default function Collections() { {/* Collection Info */}
- {/* Header with name and actions */} -
-
-

+ {/* Header with name and description - more space */} +
+
+

{collection.name}

- {collection.description && ( -

- {collection.description} -

- )} -
-
- -
+ {/* Edit/Delete buttons moved to hover only */} +
+ {collection.description && ( +

+ {collection.description} +

+ )}
{/* Compact Stats */} @@ -541,6 +575,36 @@ export default function Collections() { )}
)} + + {/* Creator/Facepile and View Button Row */} +
+
+ {/* Creator info or facepile */} +
+
+ {collection.creator ? collection.creator.charAt(0).toUpperCase() : 'A'} +
+ + {collection.creator ? collection.creator.split('@')[0] : 'alice'} + +
+ {/* Additional collaborators could go here as overlapping avatars */} +
+ +

))}