- Audited all files with view mode toggle (6 files total) - Found list view is actively used and is default in 3 contexts: - SearchPageView: List is default for search results - FileManagerView: List is default for file browsing - CloudFileBrowser: List is default for cloud files - Grid view is default in track browsing contexts (LibraryPage, LibraryManager, ProfileView) - Recommendation: Keep list view - serves different purposes than grid view - Created comprehensive audit report: apps/web/docs/LIST_VIEW_USAGE_AUDIT.md - Includes context-specific analysis and recommendations
5.9 KiB
5.9 KiB
List View Usage Audit
Date: 2025-01-27
Action: 10.2.1.1 - Check if list view is used
Purpose: Determine usage of list view mode across the application to inform removal decision
Summary
- Total files with view mode toggle: 6 files
- Files with list view as default: 3 files
- Files with grid view as default: 3 files
- List view actively used: ✅ Yes, in multiple contexts
Files Using View Mode Toggle
1. Library Page
- File:
apps/web/src/features/library/pages/LibraryPage.tsx - Default view:
'grid' - Lines: 76 (state), 393-416 (toggle), 767 (conditional render)
- Usage: Library tracks can be viewed in grid or list mode
- Context: Main library page for browsing tracks
- Status: List view is available but grid is default
2. Library Manager Component
- File:
apps/web/src/features/library/components/LibraryManager.tsx - Default view:
'grid' - Lines: 41 (state), 204-217 (toggle), 250-268 (conditional render)
- Usage: Library manager component with view toggle
- Context: Reusable library component
- Status: List view is available but grid is default
3. Profile View
- File:
apps/web/src/components/views/ProfileView.tsx - Default view:
'grid' - Lines: 151 (state), 439-440 (toggle)
- Usage: User profile view with track display
- Context: Profile page for viewing user's tracks
- Status: List view is available but grid is default
4. Search Page View
- File:
apps/web/src/components/views/SearchPageView.tsx - Default view:
'list'⚠️ - Lines: 28 (state), 110-120 (toggle)
- Usage: Search results display
- Context: Global search page
- Status: List view is the default - actively used
5. File Manager View
- File:
apps/web/src/components/views/FileManagerView.tsx - Default view:
'list'⚠️ - Lines: 92 (state), 189-203 (toggle), 268 (conditional render)
- Usage: File browser with list/grid toggle
- Context: File management interface
- Status: List view is the default - actively used
6. Cloud File Browser
- File:
apps/web/src/components/studio/CloudFileBrowser.tsx - Default view:
'list'⚠️ - Lines: 39 (state), 276-277 (toggle), 294 (conditional render)
- Usage: Cloud file browser in studio
- Context: Studio cloud file management
- Status: List view is the default - actively used
Usage Analysis
List View as Default (3 files)
- SearchPageView - List view is default for search results
- FileManagerView - List view is default for file browsing
- CloudFileBrowser - List view is default for cloud files
Conclusion: List view is actively used and is the preferred default for file management and search contexts.
Grid View as Default (3 files)
- LibraryPage - Grid view is default for track library
- LibraryManager - Grid view is default for track library
- ProfileView - Grid view is default for profile tracks
Conclusion: Grid view is preferred for track/media browsing contexts.
View Toggle Component
- Component:
apps/web/src/features/tracks/components/ViewToggle.tsx - Purpose: Reusable view toggle component
- Features: Persists preference, supports labels
- Status: Used across multiple pages
Recommendations
Option 1: Keep List View (Recommended)
- Rationale: List view is actively used and is the default in 3 important contexts (search, file management, cloud browser)
- Action: Keep list view, potentially make it less prominent in track browsing contexts only
- Impact: No breaking changes
Option 2: Remove List View from Track Browsing Only
- Rationale: List view is less useful for track browsing (grid is better for visual content)
- Action: Remove list view from LibraryPage, LibraryManager, ProfileView
- Keep: List view in SearchPageView, FileManagerView, CloudFileBrowser
- Impact: Medium - removes feature from 3 pages
Option 3: Remove List View Everywhere
- Rationale: Simplify UI by removing one choice
- Action: Remove all list view toggles, use grid view everywhere
- Impact: HIGH - breaks file management UX (list is better for files)
Statistics
- Total view mode toggles: 6 instances
- List view as default: 3 instances (50%)
- Grid view as default: 3 instances (50%)
- List view actively rendered: 6 instances (100% - all have conditional rendering)
Context-Specific Usage
File Management Contexts (List Preferred)
- FileManagerView: List is default ✅
- CloudFileBrowser: List is default ✅
- Reason: List view is better for file browsing (shows metadata, easier scanning)
Search Context (List Preferred)
- SearchPageView: List is default ✅
- Reason: List view is better for search results (shows more info, easier scanning)
Media Browsing Contexts (Grid Preferred)
- LibraryPage: Grid is default ✅
- LibraryManager: Grid is default ✅
- ProfileView: Grid is default ✅
- Reason: Grid view is better for visual content (tracks, images)
Conclusion
List view is actively used and serves an important purpose:
- File management: List view is the default and preferred for browsing files
- Search results: List view is the default and preferred for search
- Track browsing: Grid view is preferred, but list view is still available
Recommendation: Keep list view - it's actively used and serves different purposes than grid view. Consider making it less prominent only in track browsing contexts (LibraryPage, LibraryManager, ProfileView) if simplification is desired, but do not remove it from file management and search contexts.
Next Steps
- ✅ Audit complete (Action 10.2.1.1)
- ⏳ Decision: Keep list view or remove from specific contexts (Action 10.2.1.2)
- ⏳ If removing: Update affected pages to remove list view toggle
- ⏳ If keeping: Consider making list view less prominent in track browsing only