From 6251ea5e6e1b8dc248652c242741a9576aa48136 Mon Sep 17 00:00:00 2001 From: Ayushi Dhiman Date: Sun, 31 May 2026 13:19:19 +0530 Subject: [PATCH] Add contextual tooltips to feature pills for better UX --- frontend/index.html | 117 ++++++++++++++++++++++++-------------------- frontend/style.css | 65 ++++++++++++++++++++++++ 2 files changed, 128 insertions(+), 54 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 71b8e3af..85b8409d 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2082,61 +2082,70 @@

Debug. Understand.
Ship faster.

- -
-
-
- - -
-
-

40+ Bug Patterns

-

Python, JS, TS, Java, C++

-
-
-
-
- - -
-
-

Code Explanation

-

Plain English breakdowns

-
-
-
-
- -
-
-

Smart Suggestions

-

Quality score + grade

-
-
-
-
- -
-
-

Dark / Light Mode

-

Persisted preference

-
-
-
-
- -
-
-

File Upload

-

.py .js .ts .java .cpp .kt .zip

-
-
+ +
+ +
+
+

+ 40+ Bug Patterns + +

+

Python, JS, TS, Java, C++

+
+
+ +
+
+

+ Code Explanation + +

+

Plain English breakdowns

+
+
+ +
+
+

+ Smart Suggestions + +

+

Quality score + grade

+
+ +
+
+

+ Dark / Light Mode + +

+

Persisted preference

+
+
+ +
+
+

+ File Upload + +

+

.py .js .ts .java .cpp .kt .zip

+
+
+ +
diff --git a/frontend/style.css b/frontend/style.css index b05b82a7..f7796f1e 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -611,3 +611,68 @@ body { text-align: center; } } +/* ── TOOLTIP STYLES ─────────────────────────────────────────── */ + +.tooltip-icon { + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + width: 16px; + height: 16px; + margin-left: 6px; + border-radius: 50%; + background: var(--bg-3); + color: var(--text-2); + font-size: 11px; + cursor: help; +} +.tooltip-icon::after { + content: attr(data-tooltip); + + position: absolute; + bottom: 130%; + left: 50%; + transform: translateX(-50%); + + min-width: 220px; + max-width: 260px; + + padding: 8px 10px; + border-radius: 6px; + + background: #222; + color: white; + + font-size: 12px; + line-height: 1.4; + text-align: center; + + opacity: 0; + visibility: hidden; + + transition: opacity 0.2s ease; + + z-index: 1000; + pointer-events: none; +} + +/* Show tooltip on mouse hover */ +.tooltip-icon:hover::after { + opacity: 1; + visibility: visible; +} + +/* Show tooltip when keyboard focuses it */ +.tooltip-icon:focus::after { + opacity: 1; + visibility: visible; +} +.tooltip-icon { + flex-shrink: 0; +} +.feat-pill-info h4 { + display: flex; + align-items: center; + gap: 6px; +} \ No newline at end of file