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

Fixes part of #4195:Added dark mode support to QuestionPlayer and ExplorationPlayer #4540

Merged
merged 3 commits into from
Sep 1, 2022

Conversation

bhaktideshmukh
Copy link
Contributor

@bhaktideshmukh bhaktideshmukh commented Aug 29, 2022

Explanation

This PR contains the changes of PR #4382 and the pending cases of this issue such as drag_drop_interaction, forward_arrow etc.

Mock link :--

Screenshots

Default Dark mode
Default Dark mode
Default Dark mode
Default Dark mode
Default Dark mode
Default Dark mode
Default Dark mode

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

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

@bhaktideshmukh
Copy link
Contributor Author

Here in this PR, I have not changed the cursor color as it was in PR #4382 since I figured out that the changes made in theme.xml in order to change the cursor color lead to the app crashing.
Maybe we can create a separate issue handling this issue.
What are your thoughts @rt4914 @BenHenning ?

@BenHenning
Copy link
Sponsor Member

BenHenning commented Aug 29, 2022

Here in this PR, I have not changed the cursor color as it was in PR #4382 since I figured out that the changes made in theme.xml in order to change the cursor color lead to the app crashing. Maybe we can create a separate issue handling this issue. What are your thoughts @rt4914 @BenHenning ?

@bhaktideshmukh I'm not opposed to a separate issue tracking the specific problem so long as what we check in here doesn't break the UI/UX or crash the app. That being said, what exactly is the crash? Is there a debug doc that sheds light on it? Ideally we would keep all related dark mode changes together, but this might be a good case of separating this specific change if it's particularly challenging.

Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

@bhaktideshmukh Suggested changes.

app/src/main/res/values/color_defs.xml Outdated Show resolved Hide resolved
app/src/main/res/values/color_defs.xml Outdated Show resolved Hide resolved
@rt4914 rt4914 assigned bhaktideshmukh and unassigned rt4914 Aug 29, 2022
@bhaktideshmukh
Copy link
Contributor Author

bhaktideshmukh commented Aug 30, 2022

Here in this PR, I have not changed the cursor color as it was in PR #4382 since I figured out that the changes made in theme.xml in order to change the cursor color lead to the app crashing. Maybe we can create a separate issue handling this issue. What are your thoughts @rt4914 @BenHenning ?

@bhaktideshmukh I'm not opposed to a separate issue tracking the specific problem so long as what we check in here doesn't break the UI/UX or crash the app. That being said, what exactly is the crash? Is there a debug doc that sheds light on it? Ideally we would keep all related dark mode changes together, but this might be a good case of separating this specific change if it's particularly challenging.

@BenHenning What I figured out while debugging was when I added
<item name="android:textCursorDrawable">@style/InputInteractionEditText</item> this in theme.xml resulted in app crashing as mentioned in issue #4477.
I even checked logs and found an error stating 'Listener not found' that's the reason I was suggesting creating a new separate issue for this. For now, there is no such debugging doc describing this issue.

@BenHenning
Copy link
Sponsor Member

@bhaktideshmukh did you figure out the root cause of the crash? Without understanding why the change causes the crash it's difficult to make decisions about alternative solutions.

@bhaktideshmukh
Copy link
Contributor Author

@bhaktideshmukh did you figure out the root cause of the crash? Without understanding why the change causes the crash it's difficult to make decisions about alternative solutions.

Yes @BenHenning you are correct without knowing the actual root cause we shouldn't proceed with the alternatives but I was unable to figure out why adding something externally in theme.xml lead to crash.
In PR #4382, I followed this in order to change the cursor color.

@BenHenning
Copy link
Sponsor Member

@bhaktideshmukh thanks for the details. Per the SO answer, the android:textCursorDrawable is supposed to be set to a drawable, but I think you set it to a style. Only android:editTextStyle was set to a style in the answer. Is it possible the solution was implemented incorrectrly?

@BenHenning BenHenning assigned bhaktideshmukh and unassigned rt4914 Aug 30, 2022
@rt4914 rt4914 self-assigned this Aug 31, 2022
@bhaktideshmukh
Copy link
Contributor Author

@bhaktideshmukh thanks for the details. Per the SO answer, the android:textCursorDrawable is supposed to be set to a drawable, but I think you set it to a style. Only android:editTextStyle was set to a style in the answer. Is it possible the solution was implemented incorrectrly?

@BenHenning Yes you were correct, the solution was incorrectly implemented and I apologize for that.
Now I have successfully implemented it.

Default Dark mode

Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks.

@rt4914 rt4914 merged commit 4d4972f into oppia:develop Sep 1, 2022
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.

None yet

3 participants