Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home screen dark theme fix: MW-164 #1851

Open
wants to merge 6 commits into
base: development
Choose a base branch
from

Conversation

rohitlokhande47
Copy link

@rohitlokhande47 rohitlokhande47 commented Mar 10, 2025

Issue Fix: Home Screen Dark Theme Update

Fixes: #MW-164
Jira Task: MW-164

Screenshots

Screenshot 2025-03-10 at 1 48 42 PM Screenshot 2025-03-10 at 1 48 53 PM ## Description This update enhances the dark theme styling across the application by refining color assignments and removing redundant style definitions. The improvements include better contrast on the Home Screen, consistent card styling, and an updated AppBar title color for improved readability.

Changes

core/ui/src/commonMain/kotlin/org/mifospay/core/ui/TransactionHistoryCard.kt

  • Removals: Deleted duplicate container color assignment.
  • Additions: Updated container color assignment to use MaterialTheme.colorScheme.background for consistency.

feature/home/src/commonMain/kotlin/org/mifospay/feature/home/HomeScreen.kt

  • Additions: Applied updated card color settings aligned with the dark theme.
  • Removals: Removed outdated style definitions causing visual inconsistencies.

mifospay-shared/src/commonMain/kotlin/org/mifospay/shared/ui/MifosApp.kt

  • Additions: Adjusted AppBar title color to enhance contrast and readability.
  • Removals: Eliminated redundant color assignment in the AppBar.

Commit Summary

  • Total Files Modified: 3
  • core/ui/TransactionHistoryCard.kt: 2 additions & 2 deletions
  • feature/home/HomeScreen.kt: 1 addition & 1 deletion
  • mifospay-shared/MifosApp.kt: 1 addition & 1 deletion

Additional Checklist:

  • Apply the AndroidStyle.xml style template to your code in Android Studio.
  • Run the unit tests with ./gradlew check to ensure nothing is broken.
  • Squash commits if multiple commits were made.

Happy coding!

@rohitlokhande47 rohitlokhande47 changed the title Home screen dark theme fix Home screen dark theme fix: MW-164 Mar 10, 2025
@Aditya3815
Copy link

We will merge this PR meanwhile please post a video that it's working

@rohitlokhande47
Copy link
Author

Screen.Recording.2025-03-10.at.6.06.50.PM.mov

I’ve attached a video demonstrating the feature in action. Please let me know if you have any feedback. Thank you!

Copy link
Collaborator

@niyajali niyajali left a comment

Choose a reason for hiding this comment

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

Hi 👋 ! @rohitlokhande47, The problem can be fixed on this screen, but if we do it this way, we'll have to fix it on other screens too. That's why we don't want to go down that route and avoid passing colors to any built-in components unless absolutely necessary, since they're already set up by M3. If you're serious about resolving the issue, just fix the theme, components, all top level composable etc, and get rid of all hardcoded colors. That way, it'll automatically be fixed throughout the app, and you won't have to specify colors for different theme modes.

@rohitlokhande47
Copy link
Author

rohitlokhande47 commented Mar 28, 2025

Issue Fix: Home Screen Dark Theme & Configuration Update

Fixes: #MW-164
Jira Task: MW-164

Description

This update addresses several aspects of the project:

  • Run Configuration Cleanup: Removes obsolete run configurations.
  • Theme Refinement: Updates dark/light theme colors and eliminates duplicate/redundant style definitions.
  • UI Enhancements: Applies consistent background and card colors across multiple screens.
  • Build & Dependency Updates: Adjusts dependency versions and cleans up build files.
Screen.Recording.2025-03-28.at.1.32.26.AM.mov
Screen.Recording.2025-03-28.at.1.59.35.AM.mov

Detailed Changes

Run Configurations

  • .run/mifospay-android.run.xml

    • Removed 7 obsolete configuration lines.
    • (7 changes: 0 additions & 7 deletions)
  • .run/mifospay-ios.run.xml

    • File deleted.
    • (7 changes: 5 additions & 2 deletions)

Theme Colors

  • core/designsystem/src/commonMain/kotlin/org/mifospay/core/designsystem/theme/Color.kt
    • Updated md_theme_light_background and md_theme_dark_background values for improved consistency.
    • (2 changes: 1 addition & 1 deletion)

UI Components

  • core/ui/src/commonMain/kotlin/org/mifospay/core/ui/TransactionHistoryCard.kt

    • Fixed duplicate container color assignment by keeping only MaterialTheme.colorScheme.surface.
    • (4 changes: 3 additions & 1 deletion)
  • feature/history/transactions/SpecificTransactionsScreen.kt

    • Updated background modifier and adjusted layout components for better theme adherence.
    • (6 changes: 4 additions & 2 deletions)
  • feature/home/src/commonMain/kotlin/org/mifospay/feature/home/HomeScreen.kt

    • Applied updated background modifier using MaterialTheme.colorScheme.background.
    • (2 changes: 1 addition & 1 deletion)
  • feature/request/money/ShowQrScreen.kt

    • Updated background modifier and top bar title settings for consistency with the dark theme.
    • (7 changes: 4 additions & 3 deletions)
  • feature/send-money/src/commonMain/kotlin/org/mifospay/feature/send/money/SendMoneyScreen.kt

    • Adjusted screen background modifiers, updated bottom bar container color, and refined card styling.
    • (Multiple segments: e.g., 2 changes in SendMoneyCard with 2 additions)

Build & Dependency Adjustments

  • gradle/libs.versions.toml

    • Updated dependency versions and adjusted bundles for consistency.
    • (9 changes: 5 additions & 4 deletions)
  • mifospay-android/src/main/kotlin/org/mifospay/MainActivity.kt

    • Removed duplicated initialization of MifosPaySharedApp.
    • (3 changes: 3 additions)
  • mifospay-shared/build.gradle.kts

    • Minor dependency adjustments and clean-up in build configuration.
    • (4 changes: 2 additions & 2 deletions)
  • mifospay-shared/src/commonMain/kotlin/org/mifospay/shared/ui/MifosApp.kt

    • Revised TopAppBar setup:
      • Removed redundant title and containerColor assignments.
      • Now uses MaterialTheme.colorScheme.background to enhance contrast and readability.

Additional Checklist

  • Apply the AndroidStyle.xml style template in Android Studio.
  • Run unit tests using ./gradlew check to ensure nothing is broken.
  • Squash commits if multiple commits were made.

Happy coding!

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