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

Fix #3122 : Dark theme make colors of the images distorted #5141

Merged
merged 4 commits into from
Sep 12, 2023
Merged

Fix #3122 : Dark theme make colors of the images distorted #5141

merged 4 commits into from
Sep 12, 2023

Conversation

MohitGupta121
Copy link
Member

@MohitGupta121 MohitGupta121 commented Aug 28, 2023

Explanation

Fix #3122 : Dark theme make the colors of the images distorted

Solution: Images change their color to white when Dark mode is turned on. That's why we force disabling dark mode for Image Views prevents android from force-inverting the colors in the images.

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

Before Fix After Fix
Before Fix After Fix

If your PR includes UI-related changes, then:

  • Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes
  • For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see RTL guide)
  • Add a video showing the full UX flow with a screen reader enabled (see accessibility guide)
  • Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

Copy link
Member Author

@MohitGupta121 MohitGupta121 left a comment

Choose a reason for hiding this comment

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

@BenHenning PTAL, Thanks!

Now I am wondering that how I will test this in release version, the solution you give without that also if I test app on my Physical device the output is without any bug as mentioned in screenshot. But now the major concern is how I will test this changes with release data or release app?

[Debug] Physical device output with and without changes is same

@MohitGupta121
Copy link
Member Author

MohitGupta121 commented Aug 28, 2023

Also app is not building with forceDarkAllowed giving this error
Error - error: attribute forceDarkAllowed (aka org.oppia.android.app.databinding:forceDarkAllowed) not found
Solution - https://stackoverflow.com/questions/56163187/aapt-error-attribute-androidforcedarkallowed-not-found

Everyone saying to update compileSdkVersion but already on 31.

@BenHenning
Copy link
Member

@MohitGupta121 can you check the build on Bazel to see if the attribute issue exists? Also, I think we need to check that this works on an earlier version of Android to make sure that the attributes won't cause an issue.

Once these are addressed, I can check this PR with production assets.

@MohitGupta121
Copy link
Member Author

MohitGupta121 commented Sep 1, 2023

@BenHenning I getting same errors while building with Bazel, when using forceDarkAllowed=true

image

image

Copy link
Member Author

@MohitGupta121 MohitGupta121 left a comment

Choose a reason for hiding this comment

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

@BenHenning @adhiamboperes PTAL, I updated PR description with Productions assests screenshots of my Physical Device and now issue is resolved. Thanks!

Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

This LGTM @MohitGupta121.

Could you please edit your PR description to explain the changes that have been made?

@MohitGupta121
Copy link
Member Author

Thanks @adhiamboperes , sure I'll explain that.

@MohitGupta121
Copy link
Member Author

@adhiamboperes PR description updated. PTAL, Thanks!

Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

Thanks @MohitGupta121, this LGTM.

@adhiamboperes adhiamboperes merged commit b643538 into oppia:develop Sep 12, 2023
36 checks passed
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.

Dark theme make colors of the images distorted
3 participants