-
Notifications
You must be signed in to change notification settings - Fork 499
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 #3266: [RTL] High-fi Image from rich text is center aligned in Exploration Player. #3267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@veena14cs PTAL
@@ -68,6 +68,7 @@ | |||
android:text="@{htmlContent}" | |||
android:textColor="@color/oppiaPrimaryText" | |||
android:textSize="16sp" | |||
android:textDirection="anyRtl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@veena14cs as per our initial conversation we should not use any attributes like textAlignment
, textDirection
, etc. I think for this PR it needs to be solved in HTMLParser
or related files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed from xml file and added this programmatically, if RTL is enabled.
I have updated code with latest develop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @veena14cs! Generally LGTM, but there appears to be dead code to remove.
Regarding the already failing Espresso tests, I don't think that's expected & I'm not aware of a tracking issue. I think we can ignore them for the sake of this PR (it's known that many Espresso tests are in a failing state, and it's hard to resolve them since we can't yet run them in CI).
app/src/sharedTest/java/org/oppia/android/app/parser/HtmlParserTest.kt
Outdated
Show resolved
Hide resolved
Well in that case I can wrap this PR. I have removed the dead code. Please check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @veena14cs! LGTM.
Explanation
This PR fixes #3266 . This Pr fixes the image alignment to the center rendered from rich text in exploration player.
Document Reference
https://docs.google.com/document/d/1Fl1ar5vcdLvay7ZIJLUFQro1wEf1yUEicwF-CKcvwJ0/edit#heading=h.rfpqdmwhi6tn
Screenshot (LTR and RTL)
Mobile View
.....
.....
Tablet View
.....
.....
Screenshot of testcases with RTL code
Screenshot of testcases without RTL code
Checklist