From 531433f54c7c88c2921ca10d293b984928ce9ff3 Mon Sep 17 00:00:00 2001 From: juanatsap Date: Thu, 20 Nov 2025 14:35:22 +0000 Subject: [PATCH] fix: Remove toast notification from PDF download flow Simplified PDF download UX to use only the modal loading overlay, removing the redundant toast notification that appeared when the modal was closed during download. Updated tests to reflect the new behavior. Changes: - Removed toast trigger logic from PDF modal download function - Removed modal close event listener for toast display - Updated toast notification test expectations - Fixed recommended card outline styling --- static/css/04-interactive/_modals.css | 52 +++++++++++++++---- templates/partials/modals/pdf-modal.html | 50 +++--------------- tests/mjs/29-pdf-toast-notifications.test.mjs | 13 ++--- 3 files changed, 55 insertions(+), 60 deletions(-) diff --git a/static/css/04-interactive/_modals.css b/static/css/04-interactive/_modals.css index 05983aa..b122b97 100644 --- a/static/css/04-interactive/_modals.css +++ b/static/css/04-interactive/_modals.css @@ -448,7 +448,7 @@ /* PDF Modal Specific Overrides */ .pdf-download-modal { - max-width: 900px; + max-width: 800px; width: calc(100% - 2rem); } @@ -464,7 +464,7 @@ .pdf-options-grid { display: grid; grid-template-columns: repeat(3, 1fr); - gap: 24px; + gap: 32px; margin: 2rem 0 1.5rem 0; } @@ -472,14 +472,14 @@ .pdf-option-card { border: 2px solid transparent; border-radius: 12px; - padding: 16px; + padding: 12px; cursor: pointer; transition: all 250ms ease; position: relative; background: #ffffff; display: flex; flex-direction: column; - gap: 12px; + gap: 10px; } .pdf-option-card:hover { @@ -489,12 +489,17 @@ } .pdf-option-card:focus { - outline: 2px solid #ef4444; + outline: 2px solid transparent; outline-offset: 2px; } -/* Selected State */ -.pdf-option-card.selected { +/* Remove red outline for recommended card */ +.pdf-option-recommended:focus { + outline: none; +} + +/* Selected State - ONLY for non-recommended cards */ +.pdf-option-card.selected:not(.pdf-option-recommended) { border-color: #ef4444; box-shadow: 0 6px 16px rgba(239, 68, 68, 0.2); background: #fff5f5; @@ -505,11 +510,11 @@ background: #ffffff; border: 1px solid #e0e0e0; border-radius: 8px; - padding: 16px; - height: 280px; + padding: 12px; + height: 220px; display: flex; flex-direction: column; - gap: 12px; + gap: 10px; position: relative; overflow: hidden; } @@ -595,6 +600,22 @@ .pdf-option-recommended { position: relative; overflow: visible; + transform: scale(1.12); + z-index: 1; + border: 2px solid rgba(243, 156, 18, 0.15) !important; + box-shadow: 0 2px 8px rgba(243, 156, 18, 0.08); +} + +.pdf-option-recommended:hover { + transform: scale(1.12) translateY(-2px); + box-shadow: 0 4px 16px rgba(243, 156, 18, 0.15); +} + +/* When recommended card is selected - full golden border, NO RED */ +.pdf-option-recommended.selected { + border: 2px solid #f39c12 !important; + box-shadow: 0 6px 16px rgba(243, 156, 18, 0.3) !important; + background: #fffbf5 !important; } /* PDF Option Info */ @@ -727,7 +748,16 @@ .pdf-options-grid { display: flex; flex-direction: column; - gap: 16px; + gap: 24px; + } + + /* Remove scale transform in mobile */ + .pdf-option-recommended { + transform: none; + } + + .pdf-option-recommended:hover { + transform: translateY(-2px); } .pdf-thumbnail { diff --git a/templates/partials/modals/pdf-modal.html b/templates/partials/modals/pdf-modal.html index b6040df..53b6c01 100644 --- a/templates/partials/modals/pdf-modal.html +++ b/templates/partials/modals/pdf-modal.html @@ -105,10 +105,10 @@ -

- {{if eq .Lang "es"}}CV Por Defecto{{else}}Default CV{{end}} + {{if eq .Lang "es"}}CV Por Defecto (5 páginas){{else}}Default CV (5 pages){{end}}

{{if eq .Lang "es"}}Corto con habilidades - Recomendado{{else}}Short with skills - Recommended{{end}}

@@ -249,7 +249,6 @@