dwindown
c3d4fbd794
feat: Add dynamic sticky positioning to PageHeader based on mode
Following SubmenuBar pattern, PageHeader now adapts its sticky
position based on fullscreen mode.
Changes:
1. PageHeader Component
- Added fullscreen prop (boolean)
- Dynamic top position calculation
- Fullscreen: top-0 (submenu at top-0)
- WP-Admin: top-[calc(7rem+32px)] = 144px (below WP bar + menu)
2. App.tsx
- Pass fullscreen={true} in fullscreen modes
- Pass fullscreen={false} in WP-Admin mode
- Matches SubmenuBar prop pattern
Logic (matches SubmenuBar):
const topClass = fullscreen ? 'top-0' : 'top-[calc(7rem+32px)]';
Layout Positions:
┌─────────────────────────────────────┐
│ Fullscreen Mode: │
│ SubmenuBar: top-0 │
│ PageHeader: top-0 ✅ │
├─────────────────────────────────────┤
│ WP-Admin Mode: │
│ SubmenuBar: top-[calc(7rem+32px)] │
│ PageHeader: top-[calc(7rem+32px)] ✅│
└─────────────────────────────────────┘
Result:
✅ PageHeader sticks correctly in fullscreen
✅ PageHeader sticks correctly in WP-Admin
✅ Consistent with SubmenuBar behavior
✅ No overlap or covering issues
Files Modified:
- PageHeader.tsx: Added fullscreen prop + dynamic positioning
- App.tsx: Pass fullscreen prop to all PageHeader instances
2025-11-06 15:39:39 +07:00
..
2025-11-04 11:19:00 +07:00
2025-11-06 15:39:39 +07:00
2025-11-05 18:54:41 +07:00
2025-11-04 11:19:00 +07:00
2025-11-06 12:44:13 +07:00
2025-11-06 12:44:13 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00