Skip to content

Conversation

@pd-redis
Copy link
Contributor

@pd-redis pd-redis commented Dec 5, 2025

What

Fix duplicate tooltip issue in the database tags modal. When hovering over an invalid tag key field, two tooltips were appearing simultaneously with misaligned text colors.

Changes:

  • Removed redundant RiTooltip wrapper from TagInputField component
  • Now uses only TextInput's built-in error tooltip for consistent styling
  • Moved TagInputFieldProps type to dedicated TagInputField.types.ts file per linting rules
Before: After:
Screen.Recording.2025-12-05.at.15.02.10.mov
Screen.Recording.2025-12-05.at.15.32.05.mov

Testing

  1. Go to the home page with database list
  2. Click the "Manage Instance Tags" button (tag icon) for any database
  3. Click "Add additional tag" to add a new tag row
  4. Type a duplicate key name (e.g., same as an existing tag key like "tag")
  5. Hover over the error icon (red circle with exclamation mark) on the invalid field
  6. Verify: Only one tooltip appears with the message "Key should be unique"
  7. Verify: The tooltip text color is consistent and properly styled

Closes #RI-7779


Note

Removes redundant tooltip wrapper in TagInputField to prevent duplicate tooltips, extracts its props to TagInputField.types.ts, and tidies TagSuggestions logic.

  • UI:
    • TagInputField: Remove RiTooltip wrapper and rely on TextInput's error handling; wrap input with span.
    • Types: Extract TagInputFieldProps to redisinsight/ui/src/pages/home/components/database-manage-tags-modal/TagInputField.types.ts and import where used.
    • TagSuggestions: Small refactor of suggestions computation (memoized filtering/mapping) without changing behavior.

Written by Cursor Bugbot for commit 8384747. This will update automatically on new commits. Configure here.

Remove RiTooltip wrapper and rely on TextInput built-in error tooltip
to fix misaligned tooltip text colors. Move types to dedicated file.

References: #RI-7779
Wrap TextInput and TagSuggestions in span element.
Fix indentation in TagSuggestions useMemo callback.

References: #RI-7779
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.85% 21083/25448
🟡 Branches 68.02% 8873/13044
🟡 Functions 78.03% 5779/7406
🟢 Lines 83.24% 20647/24803

Test suite run success

5481 tests passing in 703 suites.

Report generated by 🧪jest coverage report action from 8384747

@pd-redis pd-redis merged commit e3df2cb into main Dec 8, 2025
19 checks passed
@pd-redis pd-redis deleted the fe/bugfix/RI-7779/db-tags-tooltip-fix branch December 8, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants