Skip to content

feat(ui): add automatic tablet UI scaling with density adaptation#3793

Open
kairosci wants to merge 2 commits into
MetrolistGroup:mainfrom
kairosci:feat/tablet-ui-adaptation
Open

feat(ui): add automatic tablet UI scaling with density adaptation#3793
kairosci wants to merge 2 commits into
MetrolistGroup:mainfrom
kairosci:feat/tablet-ui-adaptation

Conversation

@kairosci
Copy link
Copy Markdown
Contributor

@kairosci kairosci commented May 23, 2026

Problem

Icons, menu, text and everything looks very small when Metrolist is installed on a tablet or phablet (≥7" screens). The app has zero tablet awareness — no WindowSizeClass, no density adaptation, no sw600dp qualifiers, and layout grids hardcoded for phone-width screens (~412dp).

Cause

All Compose layouts use fixed dp values designed for phones. On tablets (600-950dp wide) the same dp values produce UI elements that are proportionally tiny because they occupy a smaller fraction of the larger screen. The only adaptive UI was a landscape check that toggles bottom nav ↔ rail; there was no detection of tablet-sized screens at all.

Solution

  • Added automatic Density scaling via CompositionLocalProvider(LocalDensity provides scaledDensity) in MetrolistApp — the entire Compose tree gets a proportional density multiplier based on the real screen width:
    • <600dp → scale 1.0× (phone, unchanged)
    • 600-720dp → scale 1.1× (phablet/small tablet)
    • 720-840dp → scale 1.15× (medium tablet)
    • ≥840dp → scale 1.25× (large tablet)
  • Added isTablet detection (≥600dp) and changed the navigation rail logic to show AppNavigationRail on tablets in portrait mode, not just landscape — matching Material 3 guidelines for expandable navigation.
  • Added android:resizeableActivity="true" to the main activity in the manifest for proper multi-window and desktop-mode support on tablets and Chromebooks.

Testing

  • Built successfully with ./gradlew :app:assembleFossDebug (no compilation errors, no new warnings).
  • Tested on emulator: Pixel C (tablet) shows properly scaled UI with navigation rail in portrait; Pixel 6 (phone) shows no change from previous behavior.

Related Issues

Summary by CodeRabbit

  • New Features

    • App now supports resizing on compatible Android devices.
    • Navigation rail now displays on tablets and landscape orientation (excluding search screen) for improved layout support.
  • Bug Fixes

    • Fixed UI composition structure issue.

Review Change Stack

Fix icons, menu, text and everything being too small on tablets/phablets
by auto-scaling Compose density based on screen width class.
Also show NavigationRail on tablets in portrait mode.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 23, 2026

📝 Walkthrough

Walkthrough

MainActivity is updated to support tablets by enabling multi-window mode, implementing dynamic density scaling based on screen width, and extending navigation rail visibility to wider devices. The density scaling adjusts all composed text, icons, and spacing to remain appropriately sized on larger screens.

Changes

Tablet Scaling and Multi-Window Support

Layer / File(s) Summary
Enable resizable activity in manifest
app/src/main/AndroidManifest.xml
android:resizeableActivity="true" is added to MainActivity to enable multi-window and freeform resizing.
Implement density scaling infrastructure
app/src/main/kotlin/com/metrolist/music/MainActivity.kt
Compose platform imports are extended with LocalConfiguration, LocalDensity, LocalWindowInfo, and text input types. Runtime density scaling calculates a scaled Density based on window width breakpoints and overrides LocalDensity via CompositionLocalProvider to adjust all downstream UI elements. Missing closing brace is added to properly terminate Compose scopes.
Detect tablets and extend navigation rail visibility
app/src/main/kotlin/com/metrolist/music/MainActivity.kt
Tablet detection is added using a realScreenWidthDp >= 600 threshold. Navigation rail visibility is updated to show when in landscape mode OR on tablets, while remaining hidden during search screen.

🎯 2 (Simple) | ⏱️ ~15 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: automatic tablet UI scaling with density adaptation, which matches the core implementation.
Description check ✅ Passed The PR description comprehensively covers the problem, cause, solution with specific scaling tiers, testing approach, and related issues—all required template sections are present and well-documented.
Linked Issues check ✅ Passed The PR fully addresses issue #2338's requirement to make UI elements appear appropriately larger on tablets/phablets through density scaling and navigation rail adaptation based on screen size.
Out of Scope Changes check ✅ Passed All code changes (density scaling in MainActivity, navigation rail logic adjustment, and manifest resizeableActivity flag) are directly aligned with the tablet UI adaptation objectives and issue #2338 requirements.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 23, 2026

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{"name":"HttpError","status":401,"request":{"method":"PATCH","url":"https://api.github.com/repos/MetrolistGroup/Metrolist/issues/comments/4526057058","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octokit.js/0.0.0-development octokit-core.js/7.0.6 Node.js/24","authorization":"token [REDACTED]","content-type":"application/json; charset=utf-8"},"body":{"body":"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- walkthrough_start -->\n\n<details>\n<summary>📝 Walkthrough</summary>\n\n## Walkthrough\n\nThis PR addresses scaling issues on tablets by enabling resizable activity support, implementing runtime density scaling based on screen width, and extending navigation rail visibility to tablet devices. The changes scale UI measurements (text, icons, spacing) dynamically for larger screens and ensure navigation controls remain accessible in tablet orientations.\n\n## Changes\n\n**Multi-window and Density Scaling for Tablet Support**\n\n| Layer / File(s) | Summary |\n|---|---|\n| **Enable resizable activity in manifest** <br> `app/src/main/AndroidManifest.xml` | `android:resizeableActivity=\"true\"` added to MainActivity to enable multi-window and freeform resizing. |\n| **Implement density scaling infrastructure** <br> `app/src/main/kotlin/com/metrolist/music/MainActivity.kt` | `LocalConfiguration` imported and runtime density scaling computed from `screenWidthDp` breakpoints; UI wrapped with `CompositionLocalProvider(LocalDensity provides scaledDensity)` to scale all downstream measurements. |\n| **Detect tablets and extend navigation rail visibility** <br> `app/src/main/kotlin/com/metrolist/music/MainActivity.kt` | Tablet detection added via `realScreenWidthDp >= 600`; navigation rail now visible when `(isLandscape \\|\\| isTablet) && !inSearchScreen` instead of landscape-only. |\n\n🎯 2 (Simple) | ⏱️ ~12 minutes\n\n</details>\n\n<!-- walkthrough_end -->\n<!-- pre_merge_checks_walkthrough_start -->\n\n<details>\n<summary>🚥 Pre-merge checks | ✅ 4 | ❌ 1</summary>\n\n### ❌ Failed checks (1 warning)\n\n|     Check name     | Status     | Explanation                                                                          | Resolution                                                                         |\n| :----------------: | :--------- | :----------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- |\n| 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. |\n\n<details>\n<summary>✅ Passed checks (4 passed)</summary>\n\n|         Check name         | Status   | Explanation                                                                                                                                                                  |\n| :------------------------: | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n|         Title check        | ✅ Passed | The title accurately describes the main change: automatic tablet UI scaling with density adaptation, matching the PR's core objective.                                       |\n|      Description check     | ✅ Passed | The PR description comprehensively follows the template with Problem, Cause, Solution, Testing, and Related Issues sections fully populated.                                 |\n|     Linked Issues check    | ✅ Passed | The code changes directly address issue `#2338` by implementing density scaling and tablet detection to make UI elements appropriately sized on tablets.                       |\n| Out of Scope Changes check | ✅ Passed | All changes are in scope: AndroidManifest.xml update for resizable activity, MainActivity.kt for density scaling and tablet detection, directly addressing the linked issue. |\n\n</details>\n\n<sub>✏️ Tip: You can configure your own custom pre-merge checks in the settings.</sub>\n\n</details>\n\n<!-- pre_merge_checks_walkthrough_end -->\n<!-- finishing_touch_checkbox_start -->\n\n<details>\n<summary>✨ Finishing Touches</summary>\n\n<details>\n<summary>🧪 Generate unit tests (beta)</summary>\n\n- [ ] <!-- {\"checkboxId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Create PR with unit tests\n\n</details>\n\n</details>\n\n<!-- finishing_touch_checkbox_end -->\n<!-- tips_start -->\n\n---\n\nThanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=MetrolistGroup/Metrolist&utm_content=3793)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.\n\n<details>\n<summary>❤️ Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n\n<sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub>\n\n<!-- tips_end -->\n<!-- internal state start -->\n\n\n<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKPR1AGxJcAZiWoAFNjwAJRcaLT0aHgs1PAMkLgqXriQAKoAkvY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7d7eN6HNJWHhH+FY7IlE76Tcbi7h6LTajeLhFql5sh7OlAwxZ2VnkuAtg7TMzqLeLex34kQPgPYnQ++YIe+uh7QhnH4PQ7QJAH4xUR+Nn+5aAtnPwLnDAO+85PwPgnwDAgIYIRarubuR5AIPwaAp+antItgx1xVJA7wxUOQH4OFYIxUPwxUXuWhAI7QAgqXDAPwH4P4ZUtANnIXYIYXYIh+6UlXog7Qx5DAWhbu2XYIAgNn7wC5DANaOlBgQuvA75n5ax3Tw5z5gur59Odu/uu4/5xck3+0gFpu4jVgRztABwuAhcj5tA0F6gYkb61unwnXQuo343nDuj75Q3egQAA= -->\n\n<!-- internal state end -->"},"request":{"retryCount":1,"signal":{}}},"response":{"url":"https://api.github.com/repos/MetrolistGroup/Metrolist/issues/comments/4526057058","status":401,"headers":{"access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset","connection":"close","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Sat, 23 May 2026 17:26:30 GMT","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"github.com","strict-transport-security":"max-age=31536000; includeSubdomains; preload","vary":"Accept-Encoding, Accept, X-Requested-With","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-media-type":"github.v3; format=json","x-github-request-id":"800F:148423:C2271FC:2E9B3BB0:6A11E346","x-xss-protection":"0"},"data":{"message":"Bad credentials","documentation_url":"https://docs.github.com/rest","status":"401"}}}

Copy link
Copy Markdown
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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/main/kotlin/com/metrolist/music/MainActivity.kt`:
- Around line 781-783: The tablet detection is using realScreenWidthDp (full
device screen) which breaks in multi-window; change isTablet to use the window
width from LocalWindowInfo (the same source used for isLandscape) — e.g.,
replace references to realScreenWidthDp with configuration.containerDpSize.width
(or the LocalWindowInfo containerDpSize.width) so isTablet and dependent values
like showRail use the actual app window size; also update the density-scaling
logic that currently reads screen width (the block around the density scaling
variables) to use the window width instead so density scaling follows the app
window in split-screen.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 354217bc-0372-4d7d-b94a-7948fd5ca845

📥 Commits

Reviewing files that changed from the base of the PR and between d3e8951 and 88a0435.

📒 Files selected for processing (2)
  • app/src/main/AndroidManifest.xml
  • app/src/main/kotlin/com/metrolist/music/MainActivity.kt

Comment thread app/src/main/kotlin/com/metrolist/music/MainActivity.kt Outdated
@nyxiereal nyxiereal self-assigned this May 25, 2026
Copy link
Copy Markdown
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.

🧹 Nitpick comments (1)
app/src/main/kotlin/com/metrolist/music/MainActivity.kt (1)

88-88: ⚡ Quick win

Remove unused import.

LocalConfiguration is imported but not used anywhere in the file. The density scaling and tablet detection logic use LocalWindowInfo instead.

♻️ Proposed fix
-import androidx.compose.ui.platform.LocalConfiguration
 import androidx.compose.ui.platform.LocalDensity
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/kotlin/com/metrolist/music/MainActivity.kt` at line 88, Remove
the unused import of LocalConfiguration from MainActivity.kt; locate the import
statement "import androidx.compose.ui.platform.LocalConfiguration" and delete it
so only the required imports (e.g., LocalWindowInfo) remain, then run a build or
organize imports to ensure no unused imports remain.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@app/src/main/kotlin/com/metrolist/music/MainActivity.kt`:
- Line 88: Remove the unused import of LocalConfiguration from MainActivity.kt;
locate the import statement "import
androidx.compose.ui.platform.LocalConfiguration" and delete it so only the
required imports (e.g., LocalWindowInfo) remain, then run a build or organize
imports to ensure no unused imports remain.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dba0d6e4-1056-4802-8ca3-508e6f821800

📥 Commits

Reviewing files that changed from the base of the PR and between d3e8951 and 1a2d167.

📒 Files selected for processing (2)
  • app/src/main/AndroidManifest.xml
  • app/src/main/kotlin/com/metrolist/music/MainActivity.kt

@kairosci kairosci requested a review from nyxiereal May 25, 2026 20:27
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.

icons, menu, text & everything looks very small when metrolist is installed on tablet/phablet

2 participants