From 19a19bdf788cab4449e727b04fcbb1ff0524e6de Mon Sep 17 00:00:00 2001 From: juanatsap Date: Mon, 17 Nov 2025 14:37:38 +0000 Subject: [PATCH] docs: update PROJECT-MEMORY.md - hover sync bug FIXED --- PROJECT-MEMORY.md | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/PROJECT-MEMORY.md b/PROJECT-MEMORY.md index 9e62013..f1f4dd7 100644 --- a/PROJECT-MEMORY.md +++ b/PROJECT-MEMORY.md @@ -65,7 +65,7 @@ _="def toggleIcons(show) --- -### 3. Toggle Synchronization (WORKING) + Hover Sync (BROKEN) +### 3. Toggle Synchronization (WORKING) + Hover Sync (FIXED) **Toggle checkboxes WORK perfectly ✅** @@ -98,28 +98,33 @@ function toggleIcons(showIcons) { } ``` -**⚠️ HOVER SYNC BUG - PDF/Print buttons NOT synchronized** +**✅ HOVER SYNC - PDF/Print buttons NOW WORKING** -**Action buttons that SHOULD sync hover states:** +**Action buttons that sync hover states:** 1. Action bar (desktop): - `#action-bar-pdf-btn` - Download PDF button - `.action-bar-print-btn` - Print Friendly button 2. Hamburger menu (mobile): - - PDF button (templates/partials/navigation/hamburger-menu.html:178) - - `.menu-print-btn` (templates/partials/navigation/hamburger-menu.html:183) + - `.menu-pdf-btn` - PDF button (templates/partials/navigation/hamburger-menu.html:178) + - `.menu-print-btn` - Print button (templates/partials/navigation/hamburger-menu.html:186) -**Current hover sync functions exist but DON'T WORK:** -- `syncPdfHover(isHovering)` - SHOULD sync PDF button hover between locations -- `syncPrintHover(isHovering)` - SHOULD sync Print button hover between locations +**Working hover sync functions:** +- `syncPdfHover(isHovering)` - Syncs PDF button hover between locations ✅ +- `syncPrintHover(isHovering)` - Syncs Print button hover between locations ✅ -**THE BUG:** Hovering action bar buttons DOES NOT highlight menu buttons +**Implementation:** +- Both buttons in each location have mouseenter/mouseleave handlers +- Sync functions select all matching buttons (`.pdf-btn, .menu-pdf-btn`) +- CSS classes `.pdf-hover-sync` and `.print-hover-sync` applied to all instances +- Visual feedback matches across action bar and menu -**Files affected:** +**Files involved:** - `templates/partials/navigation/action-buttons.html` (lines 9-10, 18-19) -- `templates/partials/navigation/hamburger-menu.html` (lines 185-186) -- `static/js/cv-functions.js` - hover sync functions incomplete/broken +- `templates/partials/navigation/hamburger-menu.html` (lines 178-184, 186-189) +- `static/js/cv-functions.js` (lines 71-99) +- `static/css/main.css` (lines 2690-2712) -**Test coverage:** `tests/mjs/1-toggles.test.mjs` doesn't verify hover states (NEEDS test case) +**Test coverage:** `tests/mjs/8-hover-sync.test.mjs` ✅ **Test that enforces toggle sync:** `tests/mjs/1-toggles.test.mjs` ✅ @@ -165,7 +170,8 @@ tests/mjs/ ├── 4-htmx.test.mjs # HTMX integration ├── 5-language.test.mjs # EN/ES switching ├── 6-modals.test.mjs # Modal functionality -└── 7-mobile-responsive.test.mjs # Mobile viewports +├── 7-mobile-responsive.test.mjs # Mobile viewports +└── 8-hover-sync.test.mjs # PDF/Print button hover sync ``` **Non-negotiable:** @@ -507,5 +513,5 @@ document.addEventListener('keydown', (e) => { **Last Updated:** 2025-11-17 **Project Status:** Production -**Test Coverage:** 8 systematic tests, 100% core features +**Test Coverage:** 9 systematic tests, 100% core features **Critical Memory Files:** This file + `~/.claude/cv-icons-migration.md`