Skip to content

Feature: Add tooltips for simulator sidebar buttons#857

Open
s1dhu98 wants to merge 4 commits intoCircuitVerse:mainfrom
s1dhu98:sidebar-tooltips-pr
Open

Feature: Add tooltips for simulator sidebar buttons#857
s1dhu98 wants to merge 4 commits intoCircuitVerse:mainfrom
s1dhu98:sidebar-tooltips-pr

Conversation

@s1dhu98
Copy link
Contributor

@s1dhu98 s1dhu98 commented Jan 24, 2026

Add tooltips for simulator sidebar buttons with hover labels.

  • Added tooltip translations for 7 buttons in English, Hindi, and Bengali
  • Implemented tooltips on mobile UI buttons (Circuit Elements, Wiring Mode, Verilog Panel, Copy, Paste, Properties)
  • Added tooltip to Report Issue button
  • Enhanced tooltip styling with theme-aware colors and shadow effects
  • Tooltips display on hover without blocking UI functionality
  • Supports both browser native tooltips and custom CSS-based styling

Fixes #841

Summary by CodeRabbit

Release Notes

  • New Features
    • Added helpful tooltips to UI buttons for circuit elements, wiring mode, Verilog panel, copy, paste, properties, and report issue actions
    • Improved accessibility with multilingual tooltip support across Bengali, English, and Hindi languages
    • Enhanced visual feedback with styled tooltip displays on button hover

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Walkthrough

This PR adds tooltip functionality to simulator sidebar buttons across multiple language locales. It introduces title attributes with localized text to button components in both main and v1 versions, adds corresponding translation entries in Bengali, English, and Hindi locale files, and implements CSS hover tooltip styling in the color theme. The tooltips provide labels for icon-only buttons including circuit elements, wiring mode, Verilog panel, copy, paste, properties, and report issue functionality.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and clearly summarizes the main feature addition: tooltips for simulator sidebar buttons.
Linked Issues check ✅ Passed The PR implements tooltip functionality for simulator buttons with translations in multiple languages and CSS styling that aligns with issue #841 requirements.
Out of Scope Changes check ✅ Passed All changes are scoped to adding tooltips to simulator buttons with localization and styling, with no unrelated modifications present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link

netlify bot commented Jan 24, 2026

Deploy Preview for circuitverse ready!

Name Link
🔨 Latest commit 4488215
🔍 Latest deploy log https://app.netlify.com/projects/circuitverse/deploys/69895c4def72e00008549c7b
😎 Deploy Preview https://deploy-preview-857--circuitverse.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 47 (🔴 down 2 from production)
Accessibility: 73 (no change from production)
Best Practices: 92 (no change from production)
SEO: 82 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

s1dhu98 added a commit to s1dhu98/cv-frontend-vue that referenced this pull request Jan 25, 2026
- Added tooltip translations for 7 buttons in English, Hindi, and Bengali
- Implemented tooltips on mobile UI buttons (Circuit Elements, Wiring Mode, Verilog Panel, Copy, Paste, Properties)
- Added tooltip to Report Issue button
- Enhanced tooltip styling with theme-aware colors and shadow effects
- Tooltips display on hover without blocking UI functionality
- Supports both browser native tooltips and custom CSS-based styling

Fixes CircuitVerse#841
@s1dhu98 s1dhu98 force-pushed the sidebar-tooltips-pr branch from 8252012 to b9558eb Compare January 31, 2026 14:42
@s1dhu98
Copy link
Contributor Author

s1dhu98 commented Jan 31, 2026

@Nihal4777 kindly review this pull request and merge it if possible

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@src/styles/color_theme.scss`:
- Around line 564-584: The CSS custom tooltip selectors (.cir-btn[title],
.cir-ele-btn[title], .cir-verilog-btn[title], .report-sidebar a[title])
currently use content: attr(title) which causes the native browser tooltip to
also appear; change the CSS to read from a data attribute (e.g., content:
attr(data-tooltip)) and update all Vue template bindings that currently use
title (e.g., :title="..." or title="...") to set a custom attribute instead
(v-bind:data-tooltip="..." or :data-tooltip="..."), and remove the title
attribute so the browser native tooltip is suppressed while preserving the
styled ::after tooltip.
- Around line 556-562: The rule setting position: relative on .cir-btn[title],
.cir-ele-btn[title], .cir-verilog-btn[title], and .report-sidebar a[title]
conflicts with absolute positioning in Extra.vue and breaks floating buttons;
remove the entire CSS block or at minimum stop applying position: relative to
.cir-btn, .cir-ele-btn, and .cir-verilog-btn (keep it only for .report-sidebar
a[title] if needed) so that the absolute-positioned elements in Extra.vue retain
their intended layout and their ::after pseudo-elements continue to use the
correct containing block.

Comment on lines +556 to +562
/* Enhanced tooltips for sidebar and floating buttons */
.cir-btn[title],
.cir-ele-btn[title],
.cir-verilog-btn[title],
.report-sidebar a[title] {
position: relative;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

position: relative will break absolutely-positioned buttons.

.cir-btn, .cir-ele-btn, and .cir-verilog-btn are styled with position: absolute in Extra.vue to float them on the screen. This rule overrides that to position: relative, which will pull them out of their intended positions and into normal document flow.

Since position: absolute already establishes a containing block for the ::after pseudo-element, the position: relative rule here is both unnecessary and harmful — remove this entire block.

Proposed fix
-/* Enhanced tooltips for sidebar and floating buttons */
-.cir-btn[title],
-.cir-ele-btn[title],
-.cir-verilog-btn[title],
-.report-sidebar a[title] {
-    position: relative;
-}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/* Enhanced tooltips for sidebar and floating buttons */
.cir-btn[title],
.cir-ele-btn[title],
.cir-verilog-btn[title],
.report-sidebar a[title] {
position: relative;
}
🤖 Prompt for AI Agents
In `@src/styles/color_theme.scss` around lines 556 - 562, The rule setting
position: relative on .cir-btn[title], .cir-ele-btn[title],
.cir-verilog-btn[title], and .report-sidebar a[title] conflicts with absolute
positioning in Extra.vue and breaks floating buttons; remove the entire CSS
block or at minimum stop applying position: relative to .cir-btn, .cir-ele-btn,
and .cir-verilog-btn (keep it only for .report-sidebar a[title] if needed) so
that the absolute-positioned elements in Extra.vue retain their intended layout
and their ::after pseudo-elements continue to use the correct containing block.

Comment on lines +564 to +584
.cir-btn[title]:hover::after,
.cir-ele-btn[title]:hover::after,
.cir-verilog-btn[title]:hover::after,
.report-sidebar a[title]:hover::after {
content: attr(title);
position: absolute;
bottom: 110%;
left: 50%;
transform: translateX(-50%);
background-color: var(--bg-icons);
color: var(--text-panel);
padding: 8px 12px;
border-radius: 4px;
font-size: 12px;
white-space: nowrap;
z-index: 1000;
border: 1px solid var(--br-primary);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
font-weight: 500;
pointer-events: none;
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Native browser tooltip will double-up with the CSS ::after tooltip.

Using content: attr(title) creates a custom tooltip via CSS, but the browser will also show its own native tooltip for the title attribute after a short hover delay. This results in two overlapping tooltips.

The standard fix is to use a custom data-* attribute (e.g., data-tooltip) instead of title, and read it via attr(data-tooltip) in CSS. This suppresses the native tooltip while keeping the custom one. You'd update the Vue templates from :title to a custom attribute binding accordingly.

Alternatively, if the intent is to rely on native title tooltips (simplest approach), remove the CSS ::after rules entirely and let the browser handle tooltip rendering — though you lose the custom styling.

🤖 Prompt for AI Agents
In `@src/styles/color_theme.scss` around lines 564 - 584, The CSS custom tooltip
selectors (.cir-btn[title], .cir-ele-btn[title], .cir-verilog-btn[title],
.report-sidebar a[title]) currently use content: attr(title) which causes the
native browser tooltip to also appear; change the CSS to read from a data
attribute (e.g., content: attr(data-tooltip)) and update all Vue template
bindings that currently use title (e.g., :title="..." or title="...") to set a
custom attribute instead (v-bind:data-tooltip="..." or :data-tooltip="..."), and
remove the title attribute so the browser native tooltip is suppressed while
preserving the styled ::after tooltip.

@naman79820
Copy link
Contributor

Follow pr template and resolve coderabbit bot suggestions before asking for review.

@naman79820 naman79820 added the duplicate This issue or pull request already exists label Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature :Add tooltips for simulator sidebar buttons (hover labels)

2 participants