Skip to content

Integrate AboutLibraries to display open-source licenses in Settings#64

Merged
ricky9667 merged 4 commits intomasterfrom
copilot/integrate-about-libraries
Feb 25, 2026
Merged

Integrate AboutLibraries to display open-source licenses in Settings#64
ricky9667 merged 4 commits intomasterfrom
copilot/integrate-about-libraries

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

Description

Integrates mikepenz/AboutLibraries to automatically generate and display a list of open-source dependencies with their licenses, following the same pattern used in HushTimer.

Dependency & plugin setup

  • Adds com.mikepenz.aboutlibraries.plugin (11.2.3) to root and app build.gradle.kts
  • Adds com.mikepenz:aboutlibraries-compose-m3 dependency (Android variant auto-selected via KMP Gradle metadata)
  • Plugin generates res/raw/aboutlibraries.json at build time; LibrariesContainer reads it automatically via Android context

Navigation

  • Adds Route.Libraries to the sealed Route interface
  • Wires Settings → Libraries navigation in MainApp

UI

  • New LibrariesScreen with a TopAppBar (back button via ic_return) and LibrariesContainer
  • Adds a "Libraries" ListItem in SettingsContent (between Version and Donate), with a new ic_library book icon
  • SettingsScreen and SettingsContent gain an onLibrariesClick: () -> Unit = {} parameter — existing tests unaffected

How to verify

  1. Build and install the app
  2. Open Settings
  3. Tap Libraries — navigates to the libraries list screen
  4. Verify all project dependencies are listed with their license info
  5. Tap the back arrow to return to Settings

Screenshots / Videos


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 25, 2026 03:56
…tings list item

Co-authored-by: ricky9667 <55730003+ricky9667@users.noreply.github.com>
Co-authored-by: ricky9667 <55730003+ricky9667@users.noreply.github.com>
Copilot AI changed the title [WIP] Integrate AboutLibraries into Android app Integrate AboutLibraries to display open-source licenses in Settings Feb 25, 2026
Copilot AI requested a review from ricky9667 February 25, 2026 03:58
<string name="version">Version</string>
<string name="version_unknown">Unknown Version</string>
<string name="hush_keyboard_github">https://github.com/ricky9667/HushKeyboard</string>
<string name="libraries">Open-source libraries</string>
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot Change Opens-source libraries to Libraries

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 6f3b337.

Co-authored-by: ricky9667 <55730003+ricky9667@users.noreply.github.com>
Copilot AI requested a review from ricky9667 February 25, 2026 04:09
@ricky9667 ricky9667 marked this pull request as ready for review February 25, 2026 04:11
Copilot AI review requested due to automatic review settings February 25, 2026 04:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR integrates the AboutLibraries library to automatically display a list of open-source dependencies and their licenses in the app's Settings screen, following established patterns from a related project (HushTimer).

Changes:

  • Adds AboutLibraries plugin (v11.2.3) and compose-m3 dependency to display auto-generated license information
  • Introduces new Libraries navigation route and screen with back navigation support
  • Adds Libraries list item to Settings screen between Version and Donate options

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
gradle/libs.versions.toml Adds AboutLibraries library version (11.2.3) and references for both plugin and compose dependency
build.gradle.kts Applies AboutLibraries plugin at root level (with apply false)
app/build.gradle.kts Applies AboutLibraries plugin and adds compose-m3 implementation dependency
app/src/main/res/values/strings.xml Adds "Libraries" string resource
app/src/main/res/drawable/ic_library.xml Adds book icon for Libraries menu item
app/src/main/java/com/rickyhu/hushkeyboard/settings/SettingsScreen.kt Adds onLibrariesClick parameter and Libraries ListItem with click handling
app/src/main/java/com/rickyhu/hushkeyboard/main/Route.kt Adds Libraries route to sealed Route interface
app/src/main/java/com/rickyhu/hushkeyboard/main/MainApp.kt Wires Libraries screen navigation from Settings, with back button to pop stack
app/src/main/java/com/rickyhu/hushkeyboard/libraries/LibrariesScreen.kt Creates new screen with TopAppBar and LibrariesContainer to display license information

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +207 to +216
ListItem(
headlineContent = { Text(stringResource(R.string.libraries)) },
leadingContent = {
Icon(
painter = painterResource(R.drawable.ic_library),
contentDescription = stringResource(R.string.libraries),
)
},
modifier = Modifier.clickable { onLibrariesClick() },
)
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The Libraries list item should follow the established codebase pattern of using a generic composable like UrlLauncherListItem, SwitchListItem, or DropdownListItem. Currently, this directly uses ListItem with clickable modifier, which is inconsistent with the other items in SettingsContent (Version uses UrlLauncherListItem, switches use SwitchListItem, etc.).

Consider creating a NavigationListItem composable similar to UrlLauncherListItem that accepts a title, leading icon, and onClick callback. This would provide consistency with the existing UI component patterns and make the code more maintainable. The pattern should be:

  • Create NavigationListItem.kt in settings/ui/
  • Use it here instead of the raw ListItem + clickable
  • This maintains the established convention of using generic composables for settings UI

Copilot uses AI. Check for mistakes.
Comment on lines +207 to +216
ListItem(
headlineContent = { Text(stringResource(R.string.libraries)) },
leadingContent = {
Icon(
painter = painterResource(R.drawable.ic_library),
contentDescription = stringResource(R.string.libraries),
)
},
modifier = Modifier.clickable { onLibrariesClick() },
)
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The new Libraries list item lacks test coverage. The existing test suite (SettingsScreenUiTest.kt) includes tests for all other interactive items in SettingsContent (theme dropdown, keyboard color, switches, version, etc.).

Add tests to verify:

  • The Libraries item exists, is enabled, and has click action
  • The onLibrariesClick callback is invoked when the item is clicked

This maintains consistency with the comprehensive test coverage pattern established for other settings UI elements.

Copilot uses AI. Check for mistakes.
IconButton(onClick = onBackClick) {
Icon(
painter = painterResource(R.drawable.ic_return),
contentDescription = stringResource(R.string.libraries),
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The content description for the back button should be more descriptive. Using "Libraries" as the content description for a back/return button is misleading for accessibility.

Consider using a more appropriate description like "Navigate back" or "Back" that accurately describes the action performed when the button is pressed, rather than repeating the screen title.

Suggested change
contentDescription = stringResource(R.string.libraries),
contentDescription = "Back",

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 21.62162% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.76%. Comparing base (eebf32e) to head (6f3b337).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
.../rickyhu/hushkeyboard/libraries/LibrariesScreen.kt 0.00% 18 Missing ⚠️
...main/java/com/rickyhu/hushkeyboard/main/MainApp.kt 0.00% 5 Missing ⚠️
...om/rickyhu/hushkeyboard/settings/SettingsScreen.kt 61.53% 5 Missing ⚠️
...c/main/java/com/rickyhu/hushkeyboard/main/Route.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
- Coverage   54.70%   53.76%   -0.95%     
==========================================
  Files          39       40       +1     
  Lines        1148     1183      +35     
  Branches       82       83       +1     
==========================================
+ Hits          628      636       +8     
- Misses        489      516      +27     
  Partials       31       31              

☔ View full report in Codecov by Sentry.
📢 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.

@ricky9667 ricky9667 merged commit 458a0af into master Feb 25, 2026
7 checks passed
@ricky9667 ricky9667 deleted the copilot/integrate-about-libraries branch February 25, 2026 04:22
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.

3 participants