Skip to content

ADFA-3214: Git tooltips#1059

Merged
dara-abijo-adfa merged 5 commits intostagefrom
ADFA-3214-git-tooltips
Mar 10, 2026
Merged

ADFA-3214: Git tooltips#1059
dara-abijo-adfa merged 5 commits intostagefrom
ADFA-3214-git-tooltips

Conversation

@dara-abijo-adfa
Copy link
Contributor

Add tooltips to git clone action and git clone screen

Screen_recording_20260309_225346.mp4

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 9, 2026

📝 Walkthrough

Release Notes - Git Tooltips Enhancement

Features Added

  • New tooltip support added to the git clone action in the main menu
  • Long-press tooltips implemented on the git clone screen for improved user guidance
  • New tooltip tags introduced:
    • MAIN_GIT ("main.git") for the main page git action
    • GIT_DOWNLOAD_SCREEN ("git.download") for the clone repository screen

UI Changes

  • Updated the download project button label from "Clone project" to "Download project"
  • Button label updated across layout files and string resources

Code Changes

  • Modified MainFragment.kt to handle ACTION_CLONE_REPO and route it to tooltip manager
  • Enhanced CloneRepositoryFragment.kt with view hierarchy traversal to attach tooltip listeners
  • Added new constants to TooltipTag.kt for tooltip identification
  • Updated string resource from "clone" to "download_project" in strings.xml

⚠️ Potential Risks & Best Practice Concerns

  • Performance consideration: View hierarchy traversal in CloneRepositoryFragment that recursively attaches long-click listeners to all views could impact performance on complex layouts or slower devices
  • String resource deprecation: The string resource name change from "clone" to "download_project" may break existing references if there are other usages not updated in this PR—recommend verifying no orphaned references remain
  • Generic tooltip attachment: Applying tooltips to all views except EditText and TextInputLayout may create unexpected behavior if new view types are added later; consider explicitly whitelisting safe views instead of blacklisting

Walkthrough

The changes introduce tooltip support to the repository cloning feature by adding new tooltip tags to the centralized system, wiring the clone action through MainFragment, and attaching long-click listeners to UI views in the CloneRepositoryFragment to display context-sensitive tooltips. Additionally, the clone button label is updated from "Clone" to "Download project".

Changes

Cohort / File(s) Summary
Tooltip System
idetooltips/src/main/java/com/itsaky/androidide/idetooltips/TooltipTag.kt, resources/src/main/res/values/strings.xml
Added two new tooltip constants: MAIN_GIT ("main.git") and GIT_DOWNLOAD_SCREEN ("git.download"). Updated string resource "clone" to "download_project" with text "Download project".
Fragment Integration
app/src/main/java/com/itsaky/androidide/fragments/MainFragment.kt, app/src/main/java/com/itsaky/androidide/fragments/CloneRepositoryFragment.kt
MainFragment now handles ACTION_CLONE_REPO by calling showCloneRepository() and returns MAIN_GIT tooltip tag. CloneRepositoryFragment attaches long-click listeners to all views (except EditText and TextInputLayout) to show tooltips via TooltipManager with GIT_DOWNLOAD_SCREEN tag.
Layout
app/src/main/res/layout/fragment_clone_repository.xml
Updated cloneButton text from "@string/clone" to "@string/download_project".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • PR #1007: Implements the same pattern of adding long-press tooltip listeners to UI elements using TooltipManager and extends TooltipTag.kt constants.
  • PR #1005: Introduces the clone repository feature that this PR builds upon with tooltip enhancements.
  • PR #889: Extends the MainFragment's action-to-tooltip mapping system and adds new TooltipTag constants to the same centralized tooltip system.

Suggested reviewers

  • itsaky-adfa
  • Daniel-ADFA
  • jomen-adfa
  • jatezzz

Poem

🐰 A bunny hops through tooltips bright,
Long-press the views to see the light,
From main to download, labels gleam,
Fresh tags make the UI's dream,
No more mystery—just pure delight! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Git tooltips' clearly and concisely summarizes the main change: adding tooltip functionality to git-related UI elements (clone action and clone screen).
Description check ✅ Passed The description directly relates to the changeset by explaining that tooltips are being added to the git clone action and git clone screen, which aligns with the actual changes made.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ADFA-3214-git-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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@resources/src/main/res/values/strings.xml`:
- Line 1159: You renamed the string resource key from "clone" to
"download_project" which breaks localized translations; update every localized
strings XML that still uses the "clone" key (e.g., files like
termux_shared_strings.xml under values-*/ folders) to include the new key
"download_project" (either rename the key or add a duplicate entry mapping the
translated value to "download_project"), ensuring all translations that
previously targeted "clone" are present for "download_project" in this PR so
non-English locales no longer fall back to English.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e5f6c07d-ea00-45d4-8f62-b0de6cd3efe3

📥 Commits

Reviewing files that changed from the base of the PR and between a52532c and ed333b7.

📒 Files selected for processing (5)
  • app/src/main/java/com/itsaky/androidide/fragments/CloneRepositoryFragment.kt
  • app/src/main/java/com/itsaky/androidide/fragments/MainFragment.kt
  • app/src/main/res/layout/fragment_clone_repository.xml
  • idetooltips/src/main/java/com/itsaky/androidide/idetooltips/TooltipTag.kt
  • resources/src/main/res/values/strings.xml

@dara-abijo-adfa dara-abijo-adfa merged commit 79d815e into stage Mar 10, 2026
2 checks passed
@dara-abijo-adfa dara-abijo-adfa deleted the ADFA-3214-git-tooltips branch March 10, 2026 13:51
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