Skip to content

fix: dismiss tooltips before README preview#203

Merged
AmintaCCCP merged 1 commit into
mainfrom
fix/readme-preview-dismiss-tooltips
Jun 6, 2026
Merged

fix: dismiss tooltips before README preview#203
AmintaCCCP merged 1 commit into
mainfrom
fix/readme-preview-dismiss-tooltips

Conversation

@AmintaCCCP

@AmintaCCCP AmintaCCCP commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • dismiss repository description tooltips before opening the README preview modal
  • dismiss trending/discovery description and AI summary tooltips before opening README preview
  • clear pending tooltip hide timers to prevent stale floating UI from overlapping the modal

Testing

  • npm run build

Fixes #197

🤖 Generated with Claude Code

Summary by CodeRabbit

Bug Fixes

  • Fixed tooltips remaining visible when opening repository README modals
  • Ensured tooltips are properly dismissed when modals appear, providing a cleaner user interface experience across all interaction methods

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3d202584-2d91-46c6-bead-003b523ba15c

📥 Commits

Reviewing files that changed from the base of the PR and between 82b22d4 and f160071.

📒 Files selected for processing (2)
  • src/components/RepositoryCard.tsx
  • src/components/SubscriptionRepoCard.tsx

📝 Walkthrough

Walkthrough

Both RepositoryCard and SubscriptionRepoCard now hide their floating tooltips immediately before opening the README modal. Each component defines a callback to cancel any pending hide timers, reset refs, and set tooltip visibility to false, then invokes it from their modal-open code paths to prevent tooltip flickering.

Changes

Tooltip dismiss on README modal open

Layer / File(s) Summary
RepositoryCard description tooltip hide on modal open
src/components/RepositoryCard.tsx
hideDescriptionTooltip() callback cancels pending timers and hides the tooltip; it is called before opening the README modal from both the card click and keyboard (Enter/Space) interaction paths.
SubscriptionRepoCard floating tooltips hide on modal open
src/components/SubscriptionRepoCard.tsx
hideFloatingTooltips() callback cancels hide timers for both description and AI tooltips, clears timer refs, and sets both tooltip visibility states to false; it is called from handleCardClick before opening the README modal.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • AmintaCCCP/GithubStarsManager#170: The new hideDescriptionTooltip and hideFloatingTooltips callbacks extend the tooltip timer behavior introduced in this PR by clearing existing timers before modal open.
  • AmintaCCCP/GithubStarsManager#179: Both PRs modify SubscriptionRepoCard's tooltip hiding logic and timer refs to ensure tooltips are correctly dismissed in different scenarios.
  • AmintaCCCP/GithubStarsManager#95: Both PRs modify the card click and README modal open flow in SubscriptionRepoCard to manage tooltip state during modal interactions.

Poem

🐰 Tooltips were flickering bright,
Modal opens stole the light—
Now we hide them clean and neat,
Before the readme's sweet retreat!
No more flashing, just delight. 🌟

🚥 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 PR title 'fix: dismiss tooltips before README preview' directly describes the main change: clearing tooltips before the README modal opens.
Linked Issues check ✅ Passed Changes fix tooltip flicker by dismissing tooltips in RepositoryCard and SubscriptionRepoCard before opening README preview, directly addressing issue #197.
Out of Scope Changes check ✅ Passed All changes are focused on tooltip dismissal logic in two card components before README preview, staying within scope of issue #197.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/readme-preview-dismiss-tooltips

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.

@AmintaCCCP AmintaCCCP merged commit c99514f into main Jun 6, 2026
5 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闪烁

1 participant