-
Notifications
You must be signed in to change notification settings - Fork 521
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 #40 & #42: Generalisation Highfi Mobile Portrait + Landscape #1616
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@anandwana001 I have just added these same margins for |
anandwana001
approved these changes
Aug 12, 2020
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 @rt4914
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation
Fixes part of #40 & #42
The exploration and question player has various common items which will finished as par of
Generalisation
PRs.These items are are following:
Definitions
Content Item
First item visible in question/exploration is content item.
Feedback Item
The feedback that learner receives based the submitted answer. This item has similar UI as that of
Content Item
but gets repeated unlikeContent Item
.Submitted Item
Whatever answer learner enters is shown as submitted item irrespective of correct/incorrect answer.
Submitted Item List
This has similar functionality as that of
Submitted-Item
but this is list which is used mainly whenDrag & Drop interaction
is shown.Previous Responses Header
Whenever there are multiple incorrect answers, mainly multiple
feedback-item
andsubmitted-item
then just to show everything correctly on screen, we collapse the intermediate responses. On click on this, learner can either expand/collapse the items.Input Interactions
Text, Fraction, Number Input Interactions are part of interactions which uses edit-text under different rules.
Drag and Drop Interaction
This interaction has list of items which can be dragged/reordered or combined to submit a particular response (like ordering of numbers in ascending number)
Multiple Choice Interaction
This interaction consists of few options (normally 3-5) and learner can select any one option only.
Item Selection Interaction
This interaction consists of few options (normally 3-5) and learner can select multiple options.
Continue Button
This button is shown, when there is no answer expected from learner, or either learner has submitted the answer and we are informing them to continue.
Submit Button (active/ inactive)
Button which can be clicked to submit answer, this button is visible for
Input Interactions
,Drag and Drop
Item Selection Interaction
Previous Button
Button to traverse to previous state.
Next Button
Button to traverse to next state, which learner had already visited.
Replay Button
Button to replay the
Question Player
.Return to Topic Button
Button shown on the last state of exploration to finish the exploration, save the progress and return to topic.
References:
Mobile Landscape Link: https://xd.adobe.com/view/ee9e607b-dbd6-4372-48dc-b687d32af3da-98af/grid
Mobile Portrait Link: https://xd.adobe.com/view/e8aa4198-3940-47f9-514a-f41cc54457f6-9e9b/grid
Tablet Link: https://xd.adobe.com/view/d405de00-a871-4f0f-73a0-f8acef30349b-a234/grid/ (Click on
mobile icon
on right side to switch between portrait / landscape mocks)These images were received on email and play an important role because the mocks have inconsistent layouts and therefore we have to follow these screens.
Exploration - Landscape
Exploration - Portrait
Question - Landscape
Question - Portrait
Other guidelines:
split view
will work only for tablet screens, it can work for any device if it passes all 4 conditions mentioned above. So if there is a mobile device which is big enough can have split view too.layout/content-item.xml
file which is used in portrait mobile device can be used for any of the 4 view-types: (a.) exploration player, (b.) question player (c.) exploration split-view and (d.) question split-view.Summary of guidelines:
So, technically each XML file can be configured under 4 types of conditions:
if (hasConversationView && !isSplitView)
(referred to asexplorationView
in xml files).if (!hasConversationView && !isSplitView)
(referred to asquestionView
in xml files).if (hasConversationView && isSplitView)
(referred to asexplorationSplitView
in xml files).if (!hasConversationView && isSplitView)
(referred to asquestionSplitView
in xml files).So, based on these 4 conditions, the margin/padding of each item can be different and therefore to manage that effecientially, we have introduced
StateAssemblerMarginBindingAdapters.kt
andStateAssemblerPaddingBindingAdapters.kt
Now everything below this is focused towards this PR:
This PR implements highfi of following items in Exploration / Portrait Mode for mobile devices.
Screenshots
Selection Interaction Margin Screenshots
How to test:
First Test Topic
in any XDHPI device for better visual comparison with mocks.Margin/ Padding has been followed from these mocks:
Note: If you see marginBottom for any item, normally we have kept it
0dp
so that we can introduce that asmarginTop
for next item which makes UI much easy to implement and visualise. Though there are some exceptions, for example the landscape mock of question player mentions that thecontent-item
margin-bottom
is40dp
. Now all other general items below that have margins top/bottom as24dp
therefore, forcontent-item
I have introduced margin-bottom as16dp
and the rest24dp
will be adjusted asmargin-top
of next item.Quick Margin / Padding Check
P ->
Portrait
L ->
Landscape
E ->
Exploration
Q ->
Question
T ->
Tablet
Convention:
marginStart
,marginTop
,marginEnd
,marginBottom
** Input Item**
P E -> 40, 24, 24, 0
P Q -> 32, 24, 32, 0
P T E -> 144, 24, 112, 0
P T Q -> 128, 24, 128, 0
L E -> 80, 24, 48, 0
L Q -> 64, 24, 64, 0
L T E -> 208, 24, 176, 0
L T Q -> 192, 24, 192, 0
Numbers above represent values in
dp
. You can use this to correctly check the margin/padding frommocks
-> to above table -> to code base.Checklist