Skip to content

Make the app manager usable in landscape - #3896

Draft
avazirna wants to merge 4 commits into
masterfrom
app-manager-landscape-support
Draft

Make the app manager usable in landscape#3896
avazirna wants to merge 4 commits into
masterfrom
app-manager-landscape-support

Conversation

@avazirna

@avazirna avazirna commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Product Description

This PR fixes an issue with landscape mode on the App Manager in which is would show no apps list at all, and the Install button would be clipped by the bottom edge of the screen. Both are fixed: the full list is reachable in either orientation, and the logo keeps its full-width and consistent with other screens.

Technical Summary

  • The banner is 877x191 and spans the full width, so its height is the screen width. For instance, Rotating a 360x800dp device takes it from 103dp to 199dp while the height available halves to around 336dp. With the toolbar, instructions and Install button below it, the non-list views came to roughly 338dp of a 336dp screen — the button fell off the bottom edge and the list was left with nothing.
  • The ListView was also wrap_content, so it measured to its content height and was clipped by the
    parent rather than scrolling inside a viewport.
  • The banner, instructions and Install button move into app_manager_header.xml and are attached with
    addHeaderView, so they scroll away with the list instead of standing over it. The ListView now
    fills everything below the toolbar.

Safety Assurance

Safety story

  • This change was successfully tested locally. The tests coveed:
    • Portrait and landscape orientations, verifying that all installed apps are listed and that the list can be scrolled to the last app
    • Tapping each row, verifying that it opens the corresponding app in SingleAppManagerActivity
    • The Install button, verifying that it still opens the install flow from its new position in the header
    • The logo, verifying that it spans the full width in both orientations

Labels and Review

  • Do we need to enhance the manual QA test coverage ? If yes, RELEASES.md is updated accordingly
  • Does the PR introduce any major changes worth communicating ? If yes, RELEASES.md is updated accordingly
  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

🤖 Generated with Claude Code

@avazirna
avazirna force-pushed the app-manager-landscape-support branch from 4ca13a3 to 01f15c6 Compare September 3, 2026 12:49
@coderabbitai

coderabbitai Bot commented Sep 3, 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: Repository UI

Review profile: CHILL

Plan: Team

Run ID: e056e2e5-215f-4b53-bca8-d2ecc0b6a025

📥 Commits

Reviewing files that changed from the base of the PR and between ee015f6 and 01f15c6.

📒 Files selected for processing (3)
  • app/res/layout/app_manager.xml
  • app/res/layout/app_manager_header.xml
  • app/src/org/commcare/activities/AppManagerActivity.java

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The app manager now places its banner, instructions, and install button in a ListView header. These elements scroll with the app list instead of occupying fixed layout space. AppManagerActivity inflates the header and registers the list click listener. It subtracts the header count from clicked positions before opening an app. The unused XML namespace was also removed. Even the list index now knows that headers exist.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 01f15

The app manager header now scrolls with the app list in landscape while app selections continue to target the correct app. The change is ready to merge.

Sequence Diagram(s)

sequenceDiagram
  participant AppManagerActivity
  participant apps_list_view
  participant SingleAppManagerActivity
  AppManagerActivity->>apps_list_view: Add app_manager_header
  apps_list_view->>AppManagerActivity: Report clicked position
  AppManagerActivity->>AppManagerActivity: Subtract header count
  AppManagerActivity->>SingleAppManagerActivity: Open selected app
Loading
🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the primary change: making the App Manager usable in landscape orientation.
Description check ✅ Passed The description covers the user impact, technical rationale, safety story, and manual test scenarios. It is mostly complete, but it omits the required Automated test coverage section, leaves the ticke…
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (2 skipped: 2 unsupported.)

Full details: Description check

Explanation

The description covers the user impact, technical rationale, safety story, and manual test scenarios. It is mostly complete, but it omits the required Automated test coverage section, leaves the ticket link as TODO, and leaves review checklist items unchecked.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

@avazirna
avazirna force-pushed the app-manager-landscape-support branch from 01f15c6 to 4ca13a3 Compare September 3, 2026 12:54
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.76%. Comparing base (3f98385) to head (4ca13a3).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3896      +/-   ##
============================================
+ Coverage     33.73%   33.76%   +0.02%     
- Complexity     6015     6017       +2     
============================================
  Files          1008     1008              
  Lines         59806    59812       +6     
  Branches       7151     7151              
============================================
+ Hits          20175    20193      +18     
+ Misses        37333    37318      -15     
- Partials       2298     2301       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant