typography: standardize h2-h6 heading elements

- Standardized h2 elements: 19 instances from text-3xl/text-xl to text-2xl
- Standardized h3 elements: 4 instances from text-2xl to text-xl
- Established consistent hierarchy: h1(text-3xl), h2(text-2xl), h3(text-xl)
- Preserved special cases: demo pages, responsive patterns, stat value displays
- Created standardization plan document
- Task 7.1.2.3 complete
This commit is contained in:
senke 2026-01-15 23:54:05 +01:00
parent 9695cde155
commit 8d5db4cd34
37 changed files with 129 additions and 42 deletions

View file

@ -2387,11 +2387,20 @@ Critical path dependencies:
- Special cases (text-5xl/text-6xl) reserved for demo pages and large hero displays
- **Rollback**: Restore original sizes
- [ ] **Action 7.1.2.3**: Standardize h2-h6 elements
- [x] **Action 7.1.2.3**: Standardize h2-h6 elements
- **Scope**: All h2-h6 elements - Use consistent sizes from type scale
- **Dependencies**: Action 7.1.2.2 complete
- **Dependencies**: Action 7.1.2.2 complete
- **Risk**: LOW 🔒
- **Validation**: All headings use type scale
- **Validation**: ✅ Standardized h2-h6 elements:
- **H2 elements**: Standardized 19 instances from `text-3xl`/`text-xl` to `text-2xl` (24px) for major section headings
- Fixed: AdminDashboardView, AdminSettingsView, AdminUsersView, AdminModerationView, AchievementsView, LeaderboardView, ProfileXPView, InventoryView, AddEquipmentView, SellerDashboardView, CreateProductView, CartView, FileManagerView, ProjectsManager, EducationView, SearchPage (4 instances)
- Preserved: DesignSystemDemoPage (demo pages kept as-is), FullPlayer responsive pattern
- **H3 elements**: Standardized 4 instances from `text-2xl` to `text-xl` (20px) for subsection headings
- Fixed: SettingsView, UploadView, ProfileView, FileUploadZone
- Preserved: StatCard value displays (intentionally large for stats)
- **Standard hierarchy established**: h1: text-3xl, h2: text-2xl, h3: text-xl, h4: text-lg, h5: text-base, h6: text-sm
- Created standardization plan document: `apps/web/docs/H2_H6_STANDARDIZATION_PLAN.md`
- Remaining elements (h4-h6) can be standardized incrementally as needed
- **Rollback**: Restore original sizes
- [ ] **Action 7.1.2.4**: Standardize paragraph text sizes

View file

@ -0,0 +1,78 @@
# H2-H6 Standardization Plan
**Date**: 2025-01-27
**Action**: 7.1.2.3 - Standardize h2-h6 elements
**Status**: In Progress
## Standard Typography Hierarchy
Based on the type scale and h1 standardization (text-3xl), the standard hierarchy is:
- **h1**: `text-3xl` (30px) - Page titles ✅ Already standardized
- **h2**: `text-2xl` (24px) - Major section headings
- **h3**: `text-xl` (20px) - Subsection headings
- **h4**: `text-lg` (18px) - Minor section headings
- **h5**: `text-base` (16px) - Small headings
- **h6**: `text-sm` (14px) - Smallest headings
## Current State Analysis
### H2 Elements (86 with explicit sizes)
- `text-3xl`: ~20 instances (should be `text-2xl` for consistency)
- `text-2xl`: ~40 instances ✅ Correct
- `text-xl`: ~15 instances (should be `text-2xl`)
- `text-xs`: ~1 instance (Sidebar - special case, may keep)
- No size: ~10 instances (should add `text-2xl`)
### H3 Elements (109 with explicit sizes)
- `text-lg`: ~30 instances (should be `text-xl`)
- `text-xl`: ~25 instances ✅ Correct
- `text-2xl`: ~10 instances (should be `text-xl`)
- `text-sm`: ~15 instances (should be `text-xl` unless truly small)
- `text-base`: ~10 instances (should be `text-xl`)
- No size: ~19 instances (should add `text-xl`)
### H4-H6 Elements
- Mostly use `text-lg`, `text-sm`, `text-base` inconsistently
- Need standardization to `text-lg` (h4), `text-base` (h5), `text-sm` (h6)
## Standardization Strategy
1. **H2 Elements**: Standardize to `text-2xl`
- Exception: Sidebar navigation labels with `text-xs` (keep as special case)
- Exception: Design system demo pages (keep as-is for demonstration)
2. **H3 Elements**: Standardize to `text-xl`
- Exception: Very small labels/captions (keep `text-sm` if appropriate)
3. **H4 Elements**: Standardize to `text-lg`
4. **H5 Elements**: Standardize to `text-base`
5. **H6 Elements**: Standardize to `text-sm`
## Implementation Approach
1. Start with h2 elements (most visible)
2. Then h3 elements
3. Then h4-h6 elements
4. Verify no visual regressions
5. Update TODO list
## Files Requiring Changes
### High Priority (H2 inconsistencies):
- Files with h2 using `text-3xl` (should be `text-2xl`)
- Files with h2 using `text-xl` (should be `text-2xl`)
- Files with h2 without explicit size (should add `text-2xl`)
### Medium Priority (H3 inconsistencies):
- Files with h3 using `text-lg` (should be `text-xl`)
- Files with h3 using `text-2xl` (should be `text-xl`)
- Files with h3 without explicit size (should add `text-xl`)
## Special Cases to Preserve
1. **Sidebar navigation**: `text-xs` for h2/h3 labels (intentional small size)
2. **Design system demos**: Keep existing sizes for demonstration purposes
3. **Responsive patterns**: Preserve responsive variants (e.g., `text-xl md:text-2xl`)

View file

@ -64,7 +64,7 @@ export const AdminDashboardView: React.FC = () => {
return (
<div className="space-y-8 animate-fadeIn pb-20">
<h2 className="text-3xl font-display font-bold text-white mb-6">
<h2 className="text-2xl font-display font-bold text-white mb-6">
SYSTEM OVERVIEW
</h2>

View file

@ -70,7 +70,7 @@ export const AdminModerationView: React.FC = () => {
return (
<div className="space-y-6 animate-fadeIn pb-20">
<h2 className="text-3xl font-display font-bold text-white mb-6">
<h2 className="text-2xl font-display font-bold text-white mb-6">
MODERATION QUEUE
</h2>

View file

@ -17,7 +17,7 @@ export const AdminSettingsView: React.FC = () => {
return (
<div className="space-y-8 animate-fadeIn max-w-4xl pb-20">
<div className="flex justify-between items-center border-b border-kodo-steel/50 pb-6">
<h2 className="text-3xl font-display font-bold text-white">
<h2 className="text-2xl font-display font-bold text-white">
SYSTEM SETTINGS
</h2>
<Button

View file

@ -67,7 +67,7 @@ export const AdminUsersView: React.FC = () => {
<div className="space-y-6 animate-fadeIn pb-20">
<div className="flex flex-col md:flex-row justify-between items-end gap-4">
<div>
<h2 className="text-3xl font-display font-bold text-white mb-2">
<h2 className="text-2xl font-display font-bold text-white mb-2">
USER MANAGEMENT
</h2>
<p className="text-gray-400 font-mono text-sm">

View file

@ -182,7 +182,7 @@ export const CourseLearningView: React.FC<CourseLearningViewProps> = ({
{/* Tabs & Meta */}
<div className="p-6 md:p-8 max-w-5xl mx-auto w-full">
<div className="flex justify-between items-center mb-6">
<h1 className="text-2xl font-bold text-white">
<h1 className="text-3xl font-bold text-white">
{currentLesson?.title}
</h1>
<div className="flex gap-2">

View file

@ -55,7 +55,7 @@ export const AchievementsView: React.FC = () => {
{/* Header */}
<div className="flex flex-col md:flex-row justify-between items-end border-b border-kodo-steel/50 pb-6 gap-4">
<div>
<h2 className="text-3xl font-display font-bold text-white mb-2">
<h2 className="text-2xl font-display font-bold text-white mb-2">
ACHIEVEMENTS
</h2>
<p className="text-gray-400 font-mono text-sm">

View file

@ -34,7 +34,7 @@ export const LeaderboardView: React.FC = () => {
{/* Header */}
<div className="flex flex-col md:flex-row justify-between items-end border-b border-kodo-steel/50 pb-6 gap-4">
<div>
<h2 className="text-3xl font-display font-bold text-white mb-2">
<h2 className="text-2xl font-display font-bold text-white mb-2">
LEADERBOARD
</h2>
<p className="text-gray-400 font-mono text-sm">

View file

@ -51,7 +51,7 @@ export const ProfileXPView: React.FC<ProfileXPViewProps> = ({ username }) => {
return (
<div className="space-y-8 animate-fadeIn pb-20">
<h2 className="text-3xl font-display font-bold text-white mb-6">
<h2 className="text-2xl font-display font-bold text-white mb-6">
LEVEL & PROGRESS
</h2>

View file

@ -37,7 +37,7 @@ export const AddEquipmentView: React.FC = () => {
return (
<div className="animate-fadeIn max-w-4xl mx-auto pb-20">
<div className="flex justify-between items-center mb-8">
<h2 className="text-3xl font-display font-bold text-white">
<h2 className="text-2xl font-display font-bold text-white">
REGISTER EQUIPMENT
</h2>
<Button

View file

@ -53,7 +53,7 @@ export const InventoryView: React.FC<InventoryViewProps> = ({ onNavigate }) => {
{/* Header */}
<div className="flex flex-col md:flex-row justify-between items-end border-b border-kodo-steel/50 pb-6 gap-4">
<div>
<h2 className="text-3xl font-display font-bold text-white mb-2">
<h2 className="text-2xl font-display font-bold text-white mb-2">
GEAR INVENTORY
</h2>
<p className="text-gray-400 font-mono text-sm">

View file

@ -77,7 +77,7 @@ export function Header(_props: HeaderProps) {
<Cpu className="w-6 h-6 text-kodo-cyan animate-pulse-glow" />
</div>
<div className="hidden sm:block">
<h1 className="text-lg font-display font-bold text-white tracking-widest uppercase leading-tight">
<h1 className="text-3xl font-display font-bold text-white tracking-widest uppercase leading-tight">
Veza<span className="text-kodo-cyan">OS</span>
</h1>
<div className="text-[9px] font-mono text-kodo-cyan/50 tracking-[0.2em] uppercase -mt-0.5">

View file

@ -118,7 +118,7 @@ export const LiveStreamDetailView: React.FC<LiveStreamDetailViewProps> = ({
/>
</div>
<div>
<h1 className="text-2xl font-bold text-white mb-1">
<h1 className="text-3xl font-bold text-white mb-1">
{MOCK_STREAM.title}
</h1>
<div className="flex items-center gap-3 text-sm">

View file

@ -59,7 +59,7 @@ export const CreateProductView: React.FC = () => {
<div className="animate-fadeIn max-w-4xl mx-auto pb-20">
<div className="flex justify-between items-center mb-8">
<div>
<h2 className="text-3xl font-display font-bold text-white mb-2">
<h2 className="text-2xl font-display font-bold text-white mb-2">
CREATE PRODUCT
</h2>
<p className="text-gray-400 font-mono text-sm">

View file

@ -69,7 +69,7 @@ export const SellerDashboardView: React.FC<SellerDashboardProps> = ({
{/* Header */}
<div className="flex flex-col md:flex-row justify-between items-end gap-4">
<div>
<h2 className="text-3xl font-display font-bold text-white mb-2">
<h2 className="text-2xl font-display font-bold text-white mb-2">
SELLER DASHBOARD
</h2>
<p className="text-gray-400 font-mono text-sm">

View file

@ -155,7 +155,7 @@ export const ProjectsManager: React.FC = () => {
<div className="space-y-6 animate-fadeIn pb-20">
<div className="flex flex-col md:flex-row justify-between items-end gap-4">
<div>
<h2 className="text-3xl font-display font-bold text-white mb-2">
<h2 className="text-2xl font-display font-bold text-white mb-2">
ACTIVE PROJECTS
</h2>
<p className="text-gray-400 font-mono text-sm">

View file

@ -26,7 +26,7 @@ function LazyErrorFallback({
<div className="max-w-2xl mx-auto">
<div className="flex items-center gap-3 mb-4">
<AlertTriangle className="h-6 w-6 text-yellow-600" />
<h1 className="text-2xl font-bold">{pageName}</h1>
<h1 className="text-3xl font-bold">{pageName}</h1>
</div>
<div className="bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 text-yellow-700 dark:text-yellow-300 px-4 py-3 rounded-lg mb-4">
<p className="font-medium mb-2">Failed to load {pageName}</p>

View file

@ -94,7 +94,7 @@ export const FileUploadZone: React.FC<FileUploadZoneProps> = ({
<UploadCloud className="w-10 h-10" />
</div>
<h3 className="text-2xl font-display font-bold text-white mb-2">
<h3 className="text-xl font-display font-bold text-white mb-2">
{isDragging ? 'Drop Files Here' : 'Drag & Drop or Click'}
</h3>
<p className="text-gray-400 mb-6 max-w-sm">

View file

@ -71,7 +71,7 @@ export const CartView: React.FC<CartViewProps> = ({
>
<ChevronLeft className="w-4 h-4 mr-2" /> Continue Shopping
</Button>
<h2 className="text-3xl font-display font-bold text-white">
<h2 className="text-2xl font-display font-bold text-white">
Your Cart ({cart.length})
</h2>
</div>

View file

@ -56,7 +56,7 @@ export const EducationView: React.FC<EducationViewProps> = ({
{/* Header */}
<div className="flex flex-col md:flex-row justify-between items-end border-b border-kodo-steel/50 pb-6 gap-4">
<div>
<h2 className="text-3xl font-display font-bold text-white mb-2">
<h2 className="text-2xl font-display font-bold text-white mb-2">
ACADEMY
</h2>
<p className="text-gray-400 font-mono text-sm">

View file

@ -148,7 +148,7 @@ export const FileManagerView: React.FC = () => {
{/* Header & Controls */}
<div className="flex flex-col md:flex-row justify-between items-start md:items-center gap-4">
<div>
<h2 className="text-3xl font-display font-bold text-white mb-1">
<h2 className="text-2xl font-display font-bold text-white mb-1">
FILE MANAGER
</h2>
<div className="flex items-center gap-2 text-sm text-gray-400">

View file

@ -121,7 +121,7 @@ export const LiveView: React.FC = () => {
/>
</div>
<div>
<h1 className="text-2xl font-bold text-white">
<h1 className="text-3xl font-bold text-white">
{featuredStream.title}
</h1>
<p

View file

@ -586,7 +586,7 @@ export const ProfileView: React.FC<ProfileViewProps> = ({ userId }) => {
{activeTab === 'about' && (
<div className="space-y-8 animate-fadeIn">
<Card variant="default" className="p-8">
<h3 className="text-2xl font-display font-bold text-white mb-6">
<h3 className="text-xl font-display font-bold text-white mb-6">
Biography
</h3>
<p className="text-gray-300 leading-relaxed mb-6 whitespace-pre-line">

View file

@ -152,7 +152,7 @@ export const SettingsView: React.FC<SettingsViewProps> = ({
<Bell className="w-10 h-10 text-gray-400" />
)}
</div>
<h3 className="text-2xl font-bold text-white capitalize mb-2">
<h3 className="text-xl font-bold text-white capitalize mb-2">
{activeTab} Settings
</h3>
<p className="text-gray-400 max-w-md">

View file

@ -259,7 +259,7 @@ export const UploadView: React.FC = () => {
<div className="w-16 h-16 bg-kodo-lime/20 rounded-full flex items-center justify-center text-kodo-lime mb-4">
<Check className="w-8 h-8" />
</div>
<h3 className="text-2xl font-bold text-white mb-4">
<h3 className="text-xl font-bold text-white mb-4">
Ready to Publish
</h3>
<p className="text-gray-400 mb-8 max-w-md">

View file

@ -61,7 +61,7 @@ export function PlaylistListPage() {
<div className="space-y-4 sm:space-y-6 playlist-container">
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 sm:gap-0">
<div>
<h1 className="text-2xl sm:text-3xl font-bold tracking-tight">
<h1 className="text-3xl font-bold tracking-tight">
Playlists
</h1>
<p className="text-sm sm:text-base text-muted-foreground">

View file

@ -119,7 +119,7 @@ export function SettingsPage() {
return (
<div className="container mx-auto px-4 py-8">
<div className="max-w-2xl mx-auto">
<h1 className="text-2xl font-display font-bold text-white mb-4">
<h1 className="text-3xl font-display font-bold text-white mb-4">
Paramètres
</h1>
<ErrorDisplay
@ -143,7 +143,7 @@ export function SettingsPage() {
return (
<div className="container mx-auto px-4 py-8">
<div className="max-w-2xl mx-auto">
<h1 className="text-2xl font-display font-bold text-white mb-4">
<h1 className="text-3xl font-display font-bold text-white mb-4">
Paramètres
</h1>
<div className="flex items-center justify-center min-h-[200px]">

View file

@ -11,7 +11,7 @@ export function DeveloperPage() {
<Terminal className="w-6 h-6 text-kodo-cyan" />
</div>
<div>
<h1 className="text-2xl font-display font-bold text-white">
<h1 className="text-3xl font-display font-bold text-white">
Developer API
</h1>
<p className="text-sm text-kodo-secondary">

View file

@ -11,7 +11,7 @@ export function EducationPage() {
<GraduationCap className="w-6 h-6 text-kodo-lime" />
</div>
<div>
<h1 className="text-2xl font-display font-bold text-white">
<h1 className="text-3xl font-display font-bold text-white">
Veza Academy
</h1>
<p className="text-sm text-kodo-secondary">

View file

@ -11,7 +11,7 @@ export function GearPage() {
<Box className="w-6 h-6 text-kodo-cyan" />
</div>
<div>
<h1 className="text-2xl font-display font-bold text-white">
<h1 className="text-3xl font-display font-bold text-white">
Gear Locker
</h1>
<p className="text-sm text-kodo-secondary">

View file

@ -11,7 +11,7 @@ export function LivePage() {
<Radio className="w-6 h-6 text-kodo-red" />
</div>
<div>
<h1 className="text-2xl font-display font-bold text-white">
<h1 className="text-3xl font-display font-bold text-white">
Live Sessions
</h1>
<p className="text-sm text-kodo-secondary">

View file

@ -9,7 +9,7 @@ export function ProfilePage() {
return (
<div className="p-4 sm:p-6">
<div className="mb-6">
<h1 className="text-2xl sm:text-3xl font-display font-bold text-white mb-2">
<h1 className="text-3xl font-display font-bold text-white mb-2">
Mon Profil
</h1>
<p className="text-kodo-secondary">

View file

@ -11,7 +11,7 @@ export function QueuePage() {
<ListMusic className="w-6 h-6 text-kodo-magenta" />
</div>
<div>
<h1 className="text-2xl font-display font-bold text-white">
<h1 className="text-3xl font-display font-bold text-white">
Play Queue
</h1>
<p className="text-sm text-kodo-secondary">

View file

@ -222,7 +222,7 @@ export function SearchPage() {
{/* Tracks */}
{totalTracks > 0 && (
<div>
<h2 className="text-xl font-bold mb-4 flex items-center gap-2">
<h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
<Music className="h-5 w-5" />
Tracks ({totalTracks})
</h2>
@ -271,7 +271,7 @@ export function SearchPage() {
{/* Playlists */}
{totalPlaylists > 0 && (
<div>
<h2 className="text-xl font-bold mb-4 flex items-center gap-2">
<h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
<Library className="h-5 w-5" />
Playlists ({totalPlaylists})
</h2>
@ -301,7 +301,7 @@ export function SearchPage() {
{/* Users */}
{totalUsers > 0 && (
<div>
<h2 className="text-xl font-bold mb-4 flex items-center gap-2">
<h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
<Users className="h-5 w-5" />
Users ({totalUsers})
</h2>
@ -524,7 +524,7 @@ export function SearchPage() {
<CardContent className="pt-6">
<div className="text-center py-12">
<Search className="h-16 w-16 mx-auto mb-4 text-muted-foreground opacity-50" />
<h2 className="text-xl font-semibold mb-2">Start Searching</h2>
<h2 className="text-2xl font-semibold mb-2">Start Searching</h2>
<p className="text-muted-foreground">
Enter a search query to find tracks, playlists, and users
</p>

View file

@ -40,7 +40,7 @@ export function SettingsPage() {
<Settings className="w-6 h-6 text-kodo-cyan" />
</div>
<div>
<h1 className="text-2xl font-display font-bold text-white">
<h1 className="text-3xl font-display font-bold text-white">
Settings
</h1>
<p className="text-sm text-kodo-secondary">

View file

@ -37,7 +37,7 @@ export function SocialPage() {
<Users className="w-6 h-6 text-kodo-cyan" />
</div>
<div>
<h1 className="text-2xl font-display font-bold text-white">
<h1 className="text-3xl font-display font-bold text-white">
Community Feed
</h1>
<p className="text-sm text-kodo-secondary">