🎨 Improved Collection Detail UI Hierarchy

Enhanced visual hierarchy and button styling:

 Repositioned TCG Tags:
- Moved from header to under description
- Shows only games with cards (dynamic filtering)
- Clean rounded blue tags for better UX

🎯 Improved Button Hierarchy:
- Changed Generate AI Image to ghost outline button
- Changed Invite Collaborator to ghost outline button
- Changed view toggle to white buttons with shadow
- Add Cards remains the only primary purple button

🎨 Visual Improvements:
- Cleaner header with just back button
- Better information flow: title → description → tags → stats
- Consistent ghost styling for secondary actions
- Primary action (Add Cards) now stands out clearly

📱 Enhanced UX:
- TCG tags dynamically show only relevant games
- Clear visual hierarchy guides user attention
- Consistent button styling throughout interface
- Better spacing and information organization

Result: Cleaner, more focused collection interface! 🚀
This commit is contained in:
Randall Stillwell 2025-07-25 17:19:52 -05:00
parent 891b1c9456
commit 985136ac3f

View file

@ -189,8 +189,8 @@ export default function CollectionView() {
{/* Header */} {/* Header */}
<div className="p-6 border-b" style={{ backgroundColor: 'var(--bg-secondary)', borderColor: 'var(--border)' }}> <div className="p-6 border-b" style={{ backgroundColor: 'var(--bg-secondary)', borderColor: 'var(--border)' }}>
<div className="flex items-center justify-between mb-6"> <div className="flex items-center justify-between mb-6">
{/* Back button and TCG tabs */} {/* Back button */}
<div className="flex items-center space-x-6"> <div className="flex items-center">
<Link href="/collections"> <Link href="/collections">
<button className="flex items-center text-sm font-medium hover:underline" style={{ color: 'var(--text-secondary)' }}> <button className="flex items-center text-sm font-medium hover:underline" style={{ color: 'var(--text-secondary)' }}>
<svg className="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg className="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@ -199,23 +199,6 @@ export default function CollectionView() {
Back to collections Back to collections
</button> </button>
</Link> </Link>
{/* TCG Tabs */}
<div className="flex space-x-1">
{['MTG', 'Lorcana', 'Pokemon'].map((tcg) => (
<button
key={tcg}
onClick={() => setSelectedTCG(tcg)}
className={`px-3 py-1 text-xs font-medium rounded ${
selectedTCG === tcg
? 'bg-blue-100 text-blue-800'
: 'bg-gray-100 text-gray-600 hover:bg-gray-200'
}`}
>
{tcg}
</button>
))}
</div>
</div> </div>
{/* Action buttons */} {/* Action buttons */}
@ -223,7 +206,7 @@ export default function CollectionView() {
<button className="px-4 py-2 text-sm font-medium border rounded-lg hover:bg-gray-50" style={{ borderColor: 'var(--border)', color: 'var(--text-primary)' }}> <button className="px-4 py-2 text-sm font-medium border rounded-lg hover:bg-gray-50" style={{ borderColor: 'var(--border)', color: 'var(--text-primary)' }}>
Upload Image Upload Image
</button> </button>
<button className="px-4 py-2 text-sm font-medium bg-purple-600 text-white rounded-lg hover:bg-purple-700"> <button className="px-4 py-2 text-sm font-medium border rounded-lg hover:bg-gray-50" style={{ borderColor: 'var(--border)', color: 'var(--text-primary)' }}>
🪄 Generate AI Image 🪄 Generate AI Image
</button> </button>
</div> </div>
@ -238,6 +221,20 @@ export default function CollectionView() {
{collection.description} {collection.description}
</p> </p>
{/* TCG Tags */}
<div className="flex items-center space-x-2 mb-4">
{Object.entries(gameStats).map(([game, count]) =>
count > 0 ? (
<span
key={game}
className="px-3 py-1 text-xs font-medium rounded-full bg-blue-100 text-blue-800"
>
{game}
</span>
) : null
)}
</div>
{/* Creator and Stats */} {/* Creator and Stats */}
<div className="flex items-center space-x-6 text-sm" style={{ color: 'var(--text-secondary)' }}> <div className="flex items-center space-x-6 text-sm" style={{ color: 'var(--text-secondary)' }}>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
@ -297,7 +294,7 @@ export default function CollectionView() {
</div> </div>
<div className="flex items-center space-x-4"> <div className="flex items-center space-x-4">
<button className="px-4 py-2 text-sm font-medium bg-blue-600 text-white rounded-lg hover:bg-blue-700"> <button className="px-4 py-2 text-sm font-medium border rounded-lg hover:bg-gray-50" style={{ borderColor: 'var(--border)', color: 'var(--text-primary)' }}>
📧 Invite Collaborator 📧 Invite Collaborator
</button> </button>
@ -403,7 +400,7 @@ export default function CollectionView() {
<div className="flex rounded-lg border" style={{ borderColor: 'var(--border)' }}> <div className="flex rounded-lg border" style={{ borderColor: 'var(--border)' }}>
<button <button
onClick={() => setViewMode('grid')} onClick={() => setViewMode('grid')}
className={`p-2 rounded-l-lg ${viewMode === 'grid' ? 'bg-purple-600 text-white' : 'bg-transparent'}`} className={`p-2 rounded-l-lg ${viewMode === 'grid' ? 'bg-white text-gray-900 shadow-sm' : 'bg-transparent hover:bg-gray-50'}`}
style={viewMode !== 'grid' ? { color: 'var(--text-secondary)' } : {}} style={viewMode !== 'grid' ? { color: 'var(--text-secondary)' } : {}}
> >
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@ -412,7 +409,7 @@ export default function CollectionView() {
</button> </button>
<button <button
onClick={() => setViewMode('list')} onClick={() => setViewMode('list')}
className={`p-2 rounded-r-lg ${viewMode === 'list' ? 'bg-purple-600 text-white' : 'bg-transparent'}`} className={`p-2 rounded-r-lg ${viewMode === 'list' ? 'bg-white text-gray-900 shadow-sm' : 'bg-transparent hover:bg-gray-50'}`}
style={viewMode !== 'list' ? { color: 'var(--text-secondary)' } : {}} style={viewMode !== 'list' ? { color: 'var(--text-secondary)' } : {}}
> >
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">