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 part of #40 & #42: Previous Responses highfi + A11y #3186

Merged
merged 5 commits into from
May 13, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 0 additions & 76 deletions app/src/main/res/layout-land/previous_responses_header_item.xml

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 7 additions & 5 deletions app/src/main/res/layout/previous_responses_header_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,29 @@
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:minHeight="@dimen/clickable_item_min_height"
android:onClick="@{(v) -> viewModel.onResponsesHeaderClicked()}"
android:padding="0dp"
android:paddingTop="24dp"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this container I have removed marginTop=24dp and shifted it to paddingTop=24dp so that it can be the part of minheight=48dp.

app:explorationSplitViewMarginApplicable="@{viewModel.hasConversationView && viewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{@dimen/previous_responses_item_exploration_split_view_margin_end}"
app:explorationSplitViewMarginStart="@{@dimen/previous_responses_item_exploration_split_view_margin_start}"
app:explorationSplitViewMarginTop="@{@dimen/previous_responses_item_exploration_split_view_margin_top}"
app:explorationSplitViewMarginTop="@{@dimen/space_0dp}"
app:explorationViewMarginApplicable="@{viewModel.hasConversationView && !viewModel.isSplitView}"
app:explorationViewMarginBottom="@{@dimen/space_0dp}"
app:explorationViewMarginEnd="@{@dimen/previous_responses_item_exploration_view_margin_end}"
app:explorationViewMarginStart="@{@dimen/previous_responses_item_exploration_view_margin_start}"
app:explorationViewMarginTop="@{@dimen/previous_responses_item_exploration_view_margin_top}"
app:explorationViewMarginTop="@{@dimen/space_0dp}"
app:questionSplitViewMarginApplicable="@{!viewModel.hasConversationView && viewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/previous_responses_item_question_split_view_margin_end}"
app:questionSplitViewMarginStart="@{@dimen/previous_responses_item_question_split_view_margin_start}"
app:questionSplitViewMarginTop="@{@dimen/previous_responses_item_question_split_view_margin_top}"
app:questionSplitViewMarginTop="@{@dimen/space_0dp}"
app:questionViewMarginApplicable="@{!viewModel.hasConversationView && !viewModel.isSplitView}"
app:questionViewMarginBottom="@{@dimen/space_0dp}"
app:questionViewMarginEnd="@{@dimen/previous_responses_item_question_view_margin_end}"
app:questionViewMarginStart="@{@dimen/previous_responses_item_question_view_margin_start}"
app:questionViewMarginTop="@{@dimen/previous_responses_item_question_view_margin_top}">
app:questionViewMarginTop="@{@dimen/space_0dp}">

<FrameLayout
android:layout_width="0dp"
Expand All @@ -53,6 +54,7 @@
android:layout_height="wrap_content"
android:drawableEnd="@{viewModel.isExpanded ? @drawable/ic_arrow_down_grey_24dp : @drawable/ic_arrow_right_grey_24dp}"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="@{@string/previous_responses_header(viewModel.previousAnswerCount)}"
Expand Down
28 changes: 20 additions & 8 deletions app/src/main/res/values-land/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
<dimen name="text_input_interaction_item_conversation_view_margin_end">48dp</dimen>
<dimen name="drag_drop_item_exploration_view_margin_top">24dp</dimen>
<dimen name="drag_drop_item_question_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_exploration_split_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_exploration_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_question_split_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_question_view_margin_top">24dp</dimen>
<dimen name="profile_chooser_add_view_margin_top_profile_not_added">24dp</dimen>
<dimen name="profile_chooser_profile_view_margin_top_profile_not_added">24dp</dimen>

Expand All @@ -57,10 +53,6 @@
<dimen name="state_fragment_non_split_view_margin_end">120dp</dimen>
<dimen name="state_fragment_non_split_view_margin_start">120dp</dimen>
<dimen name="numeric_input_interaction_item_conversation_view_margin_start">80dp</dimen>
<dimen name="previous_responses_item_exploration_view_margin_end">80dp</dimen>
<dimen name="previous_responses_item_exploration_view_margin_start">80dp</dimen>
<dimen name="previous_responses_item_question_view_margin_end">80dp</dimen>
<dimen name="previous_responses_item_question_view_margin_start">80dp</dimen>
<dimen name="selection_interaction_item_conversation_view_margin_start">80dp</dimen>
<dimen name="drag_drop_item_exploration_split_view_margin_top">40dp</dimen>
<dimen name="drag_drop_item_question_split_view_margin_top">40dp</dimen>
Expand Down Expand Up @@ -141,4 +133,24 @@
<!-- Selection Interaction Item -->
<dimen name="selection_interaction_item_padding_start">16dp</dimen>
<dimen name="selection_interaction_item_padding_end">16dp</dimen>

<!-- Previous Responses Item: Exploration Split View -->
<dimen name="previous_responses_item_exploration_split_view_margin_start">36dp</dimen>
<dimen name="previous_responses_item_exploration_split_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_exploration_split_view_margin_end">52dp</dimen>

<!-- Previous Responses Item: Exploration View -->
<dimen name="previous_responses_item_exploration_view_margin_start">60dp</dimen>
<dimen name="previous_responses_item_exploration_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_exploration_view_margin_end">92dp</dimen>

<!-- Previous Responses Item: Question Split View -->
<dimen name="previous_responses_item_question_split_view_margin_start">44dp</dimen>
<dimen name="previous_responses_item_question_split_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_question_split_view_margin_end">44dp</dimen>

<!-- Previous Responses Item: Question View -->
<dimen name="previous_responses_item_question_view_margin_start">76dp</dimen>
<dimen name="previous_responses_item_question_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_question_view_margin_end">76dp</dimen>
</resources>
Loading