Skip to content

ADFA-4385: Make it easy to navigate to your point of origin when in the help activity#1425

Open
Daniel-ADFA wants to merge 6 commits into
stagefrom
ADFA-4385
Open

ADFA-4385: Make it easy to navigate to your point of origin when in the help activity#1425
Daniel-ADFA wants to merge 6 commits into
stagefrom
ADFA-4385

Conversation

@Daniel-ADFA

Copy link
Copy Markdown
Contributor

No description provided.

itsaky and others added 3 commits June 16, 2026 19:25
Signed-off-by: Akash Yadav <itsaky01@gmail.com>
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@Daniel-ADFA Daniel-ADFA requested a review from a team June 19, 2026 16:34
@coderabbitai

coderabbitai Bot commented Jun 19, 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: 1e8187f1-3bcd-4022-bebb-a1b55682af8d

📥 Commits

Reviewing files that changed from the base of the PR and between a61b18d and e21780c.

📒 Files selected for processing (1)
  • common/src/main/java/com/itsaky/androidide/activities/editor/HelpActivity.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • common/src/main/java/com/itsaky/androidide/activities/editor/HelpActivity.kt

📝 Walkthrough

Release Notes

New Features

  • Help Activity Navigation Button: Added an options menu with a "Close" action button to the HelpActivity, enabling users to easily navigate back to their previous location when viewing help content
  • Dynamic Menu State: The close button appears in the action bar only when the WebView has navigation history available (i.e., when canGoBack() returns true), providing contextual UI that responds to user navigation

Implementation Details

  • Menu item uses the standard close icon (ic_close) and "close" label for clarity and consistency with Android UI conventions
  • Menu state is automatically synchronized with WebView navigation history whenever the page finishes loading or when navigation history changes
  • The close action calls finish() to return to the previous screen

Risk Assessment

  • No significant risks identified - the implementation follows Android options menu lifecycle conventions correctly
  • Null-safety checks are properly in place before accessing view binding
  • The dynamic visibility logic appropriately prevents the button from appearing when there's no navigation history to go back to

Walkthrough

HelpActivity gains an options menu backed by a new menu_help.xml resource containing a single close action item. The close action's visibility is toggled via onPrepareOptionsMenu based on whether the WebView can navigate back, and invalidateOptionsMenu() is called from doUpdateVisitedHistory to refresh this state on each navigation change.

Changes

HelpActivity WebView Close Action

Layer / File(s) Summary
Menu resource and HelpActivity options menu handling
common/src/main/res/menu/menu_help.xml, common/src/main/java/com/itsaky/androidide/activities/editor/HelpActivity.kt
Adds menu_help.xml with an always-visible action_close_help item using the close icon. In HelpActivity, imports Menu/MenuItem and a CommonR alias, calls invalidateOptionsMenu() from doUpdateVisitedHistory(), and implements onCreateOptionsMenu, onPrepareOptionsMenu (shows close action only when _binding != null && webView.canGoBack()), and onOptionsItemSelected (calls finish() for the close action).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • itsaky-adfa
  • jomen-adfa
  • jatezzz

Poem

🐇 Hop hop, the WebView goes back and forth,
A close button appears with navigational worth!
invalidateOptionsMenu() refreshes the view,
finish() called swiftly when history is through.
The menu now knows when to show or to hide —
A tidy close action along for the ride! 🌟

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess whether it relates to the changeset. Add a pull request description explaining the motivation and implementation details of the help activity navigation changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding navigation functionality to return to the origin point when in the help activity, which aligns with the Android options menu support added to HelpActivity.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ADFA-4385

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.

Comment thread common/src/main/java/com/itsaky/androidide/activities/editor/HelpActivity.kt Outdated
Comment thread common/src/main/java/com/itsaky/androidide/activities/editor/HelpActivity.kt Outdated
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.

5 participants