Skip to content

Fixed Tooltip gets hidden in “Fast & Lightweight” section bug - #247

Merged
Ryan-Millard merged 26 commits into
Ryan-Millard:mainfrom
codevory:main
Jan 30, 2026
Merged

Fixed Tooltip gets hidden in “Fast & Lightweight” section bug#247
Ryan-Millard merged 26 commits into
Ryan-Millard:mainfrom
codevory:main

Conversation

@codevory

@codevory codevory commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

What was changed & why

Added position props to Tooltip component with default value as "right" (previously defined) and position="Top" to two of the cards at " Fast & Lightweight " section .

I have added position of Tooltip content as "Top" for both cards . Adding position to single card ie. card which was having bug, would look unprofessional.

Fixes: #160

Changes

Changed the position of two cards ( on Home page -> “Fast & Lightweight” ) from "right" --> "Top", passed position as props.

Description

I have fixed the bug "Tooltip gets hidden in “Fast & Lightweight” section .
I tried to place the Tooltipt content to left / right but i guess due to less space around the cards, the Tooltip content get shifted to other positions via dynamicPositioning fallbackPlacements={dynamicPositioning ? ["bottom", "top", "left"] : []}.
Iam waiting for your feedback & any suggestion.

Testing & Verification

Not written tests yet but will soon once reviewed by maintainer.

Additional Resources

Screenshot 2026-01-30 170120

Summary by CodeRabbit

  • New Features

    • Tooltips now support configurable positions (e.g., top/right) and improved positioning behavior for more consistent display.
  • UI Copy

    • Image uploader text updated to “Upload an image” and “Choose Image.”
  • Tweaks

    • Home page tooltips set to appear above targets for better visibility.
    • Drag-and-drop prompt now wrapped by a tooltip to provide clearer guidance.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel

vercel Bot commented Jan 30, 2026

Copy link
Copy Markdown

@codevory is attempting to deploy a commit to the Ryan Millard's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@Ryan-Millard has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 25 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

Tooltip component API and behavior updated: added default props for content, id, and position; tooltip ID now uses id ?? \tooltip-${reactId}`; ReactTooltip placement derives from position; positionStrategychanged to"absolute"`; Home and WasmImageProcessor tooltip usages/text updated.

Changes

Cohort / File(s) Summary
Tooltip Component
src/components/Tooltip.jsx
Expanded props: content = "Tooltip content", id = undefined, position = "right", dynamicPositioning = true. ID computed with nullish coalescing (id ?? \tooltip-${reactId}`). ReactTooltip now uses place={position}andpositionStrategy="absolute". PropTypes updated to require id, position, and dynamicPositioning`.
Home page usages
src/pages/Home/index.jsx
Two Tooltip instances updated to include position="top".
WasmImageProcessor UI text
src/components/WasmImageProcessor.jsx
Tooltip copy and wrapping adjusted: upload tooltip text trimmed to "Upload an image"; drag-and-drop prompt now wrapped by a Tooltip with content "Choose an image" and prompt text changed to "Drag & Drop or Choose Image". No public API changes.

Sequence Diagram(s)

sequenceDiagram
  rect rgba(200,200,255,0.5)
  participant User
  end
  rect rgba(200,255,200,0.5)
  participant Child as TargetElement
  end
  rect rgba(255,200,200,0.5)
  participant TooltipWrapper as Tooltip
  end
  rect rgba(255,255,200,0.5)
  participant ReactTooltip
  end

  User->>Child: hover / focus / touch
  Child->>TooltipWrapper: DOM event (attributes from cloneElement)
  TooltipWrapper->>TooltipWrapper: determine id (id ?? `tooltip-${reactId}`), detect touch, check dynamicPositioning
  TooltipWrapper->>ReactTooltip: open with id, place=position, positionStrategy="absolute"
  ReactTooltip-->>User: render tooltip UI
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

ux

Poem

🐇 I hop where hints once hid and sighed,
I nudge an id, a place, a tide.
Now tooltips perch where eyes can see,
A tiny hop — clarity for thee. 🥕✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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: fixing a Tooltip visibility bug in the 'Fast & Lightweight' section, which aligns with the primary objective.
Linked Issues check ✅ Passed The PR implements all coding requirements from issue #160: adds a position prop to Tooltip, applies position='top' to tooltips in the affected section, and resolves the tooltip clipping issue.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the tooltip visibility bug: Tooltip component updates, Home page tooltip positioning, and WasmImageProcessor tooltip content adjustments.

✏️ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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/components/Tooltip.jsx`:
- Around line 136-139: The PropTypes for Tooltip are incorrect: remove the
isRequired flag from id, dynamicPositioning, and position in the
Tooltip.propTypes declaration to match the default parameters provided in the
function signature (so id, dynamicPositioning, and position become optional in
the propTypes). Locate the propTypes object (Tooltip.propTypes) in
src/components/Tooltip.jsx and update the entries for id, dynamicPositioning,
and position to use PropTypes.string / PropTypes.bool / PropTypes.string without
.isRequired.
- Around line 5-10: The component calls useId() inside the default parameter
(violates rules-of-hooks); move the hook call into the Tooltip component body
(e.g., const resolvedId = id ?? useId()) and replace all id references with
resolvedId (update the three places: the attribute "data-tooltip-id" and the JSX
attributes currently noted). Also update Tooltip.propTypes to mark id, position,
and dynamicPositioning as optional (not required) to reflect the defaults.
🧹 Nitpick comments (1)
src/components/Tooltip.jsx (1)

121-125: Normalize position prop before passing to ReactTooltip.

React-tooltip's place prop is case-sensitive and only accepts lowercase values (top, right, bottom, left, and hyphenated variants like top-start). Line 122 passes position directly without validation. Current usages in the codebase pass compliant lowercase values, but the component accepts any string via PropTypes and has no guard. Consider normalizing to lowercase and restricting to allowed values to prevent future bugs if callers pass capitalized or invalid values.

♻️ Suggested guard
+  const normalizedPosition = ["top", "right", "bottom", "left"].includes(
+    (position || "").toLowerCase(),
+  )
+    ? position.toLowerCase()
+    : "right";
-        place={position}
+        place={normalizedPosition}

Comment thread src/components/Tooltip.jsx Outdated
Comment thread src/components/Tooltip.jsx Outdated
@Ryan-Millard

Copy link
Copy Markdown
Owner

@CodeRabbit full review

@coderabbitai

coderabbitai Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@Ryan-Millard Ryan-Millard left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you once again for the great work @codevory!

Have a great weekend!🦔🦔🦔

If you're looking for another high-impact issue to work on, here are some:

@Ryan-Millard
Ryan-Millard merged commit d56ae76 into Ryan-Millard:main Jan 30, 2026
3 checks passed
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.

Tooltip gets hidden in “Fast & Lightweight” section

2 participants