-
Notifications
You must be signed in to change notification settings - Fork 506
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#2140: Fix username's cutoff in Home Page #2396
Fix#2140: Fix username's cutoff in Home Page #2396
Conversation
…app) and BUILD.bazel files
Also, test cases are need to test the fix. |
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 @prayutsu
For orange line thing, I think the earlier. pr which is closed now for this issue has a reference on how the orange line should be aligned.
@prayutsu can I know what is the problem with the orange line, I think it is correct if it shown like this, as the username expands |
Yes, I'll be introducing test cases once we finalize the implementaton |
According to this comment, we always want the orange line aligned to be left and below the salutation or username. |
I think the orange line must be having 40% of screen width , its just good to view. You can achieve this by using constraint percent. like this-
|
@Arjupta Even I had the same thought to make the width of the line about 50%. But we also have another option to keep it as wide as the |
Is it possible to make the width of the orange line equal to the width of the greeting? I understand that the greeting may vary, so this would mean that the width would change depending on the time of the day. If not possible, then let's make the width 172 dp just like it is in the mock. |
I did some research but couldn't figure out any way to dynamically change the width of the line according to the greeting's width because they are not |
@prayutsu Have a look at this https://github.com/oppia/oppia-android/pull/2186/files in which the author has used two separate |
as Rajat and Arjun keeping update in this PR, unassigning myself. |
@rt4914 I have enabled |
You can keep these changes and at the same time I suggest merging with latest develop too. Keeping your branch up-to-date is a nice practice. |
… fix-username-cutoff-if-name-is-too-long
Done, thanks |
@rt4914 PTAL |
Screenshots updated in PR description. |
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.
nit changes
app/src/main/java/org/oppia/android/app/databinding/ViewBindingAdapters.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/recyclerview/RecyclerViewBindingAdapter.java
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest.kt
Outdated
Show resolved
Hide resolved
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.
PTAL
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.
app/src/main/java/org/oppia/android/app/recyclerview/RecyclerViewBindingAdapter.java
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/home/HomeActivityTest.kt
Outdated
Show resolved
Hide resolved
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.
LGTM
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.
LGTM, Thanks.
Explanation
Fixes #2140:
If the username is too long then the username is displayed in the next line.
Short Names on WSVGA Tablet (Screen size - 7.00'')-
Long Names on WSVGA Tablet (Screen size - 7.00'')-
Short Names on QVGA Phone (Screen size - 3.20'')-
Long Names on QVGA Phone (Screen size - 3.20'')-
Newly Added Test cases passing on Espresso -
Newly Added Test cases passing on Robolectric -
Newly Added Test cases failing on Espresso(before making changes) -
Newly Added Test cases passing on Robolectric(before making changes) -
Fixed failed tests of other files -
ProfileChooserFragmentTest on ESPRESSO -
ProfileEditActivityTest on ESPRESSO -
ProfileEditActivityTest on Robolectric -
ProfileChooserFragmentTest on Robolectric -
Checklist