Skip to content

feat: Implement "About" Modal (The Colophon) with License Collection* #140

@menny

Description

@menny

Description

We need an "About" screen to display app information, explain the unique translation mechanism, and provide links to our repository. Crucially, it must also display the open-source licenses for all third-party libraries used in the project.

This screen should follow the "Classicist" / "The Colophon" aesthetic defined in DESIGN.md.

Visual Design & Interaction

Entry Point

  • Location: Top-right of the Home/Search screen App Bar.
  • Icon: Icons.Outlined.Info
  • Tint: MaterialTheme.colorScheme.primary (Gold/Bronze).
  • Action: Clicking the icon opens a Modal Bottom Sheet.

The Colophon (Modal Bottom Sheet)

Container Style: ModalBottomSheet with containerColor = MaterialTheme.colorScheme.surface.

1. Header

  • App Icon: Size 64dp, Tint MaterialTheme.colorScheme.primary.
  • Title: "Janus Glossa"
    • Style: MaterialTheme.typography.headlineMedium (Serif).
    • Color: MaterialTheme.colorScheme.onSurface.
  • Version: Dynamic from BuildConfig.VERSION_NAME (e.g., "v1.0.0").
    • Style: MaterialTheme.typography.labelLarge.
    • Color: MaterialTheme.colorScheme.secondary (Patina/Verdigris).

2. Abstract

  • Text: "Janus Glossa is an open-source tool designed to translate concepts within their context, utilizing the crowd-sourced knowledge of Wikipedia."
  • Style: MaterialTheme.typography.bodyLarge.
  • Color: MaterialTheme.colorScheme.onSurface.

3. Methodology

  • Header: "How it works"
    • Style: MaterialTheme.typography.titleMedium (Serif).
    • Color: MaterialTheme.colorScheme.primary.
  • Text: "Unlike standard dictionaries, Janus Glossa aligns concepts. It finds the encyclopedia entry for your term, then follows the inter-language link to the target language to provide a precise, context-aware translation."
    • Style: MaterialTheme.typography.bodyMedium.
    • Color: MaterialTheme.colorScheme.onSurface.

4. References (Links)

5. Attributions

  • Button Label: "Open Source Licenses"
  • Style: Outlined Button or Text Button.
  • Color: MaterialTheme.colorScheme.secondary.

Technical Implementation

1. License Collection (Gradle Plugin)

Integrate the Google OSS Licenses plugin to automatically collect license information.

Root build.gradle.kts:

plugins {
id("com.google.android.gms.oss-licenses-plugin") version "0.10.6" apply false
}

App build.gradle.kts:

plugins {
id("com.google.android.gms.oss-licenses-plugin")
}

dependencies {
implementation("com.google.android.gms:play-services-oss-licenses:17.0.1")
}

2. Launching Licenses

When the "Open Source Licenses" button is clicked, launch the pre-built Activity provided by the library:

startActivity(Intent(context, OssLicensesMenuActivity::class.java))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions