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 #1171 #1173 #1175 #1177: Exploration/Question player high-fi work #1531

Merged
merged 35 commits into from
Jul 28, 2020

Conversation

MohamedMedhat1998
Copy link
Contributor

Explanation

This PR implements the high-fi work for Tablet Devices and Split Screen for the following items

  • Content Item
  • Feedback Item
  • Submitted Item
  • Submitted Item List
  • Previous Responses Header
  • Text Input Interaction
  • Fraction Input Interaction
  • Number Input Interaction
  • Drag and Drop Interaction
  • Multiple Choice Interaction
  • Item Selection Interaction
  • Continue Button
  • Submit Button
  • Previous Button (active/ inactive)
  • Next Button
  • Replay Button
  • Return to Topic Button
  • Question ProgressBar in QuestionPlayer
  • AudioBar in ExplorationPlayer

What was changed

StateRecyclerViewAssembler

  • Used the observable field isSplitView for all ViewModels
  • Added isExtraInteractionAnswerCorrect that is used in the split-screen to center the correct answer of the user on the right
    screenshot-2020-07-27_13 30 57 567

layout-land

  • Deleted all the layout-land files for the interactions because they didn't exist before split-screen work

Player sub-components

  • Updated the margins to follow the following rules
    • QuestionPlayer sub-components items are centered (128 start and end margin in portrait) (192 start and end margins in landscape)
    • ExplorationPlayer sub-components items follow the conversational view (176 and 208 margins in landscape) (112 and 144 margins in portrait)

dimen.xml

  • Added some values

state_fragment

  • Updated the margins of the AudioBar and Congratulation text

question_fragment

  • Updated the margins of the QuestionProgressBar and Congratulation text

Screenshots

Tablet-Land

screenshot-2020-07-27_13 20 39 871
screenshot-2020-07-27_13 20 46 111
screenshot-2020-07-27_13 21 21 543
screenshot-2020-07-27_13 21 30 454
screenshot-2020-07-27_13 21 45 918
screenshot-2020-07-27_13 22 20 383
screenshot-2020-07-27_13 15 57 51
screenshot-2020-07-27_13 16 07 558
screenshot-2020-07-27_13 16 14 534
screenshot-2020-07-27_13 16 23 102
screenshot-2020-07-27_13 16 29 078
screenshot-2020-07-27_13 16 35 438
screenshot-2020-07-27_13 16 47 718
screenshot-2020-07-27_13 17 14 174
screenshot-2020-07-27_13 17 19 542
screenshot-2020-07-27_13 17 27 134
screenshot-2020-07-27_13 17 40 326
screenshot-2020-07-27_13 17 50 078
screenshot-2020-07-27_13 17 56 99
screenshot-2020-07-27_13 18 10 014
screenshot-2020-07-27_13 18 19 862
screenshot-2020-07-27_13 18 38 374
screenshot-2020-07-27_13 18 47 83
screenshot-2020-07-27_13 18 54 294
screenshot-2020-07-27_13 19 35 366
screenshot-2020-07-27_13 20 14 975
screenshot-2020-07-27_13 20 30 622
screenshot-2020-07-27_13 27 16 807

Tablet-Port

screenshot-2020-07-27_13 24 52 039
screenshot-2020-07-27_13 25 15 151
screenshot-2020-07-27_13 25 18 886
screenshot-2020-07-27_13 25 29 287
screenshot-2020-07-27_13 25 39 719
screenshot-2020-07-27_13 25 53 918
screenshot-2020-07-27_13 25 59 992
screenshot-2020-07-27_13 26 06 046
screenshot-2020-07-27_13 26 25 623
screenshot-2020-07-27_13 26 33 809
screenshot-2020-07-27_13 26 43 87
screenshot-2020-07-27_13 27 02 359
screenshot-2020-07-27_13 22 45 279
screenshot-2020-07-27_13 22 49 518
screenshot-2020-07-27_13 23 00 471
screenshot-2020-07-27_13 23 06 327
screenshot-2020-07-27_13 23 15 031
screenshot-2020-07-27_13 23 27 662
screenshot-2020-07-27_13 23 39 439
screenshot-2020-07-27_13 23 44 086
screenshot-2020-07-27_13 23 48 791
screenshot-2020-07-27_13 23 56 615
screenshot-2020-07-27_13 24 05 135
screenshot-2020-07-27_13 24 14 918
screenshot-2020-07-27_13 24 22 046
screenshot-2020-07-27_13 24 26 095
screenshot-2020-07-27_13 24 36 478

Split-screen

screenshot-2020-07-27_13 30 51 247
screenshot-2020-07-27_13 30 57 567
screenshot-2020-07-27_13 32 02 481
screenshot-2020-07-27_13 32 10 03
screenshot-2020-07-27_13 32 16 928
screenshot-2020-07-27_13 32 21 767
screenshot-2020-07-27_13 30 31 455
screenshot-2020-07-27_13 30 37 862

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The PR follows the style guide.
  • The PR does not contain any unnecessary auto-generated code from Android Studio.
  • The PR is made from a branch that's not called "develop".
  • The PR is made from a branch that is up-to-date with "develop".
  • The PR's branch is based on "develop" and not on any other branch.
  • The PR is assigned to an appropriate reviewer in both the Assignees and the Reviewers sections.

MohamedMedhat1998 and others added 27 commits July 25, 2020 17:21
…nts-lowfi

# Conflicts (Resolved):
#	app/src/main/java/org/oppia/app/player/state/StatePlayerRecyclerViewAssembler.kt
#	app/src/main/java/org/oppia/app/player/state/itemviewmodel/FeedbackViewModel.kt
#	app/src/main/java/org/oppia/app/player/state/itemviewmodel/FractionInteractionViewModel.kt
#	app/src/main/java/org/oppia/app/player/state/itemviewmodel/InteractionViewModelModule.kt
#	app/src/main/java/org/oppia/app/player/state/itemviewmodel/NumericInputViewModel.kt
#	app/src/main/java/org/oppia/app/player/state/itemviewmodel/PreviousButtonViewModel.kt
#	app/src/main/java/org/oppia/app/player/state/itemviewmodel/ReplayButtonViewModel.kt
#	app/src/main/java/org/oppia/app/player/state/itemviewmodel/SubmittedAnswerViewModel.kt
#	app/src/main/java/org/oppia/app/player/state/itemviewmodel/TextInputViewModel.kt
#	app/src/main/java/org/oppia/app/testing/InputInteractionViewTestActivity.kt
#	app/src/main/res/layout/question_player_feedback_item.xml
…yer-highfi

# Conflicts (Resolved):
#	app/src/main/java/org/oppia/app/player/state/StatePlayerRecyclerViewAssembler.kt
#	app/src/main/java/org/oppia/app/player/state/itemviewmodel/ContentViewModel.kt

-Some code reduction
# Conflicts (Resolved):
#	app/src/main/java/org/oppia/app/databinding/StateAssemblerMarginBindingAdapters.kt
#	app/src/main/java/org/oppia/app/databinding/StateAssemblerPaddingBindingAdapters.kt
#	app/src/main/java/org/oppia/app/player/state/StatePlayerRecyclerViewAssembler.kt
#	app/src/main/java/org/oppia/app/player/state/itemviewmodel/ContentViewModel.kt
#	app/src/main/res/layout-sw600dp-land/content_item.xml
#	app/src/main/res/layout-sw600dp-port/content_item.xml
#	app/src/main/res/layout/content_item.xml

-continue_interaction_item high-fi
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.

Its a nice implementation but there are couple of changes:

  1. The question player is slightly following the conversation layout, which is correct, it should follow the layout similar to mobile question player mocks (not in terms of exact margins but a simple non-conversation view). You can also see this here: https://xd.adobe.com/view/d405de00-a871-4f0f-73a0-f8acef30349b-a234/screen/f136ee72-dd2e-42cb-8ff3-7b1cb6d4eb04/ where it has been mentioned that the marginStart and marginEnd is same for all items.

  2. In this image: https://user-images.githubusercontent.com/8533363/88539787-2a8b9180-d012-11ea-9146-7b84273f5620.png you can notice that the buttons are not correctly aligned.

  3. In this image: https://user-images.githubusercontent.com/8533363/88539832-35462680-d012-11ea-916e-4682b6a1241b.png
    The interaction should get aligned with button on the right side. (Mobile Mock reference which shows that letf/right margins are same: https://xd.adobe.com/view/ee9e607b-dbd6-4372-48dc-b687d32af3da-98af/screen/336e968c-0811-4a5b-aac2-1f649ca7983b/specs/)

  4. Similarly in this, https://user-images.githubusercontent.com/8533363/88540095-aede1480-d012-11ea-9331-409d3f2d18e6.png , the left/right margin of Previous Responses Header should also be aligned with that of button.

In short the start/end margin for all items in question player will be same for all items which follows match_parent as width.

Also, I really appreciate you taking some improvisations wherever the mocks were not finished or their were inconsistencies.

@rt4914 rt4914 assigned MohamedMedhat1998 and unassigned rt4914 Jul 28, 2020
@MohamedMedhat1998
Copy link
Contributor Author

Its a nice implementation but there are couple of changes:

1. The question player is slightly following the conversation layout, which is correct, it should follow the layout similar to mobile question player mocks (not in terms of exact margins but a simple non-conversation view). You can also see this  here: https://xd.adobe.com/view/d405de00-a871-4f0f-73a0-f8acef30349b-a234/screen/f136ee72-dd2e-42cb-8ff3-7b1cb6d4eb04/ where it has been mentioned that the marginStart and marginEnd is same for all items.

2. In this image: https://user-images.githubusercontent.com/8533363/88539787-2a8b9180-d012-11ea-9146-7b84273f5620.png you can notice that the buttons are not correctly aligned.

3. In this image: https://user-images.githubusercontent.com/8533363/88539832-35462680-d012-11ea-916e-4682b6a1241b.png
   The interaction should get aligned with button on the right side. (Mobile Mock reference which shows that letf/right margins are same: https://xd.adobe.com/view/ee9e607b-dbd6-4372-48dc-b687d32af3da-98af/screen/336e968c-0811-4a5b-aac2-1f649ca7983b/specs/)

4. Similarly in this, https://user-images.githubusercontent.com/8533363/88540095-aede1480-d012-11ea-9331-409d3f2d18e6.png , the left/right margin of `Previous Responses Header` should also be aligned with that of button.

In short the start/end margin for all items in question player will be same for all items which follows match_parent as width.

Also, I really appreciate you taking some improvisations wherever the mocks were not finished or their were inconsistencies.

Thanks a lot.
I have worked on the changes, PTAL.

@rt4914
Copy link
Contributor

rt4914 commented Jul 28, 2020

@MohamedMedhat1998 There is still one alignment issue in the implementation in exploration player:

The right-side alignment of button with the interaction is incorrect. The right side white border should be aligned with the button right end. In landscape as well as portrait.

Screenshot 2020-07-28 at 11 50 11 PM

Screenshot 2020-07-28 at 11 50 38 PM

![Screenshot_1595960414](https://user-images.githubusercontent.com/9396084/88706110-0ae98b80-d12e-11ea-97ae-9e17d0e3f30f.png) ![Screenshot_1595960440](https://user-images.githubusercontent.com/9396084/88706113-0b822200-d12e-11ea-9c20-3f34aab47750.png)

@rt4914 rt4914 assigned MohamedMedhat1998 and unassigned rt4914 Jul 28, 2020
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 6b1a017 into develop Jul 28, 2020
@rt4914 rt4914 deleted the player-highfi branch July 28, 2020 21:20
@BenHenning
Copy link
Sponsor Member

Out of curiosity, @MohamedMedhat1998 why are we overwriting layout_height as a binding adapter?

@MohamedMedhat1998
Copy link
Contributor Author

Out of curiosity, @MohamedMedhat1998 why are we overwriting layout_height as a binding adapter?

@BenHenning because the thickness of the previous_responses_header differs based on some conditions.

@BenHenning
Copy link
Sponsor Member

I'm really hesitant to override such a core property since the order in which data-binding properties are resolved are quite complicated (leading situations like #1536). We might actually have other subtle crashes/issues with this override--could we use a custom view to set the response header thickness, instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants