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 #4450: Add next and previous card options on revision screen #4554

Merged
merged 38 commits into from
Oct 3, 2022

Conversation

JishnuGoyal
Copy link
Contributor

@JishnuGoyal JishnuGoyal commented Sep 5, 2022

Explanation

Fixes #4450

This PR creates navigation cards on the revision card screen so that the users can easily view the next revision item without having to return to the topic screen, thus fixing the issue #4450 as a part of the Interactive Onboarding Flow (GSoC) project. The current implementation makes sure that the functionality can be viewed correctly on a mobile screen.
This PR is backed up by unit tests.

Link to the original mock: https://xd.adobe.com/view/3dca36c2-5115-419c-b25e-0f10526b077c-6899/screen/9c633b9e-aae5-428d-a037-efcc0338c4df/specs/

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

Mobile (Portrait)

  1. When next and prev both are available
    image

  2. When only next is available
    image

  3. When only previous is available
    image

Mobile (Landscape)
image

Tablet (Portrait) - prev button only
image

Tablet (Portrait) - both buttons
image

Tablet (portrait) - next button only
image

Tablet (Landscape)
image

RTL:
image

RTL (land):
image

Confirming that the Espresso tests are passing locally:
image

Functionality demo:
https://user-images.githubusercontent.com/64526117/192758757-37e18649-2a5f-48dd-8917-19d5c15b143d.mp4

TalkBack:https://user-images.githubusercontent.com/64526117/192503526-8ef9100d-083e-40ef-ad17-04f857955354.mp4

# Conflicts:
#	app/src/main/res/values/strings.xml
@JishnuGoyal
Copy link
Contributor Author

PTAL @BenHenning please take an initial pass -- does the general implementation look correct?

@BenHenning
Copy link
Sponsor Member

BenHenning commented Sep 6, 2022

PTAL @BenHenning please take an initial pass -- does the general implementation look correct?

Hi @JishnuGoyal. I didn't review it in detail (i.e. I have a bunch of more detailed feedback that I can give), but I think it looks solid at a high-level. I do have some high-level feedback:

  • It looks like you had extra strings pulled in--please make sure to fix this.
  • I suggest controlling the visibility of the tiles via databinding instead of directly in Kotlin. It's a bit more idiomatic for how we usually do things, and I suspect it may simplify things in the binding flow a bit.
  • Consider combining the next/previous state into a single LiveData with an object that can represent the four different possible states: no previous/next, one previous no next, no previous one next, one previous one next. A sealed object would be a really nice fit here, but I don't think that will work in databinding so maybe just a simple, single data class or perhaps a proto oneof would work best.
  • Before sending this for review, I also suggest: adding missing tests, fixing CI checks, adding tablet/portrait screenshots to the PR description, demonstrate the a11y flow via a video in the PR description, and adding RTL screenshots to the PR description.

@BenHenning BenHenning assigned JishnuGoyal and unassigned BenHenning Sep 6, 2022
@JishnuGoyal
Copy link
Contributor Author

PTAL @BenHenning , thanks!

@oppiabot oppiabot bot assigned BenHenning and unassigned JishnuGoyal Sep 10, 2022
@oppiabot
Copy link

oppiabot bot commented Sep 10, 2022

Unassigning @JishnuGoyal since a re-review was requested. @JishnuGoyal, please make sure you have addressed all review comments. Thanks!

Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @JishnuGoyal! Some top-level thoughts:

  • Could you include two brief videos in the PR description showing you playing through and clicking the next/previous buttons with and without TalkBack (i.e. one video for TalkBack, one for not)? I think seeing how this will actually behave will help better contextualize your screenshots.
  • Why are the colors different between the tablet & non-tablet screenshots? Something seems wrong there.
  • For RTL, it seems like the header text isn't being reversed to the other side of the layout--is the wrong style being used for that TextView?
  • Please include screenshots for RevisionCardFragmentTest passing on Espresso since it's been changed.
  • It would be nice, I think, to include at least one screenshot of the new UI with dark mode just to see how it looks. While we're not factoring in dark mode fully for each individual PR, there are some color changes here that I'm wondering about.
  • The header looks a bit weird to me both for the "next button only" case, and on tablet in general. For the latter, it probably needs to be bigger. For the former, maybe a bigger header would help but I'm actually wondering if perhaps the button needs to be centered. I suggest emailing @mschanteltc and showing her the screenshots from this PR to get her thoughts on what we might be able to tweak to help with how it looks.
  • CI checks are failing--PTAL.

@BenHenning BenHenning assigned JishnuGoyal and unassigned BenHenning Sep 10, 2022
@mschanteltc
Copy link

mschanteltc commented Sep 15, 2022

Thank you Jishnu. I agree with Ben that when "only next is available," the current formatting looks a bit weird. Here are my suggestions for improvement:

All Layouts
Create a gray background (#F2F2F2) for the "Continue Studying" section.

Mobile (Portrait)
"Next only": Right-align the "Continue Studying" text and right-align its textbox with respect to its container. Right-align the Subtopic card (which is already done).

Mobile (Landscape) and Tablet (Portrait, Landscape)
Container width: Let's make the max container width that holds the heading and cards 480px. That way, elements in this section look more associated with each other. (Please correct me if I am using the correct terminology). I added links to the proposed designs and an image below. Let me know what you think!

Mobile, Portrait [Prev and Next] [Next Only]
Mobile, Landscape [Prev and Next] [Next Only]
Tablet, Portrait [Prev and Next] [Next Only]
Tablet, Landscape [Prev and Next] [Next Only]

TL Revision Card

TL Revision Card (Next Only)

@oppiabot
Copy link

oppiabot bot commented Sep 22, 2022

Hi @JishnuGoyal, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Sep 22, 2022
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @JishnuGoyal. Mostly LGTM. Just had a few nits left. Please also wait for CI to finish & fix all failures before sending back.

@BenHenning BenHenning assigned JishnuGoyal and unassigned BenHenning Sep 30, 2022
# Conflicts:
#	app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivity.kt
#	app/src/main/res/values/component_colors.xml
#	app/src/sharedTest/java/org/oppia/android/app/topic/revisioncard/RevisionCardFragmentTest.kt
@JishnuGoyal
Copy link
Contributor Author

PTAL @BenHenning

@oppiabot oppiabot bot assigned BenHenning and unassigned JishnuGoyal Oct 1, 2022
@oppiabot
Copy link

oppiabot bot commented Oct 1, 2022

Unassigning @JishnuGoyal since a re-review was requested. @JishnuGoyal, please make sure you have addressed all review comments. Thanks!

Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @JishnuGoyal. Just a few small things left (I think one of my past KDoc comments was a bit unclear, but I've clarified it now).

@BenHenning BenHenning assigned JishnuGoyal and unassigned BenHenning Oct 1, 2022
@JishnuGoyal
Copy link
Contributor Author

PTAL @BenHenning

@oppiabot oppiabot bot assigned BenHenning and unassigned JishnuGoyal Oct 2, 2022
@oppiabot
Copy link

oppiabot bot commented Oct 2, 2022

Unassigning @JishnuGoyal since a re-review was requested. @JishnuGoyal, please make sure you have addressed all review comments. Thanks!

Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

@JishnuGoyal I can't approve this PR yet because one of the comments wasn't fully addressed. PTAL.

@BenHenning BenHenning assigned JishnuGoyal and unassigned BenHenning Oct 2, 2022
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @JishnuGoyal! PR LGTM.

@oppiabot
Copy link

oppiabot bot commented Oct 2, 2022

Assigning @rt4914 for code owner reviews. Thanks!

@oppiabot oppiabot bot assigned rt4914 Oct 2, 2022
@BenHenning BenHenning merged commit f096b1d into oppia:develop Oct 3, 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.

Add next and previous card options on revision screen
4 participants