Skip to content

ADFA-4272 Add GitHub Sponsor heart icon to level 1+ tooltip windows#1436

Merged
davidschachterADFA merged 2 commits into
stagefrom
fix/ADFA-4272
Jun 23, 2026
Merged

ADFA-4272 Add GitHub Sponsor heart icon to level 1+ tooltip windows#1436
davidschachterADFA merged 2 commits into
stagefrom
fix/ADFA-4272

Conversation

@davidschachterADFA

Copy link
Copy Markdown
Collaborator

Add to the level 2 tooltip window a heart icon at the top right next to the feedback icon.
When the user taps the heart icon, take the user to our Github sponsor page by opening the default browser.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@davidschachterADFA davidschachterADFA requested a review from a team June 23, 2026 23:26
@coderabbitai

coderabbitai Bot commented Jun 23, 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 09826f00-ce28-476d-8eb3-c72b893a4069

📥 Commits

Reviewing files that changed from the base of the PR and between 6dedaa4 and 452d762.

📒 Files selected for processing (1)
  • resources/src/main/res/values/strings.xml
✅ Files skipped from review due to trivial changes (1)
  • resources/src/main/res/values/strings.xml

📝 Walkthrough
  • Feature: GitHub Sponsors access from tooltips

    • Added a heart “Sponsor” button to tooltip windows at level ≥ 1
    • Positioned alongside existing tooltip action icons (between the info icon and feedback button)
    • Tapping the button opens the GitHub Sponsors page in the device’s default browser
    • Hover handling was extended so the sponsor button is included in the tooltip’s hover-dismiss behavior
  • Implementation details

    • ToolTipManager.kt: inflates/configures sponsor_button, shows it only when level >= 1, and opens github_sponsors_url via UrlManager.openUrl(...); registers the sponsor button with the existing hover guard
    • ide_tooltip_window.xml: added @+id/sponsor_button (ImageButton)
    • ic_heart_outline.xml: added new heart outline vector drawable
    • strings.xml: added sponsor_button_description (and uses existing github_sponsors_url)
  • Risks / best-practice concerns

    • Popup dismissal on click: the sponsor button click handler opens the URL but does not explicitly dismiss the tooltip popup—confirm expected UX.
    • Theming: the drawable uses a fixed white fill (@android:color/white) and the code also applies setColorFilter; ensure the icon renders correctly across light/dark themes.
    • Localization: only sponsor_button_description was added in values/; verify translations exist for other locales if the project requires them.
    • Error handling: there’s no user feedback if openUrl fails (e.g., no browser/handler available).

Walkthrough

A sponsor button (heart icon) is added to the IDE tooltip popup window. The button is shown only when the tooltip level is ≥ 1, opens the GitHub Sponsors URL via UrlManager on click, and is included in the existing hover guard mechanism. Supporting assets include a new vector drawable, layout entry, and accessibility string.

Changes

Sponsor Button in Tooltip Popup

Layer / File(s) Summary
Sponsor button assets: drawable, layout, and string
idetooltips/src/main/res/drawable/ic_heart_outline.xml, idetooltips/src/main/res/layout/ide_tooltip_window.xml, resources/src/main/res/values/strings.xml
Adds a white heart outline vector drawable, inserts the sponsor_button ImageButton into the tooltip layout (constrained to end before feedback_button, initially gone), and adds the sponsor_button_description accessibility string.
ToolTipManager wiring: initialization, click handler, and hover guard
idetooltips/src/main/java/com/itsaky/androidide/idetooltips/ToolTipManager.kt
Imports UrlManager, inflates and conditionally shows sponsorButton based on tooltip level, registers a click handler that calls UrlManager.openUrl(...) and dismisses the popup, and extends installHoverGuard to register the hover listener on sponsorButton.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • appdevforall/CodeOnTheGo#1120: Modifies tooltip hover lifecycle in ToolTipManager; this PR extends the same hover wiring to include the new sponsor_button.

Suggested reviewers

  • itsaky-adfa
  • dara-abijo-adfa
  • jatezzz
  • hal-eisen-adfa

Poem

🐇 A heart in the corner, so tiny and bright,
Sponsors bring joy, every day and each night.
One click on the icon, and off the URL flies,
To GitHub's kind pages beneath friendly skies.
Hop, hop — the tooltip now shares a small cheer,
Support us, dear coder, while tooltips appear! 💙

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.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
Title check ✅ Passed The title accurately describes the main change: adding a GitHub Sponsor heart icon to level 1+ tooltip windows, matching the implementation across all modified files.
Description check ✅ Passed The description is related to the changeset, describing the heart icon addition and GitHub sponsor page navigation, though it mentions level 2 while the implementation targets level 1+.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ADFA-4272

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.

@davidschachterADFA davidschachterADFA merged commit 28796bc into stage Jun 23, 2026
2 checks passed
@davidschachterADFA davidschachterADFA deleted the fix/ADFA-4272 branch June 23, 2026 23:39
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.

2 participants