Files
AudiOhm/design-system/pages/search.md
T
root 85dad89d5b feat: Modernisation UI/UX et configuration Flutter multi-plateforme
Phase 1 - Corrections Critiques:
- Fixed memory leaks dans music_provider.dart (stream subscriptions)
- Fixed race conditions dans search_provider.dart (stale results)
- Fixed token refresh errors dans api_service.dart
- Improved error handling avec messages utilisateur
- Changed API URL to HTTPS by default

Phase 2 - Améliorations UX Desktop:
- Ajouté cursor pointers sur tous les éléments cliquables
- Implémenté hover states avec effets néon glow (200ms transitions)
- Créé skeleton loading states avec shimmer animation
- Ajouté widgets: ClickableWrapper, ErrorDisplay, SkeletonLoading
- Enhanced visual feedback pour desktop users

Phase 3 - Configuration Flutter:
- Configuré Android (Gradle 8.1.0, Kotlin 1.9.0, minSdk 21, targetSdk 34)
- Créé launcher icons cyberpunk néon (5 densités)
- Configuré Windows desktop (structure complète)
- Activé Linux desktop support
- Ajouté package équatable pour entités de domaine
- Corrigé imports (colors.dart, auth_provider.dart)
- Fixed Dio API compatibility (RequestOptions)

Documentation:
- STYLE_GUIDE.md: Guide complet (100+ pages)
- DESIGN_IMPLEMENTATION_GUIDE.md: Implémentation Flutter
- BUILD_STATUS.md: Status builds + troubleshooting
- QUICKSTART_BUILDS.md: Guide rapide
- BUILD_INDEX.md: Index documentation
- PHASE_1_CORRECTIONS.md: Corrections Phase 1
- PHASE_2_UX_IMPROVEMENTS.md: Améliorations Phase 2
- PR_REVIEW_SUMMARY.md: Revue code complète
- CODE_ANALYSIS_AND_PRIORITIES.md: Analyse code

Scripts & Builds:
- BUILD_ALL.sh: Script automatisé builds multi-plateforme
- builds/: Structure avec README par plateforme
- design-system/: Système de design complet

Backend:
- Ajouté streaming HTTP Range pour audio progressif
- Enhanced YouTube service avec métadonnées complètes
- Improved error handling et validation

Generated with [Claude Code](https://claude.com/claude-code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-19 07:44:40 +00:00

637 lines
11 KiB
Markdown

# Search Page Design Override
## Purpose
This file contains **page-specific design rules** that **override** the master design system for the Search page.
## Key Differences from Master
### Layout Structure
- **Large, prominent search bar** at top (72px height)
- **Search tabs** (All, Songs, Artists, Albums, Playlists)
- **Results grid** (responsive: 6 col desktop, 4 tablet, 2 mobile)
- **Recent searches** with clear button
- **Trending searches** as suggestions
### Visual Hierarchy
1. **Search Input** - Dominant, focused element
2. **Search Tabs** - Secondary navigation
3. **Results Count** - Tertiary info
4. **Filter/Sort Controls** - Quaternary
### Search Bar Styling
- Larger height (48px input, vs 40px in master)
- Prominent search icon
- Clear button appears on type
- Recent searches dropdown
## Components
### Search Input Field
```css
.search-container {
position: sticky;
top: 0;
background: rgba(10, 14, 39, 0.95);
backdrop-filter: blur(20px);
padding: 20px 0;
z-index: 20;
border-bottom: 1px solid #2A2F4A;
}
.search-input-wrapper {
position: relative;
max-width: 800px;
margin: 0 auto;
}
.search-input {
width: 100%;
height: 56px;
background: #151932;
border: 2px solid #2A2F4A;
border-radius: 28px;
padding: 0 60px 0 60px;
font-size: 18px;
font-weight: 400;
color: #F0F4F8;
transition: all 200ms ease;
}
.search-input::placeholder {
color: #6B7280;
}
.search-input:focus {
outline: none;
border-color: #00F0FF;
box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.1);
background: #1F2342;
}
.search-input-icon {
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
width: 24px;
height: 24px;
color: #6B7280;
pointer-events: none;
transition: color 200ms ease;
}
.search-input:focus + .search-input-icon {
color: #00F0FF;
}
.search-clear-button {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
width: 32px;
height: 32px;
background: #2A2F4A;
border: none;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
opacity: 0;
visibility: hidden;
transition: all 200ms ease;
}
.search-input:not(:placeholder-shown) + .search-input-icon ~ .search-clear-button {
opacity: 1;
visibility: visible;
}
.search-clear-button:hover {
background: #3B4259;
}
```
### Search Tabs
```css
.search-tabs {
display: flex;
gap: 8px;
padding: 20px 0;
overflow-x: auto;
scrollbar-width: none;
}
.search-tabs::-webkit-scrollbar {
display: none;
}
.search-tab {
padding: 10px 20px;
background: transparent;
border: none;
border-radius: 20px;
font-size: 14px;
font-weight: 500;
color: #9BA3B8;
cursor: pointer;
transition: all 200ms ease;
white-space: nowrap;
}
.search-tab:hover {
color: #F0F4F8;
background: rgba(240, 244, 248, 0.05);
}
.search-tab.active {
background: #F0F4F8;
color: #0A0E27;
font-weight: 600;
}
```
### Recent Searches
```css
.recent-searches-section {
padding: 32px 0;
}
.recent-searches-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
}
.recent-searches-title {
font-size: 20px;
font-weight: 600;
color: #F0F4F8;
}
.clear-recent-button {
font-size: 14px;
font-weight: 500;
color: #00F0FF;
background: transparent;
border: none;
cursor: pointer;
transition: opacity 200ms ease;
}
.clear-recent-button:hover {
opacity: 0.8;
}
.recent-search-item {
display: flex;
align-items: center;
gap: 16px;
padding: 16px 20px;
background: #151932;
border-radius: 12px;
cursor: pointer;
transition: all 200ms ease;
border: 1px solid transparent;
}
.recent-search-item:hover {
background: #1F2342;
border-color: #2A2F4A;
}
.recent-search-icon {
width: 20px;
height: 20px;
color: #6B7280;
flex-shrink: 0;
}
.recent-search-text {
flex: 1;
font-size: 16px;
font-weight: 400;
color: #F0F4F8;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.recent-search-remove {
width: 32px;
height: 32px;
background: transparent;
border: none;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
opacity: 0;
transition: all 200ms ease;
}
.recent-search-item:hover .recent-search-remove {
opacity: 1;
}
.recent-search-remove:hover {
background: rgba(255, 59, 59, 0.1);
color: #FF3B3B;
}
```
### Search Results Grid
```css
.search-results {
padding: 32px 0;
}
.results-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24px;
}
.results-count {
font-size: 14px;
font-weight: 500;
color: #9BA3B8;
}
.results-sort {
display: flex;
align-items: center;
gap: 12px;
}
.sort-dropdown {
padding: 8px 16px;
background: #151932;
border: 1px solid #2A2F4A;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
color: #F0F4F8;
cursor: pointer;
transition: all 200ms ease;
}
.sort-dropdown:hover {
border-color: #00F0FF;
}
/* Results grid layout */
.results-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 24px;
}
/* Song results (list view) */
.song-results-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.song-result-item {
display: grid;
grid-template-columns: 48px 1fr auto auto auto;
gap: 16px;
align-items: center;
padding: 12px 16px;
background: transparent;
border-radius: 8px;
cursor: pointer;
transition: all 200ms ease;
}
.song-result-item:hover {
background: rgba(240, 244, 248, 0.05);
}
.song-result-number {
font-size: 14px;
font-weight: 500;
color: #6B7280;
}
.song-result-info {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
}
.song-result-image {
width: 48px;
height: 48px;
object-fit: cover;
border-radius: 6px;
flex-shrink: 0;
}
.song-result-title {
font-size: 16px;
font-weight: 500;
color: #F0F4F8;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.song-result-artist {
font-size: 14px;
font-weight: 400;
color: #9BA3B8;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.song-result-album {
font-size: 14px;
font-weight: 400;
color: #9BA3B8;
}
.song-result-duration {
font-size: 14px;
font-weight: 500;
color: #6B7280;
}
.song-result-actions {
display: flex;
align-items: center;
gap: 8px;
opacity: 0;
transition: opacity 200ms ease;
}
.song-result-item:hover .song-result-actions {
opacity: 1;
}
.icon-button {
width: 36px;
height: 36px;
background: transparent;
border: none;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: #9BA3B8;
transition: all 200ms ease;
}
.icon-button:hover {
color: #F0F4F8;
background: rgba(240, 244, 248, 0.1);
}
```
### Trending Searches
```css
.trending-searches-section {
padding: 32px 0;
border-top: 1px solid #2A2F4A;
}
.trending-searches-title {
font-size: 18px;
font-weight: 600;
color: #F0F4F8;
margin-bottom: 20px;
}
.trending-searches-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.trending-search-item {
display: flex;
align-items: center;
gap: 16px;
padding: 12px 16px;
border-radius: 8px;
cursor: pointer;
transition: all 200ms ease;
}
.trending-search-item:hover {
background: rgba(240, 244, 248, 0.05);
}
.trending-rank {
font-size: 18px;
font-weight: 700;
color: #00F0FF;
width: 32px;
flex-shrink: 0;
}
.trending-search-content {
flex: 1;
}
.trending-search-query {
font-size: 16px;
font-weight: 500;
color: #F0F4F8;
margin-bottom: 4px;
}
.trending-search-meta {
font-size: 13px;
font-weight: 400;
color: #6B7280;
}
.trending-arrow {
width: 20px;
height: 20px;
color: #6B7280;
flex-shrink: 0;
}
```
### No Results State
```css
.no-results-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120px 40px;
text-align: center;
}
.no-results-icon {
width: 100px;
height: 100px;
color: #2A2F4A;
margin-bottom: 24px;
}
.no-results-title {
font-size: 28px;
font-weight: 600;
color: #F0F4F8;
margin-bottom: 12px;
}
.no-results-query {
color: #00F0FF;
}
.no-results-description {
font-size: 16px;
font-weight: 400;
color: #9BA3B8;
margin-bottom: 8px;
max-width: 500px;
}
.no-results-suggestions {
font-size: 14px;
font-weight: 400;
color: #6B7280;
margin-bottom: 32px;
}
.no-results-tips {
display: flex;
flex-direction: column;
gap: 12px;
text-align: left;
}
.no-results-tip {
display: flex;
align-items: center;
gap: 12px;
font-size: 14px;
font-weight: 400;
color: #9BA3B8;
}
.no-results-tip-icon {
width: 16px;
height: 16px;
color: #00F0FF;
flex-shrink: 0;
}
```
### Search Filters
```css
.search-filters {
display: flex;
align-items: center;
gap: 12px;
padding: 20px 0;
flex-wrap: wrap;
}
.filter-chip {
padding: 8px 16px;
background: #151932;
border: 1px solid #2A2F4A;
border-radius: 20px;
font-size: 13px;
font-weight: 500;
color: #9BA3B8;
cursor: pointer;
transition: all 200ms ease;
display: flex;
align-items: center;
gap: 8px;
}
.filter-chip:hover {
border-color: #00F0FF;
color: #F0F4F8;
}
.filter-chip.active {
background: linear-gradient(135deg, #00F0FF 0%, #00C8FF 100%);
border-color: #00F0FF;
color: #0A0E27;
}
.filter-chip-remove {
width: 16px;
height: 16px;
opacity: 0.7;
}
.filter-chip-remove:hover {
opacity: 1;
}
```
## Responsive Adjustments
### Mobile (< 768px)
- Search input height: 48px
- Search tabs: Scrollable horizontally
- Results grid: 2 columns
- Song list: Compact (hide album column)
- Filters: Horizontal scroll
### Tablet (768px - 1024px)
- Search input height: 52px
- Results grid: 4 columns
- Song list: Full layout
### Desktop (> 1024px)
- Use default sizes above
- Results grid: 6 columns
## Search Behavior
### Debouncing
- Wait **300ms** after typing before sending search request
- Cancel previous requests if user continues typing
### Keyboard Navigation
- **Escape**: Clear search and focus search input
- **Tab**: Navigate through results
- **Enter**: Search on press or navigate to first result
- **Arrow Down/Up**: Navigate through results list
### Search Suggestions
- Show **5 recent searches** max
- Show **10 trending searches** max
- Highlight matching text in results
## Additional Anti-Patterns for Search
**NEVER search on every keystroke** - Debounce for 300ms
**NEVER show results before user types** - Start with recent/trending
**NEVER hide clear button** - Always visible when input has text
**NEVER mix result types** - Use tabs to separate
**NEVER skip empty state** - Provide helpful tips
**NEVER ignore search history** - Save and show recent searches
**NEVER use instant navigation** - Let user review results first
---
*These page-specific rules override the master design system for the search page only.*