feat: add tooltips to navbar elements
Description
Adds tooltips to navbar elements (search, face search, profile, theme toggle) to improve user experience and provide better context for interactive elements.
Changes
- Added tooltips to navbar search button, face search dialog, user profile avatar, and theme toggle
- Improved accessibility with proper ARIA labels
Testing
- Tooltips display correctly on hover
- Tooltips work in both light and dark themes
- No console errors
- Accessible via keyboard navigation
https://github.com/user-attachments/assets/b83886f9-7b16-4cba-ab86-60b17a00b3bb
Summary by CodeRabbit
-
UI/UX Enhancements
- Added tooltips to navigation controls, search/clear buttons, theme toggle, profile link, and face-search trigger; updated dialog title and informational text for clearer wording.
-
Accessibility Improvements
- Improved screen-reader descriptions and aria-labels (e.g., "Search by face") to better communicate control purpose.
⚠️ No issue was linked in the PR description. Please make sure to link an issue (e.g., 'Fixes #issue_number')
Walkthrough
Adds Tooltip wrappers and small accessibility/text tweaks to interactive controls in Navbar, ThemeToggle, and FaceSearchDialog, providing hover labels for close/clear, search, face-search, theme-toggle, and profile/settings elements; no public API or control-flow changes.
Changes
| Cohort / File(s) | Summary |
|---|---|
Navbar tooltip enhancements frontend/src/components/Navigation/Navbar/Navbar.tsx |
Wraps close/clear, static search button, and user avatar/settings link with Tooltip, TooltipTrigger, and TooltipContent providing labels like "Clear search", "Search images", and "Profile settings". Adds Tooltip imports. |
Theme toggle tooltip enhancement frontend/src/components/ThemeToggle.tsx |
Wraps the ThemeSelector/DropdownMenu trigger with Tooltip, TooltipTrigger, and TooltipContent showing "Toggle theme"; trigger and menu items remain functionally unchanged. |
Face search dialog tooltip & copy frontend/src/components/Dialog/FaceSearchDialog.tsx |
Wraps the Face Search dialog trigger with Tooltip/TooltipTrigger, adds aria-label="Search by face" and sr-only text updates, changes dialog title to "Search by Face", and fixes an ASCII-encoded informational string. |
Sequence Diagram(s)
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
- Check for unused Tooltip imports and build warnings.
- Verify aria-label/sr-only text and tooltip do not conflict for keyboard/screen-reader users.
- Quick visual check for tooltip overflow or layout regressions.
Possibly related PRs
- AOSSIE-Org/PictoPy#576 — Touches the same interactive controls (Navbar, ThemeToggle, FaceSearchDialog) and accessibility/labeling for buttons.
- AOSSIE-Org/PictoPy#532 — Applies UI changes to Navbar, ThemeToggle, and FaceSearchDialog; overlaps modified elements.
- AOSSIE-Org/PictoPy#445 — Changes Theme selector behavior/component, related to ThemeToggle updates.
Suggested labels
UI
Suggested reviewers
- rahulharpal1603
Poem
🐇 I hop through code with ears held high,
I tuck tooltips where the cursors fly,
"Clear", "Search", "Toggle" — soft words in a row,
A tiny kind guide where users go,
Hop, hover, click — and onward we go. 🥕
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately describes the main change: adding tooltips to navbar elements across multiple components including search, face search, profile, and theme toggle. |
✨ Finishing touches
- [ ] 📝 Generate docstrings
🧪 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.
Comment @coderabbitai help to get the list of available commands and usage tips.
⚠️ No issue was linked in the PR description. Please make sure to link an issue (e.g., 'Fixes #issue_number')
⚠️ No issue was linked in the PR description. Please make sure to link an issue (e.g., 'Fixes #issue_number')
⚠️ No issue was linked in the PR description. Please make sure to link an issue (e.g., 'Fixes #issue_number')
⚠️ No issue was linked in the PR description. Please make sure to link an issue (e.g., 'Fixes #issue_number')
⚠️ No issue was linked in the PR description. Please make sure to link an issue (e.g., 'Fixes #issue_number')
⚠️ No issue was linked in the PR description. Please make sure to link an issue (e.g., 'Fixes #issue_number')
⚠️ This PR has merge conflicts.
Please resolve the merge conflicts before review.
Your PR will only be reviewed by a maintainer after all conflicts have been resolved.
📺 Watch this video to understand why conflicts occur and how to resolve them: https://www.youtube.com/watch?v=Sqsz1-o7nXk
⚠️ This PR still has unresolved merge conflicts and has been inactive for the past 30 days.
The PR has merge conflicts label is still applied, and there has been no recent activity on this PR.
Please resolve the merge conflicts or leave a comment if you are still actively working on it.
If there is no further activity within the next 5 days, this PR may be automatically closed to help keep the PR backlog manageable.
🔒 Closing this PR due to unresolved merge conflicts and prolonged inactivity.
This PR still had unresolved merge conflicts, and there was no activity within 5 days of the stale warning being posted.
You may reopen this PR or submit a new one after resolving the merge conflicts.