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: Button extreme margins #3192

Merged
merged 1 commit into from
May 17, 2021

Conversation

rt4914
Copy link
Contributor

@rt4914 rt4914 commented May 13, 2021

Explanation

Fixes part of #40
Fixes part of #42

This PR introduces the dimens value for start/end margins for buttons which will be used in later PRs.

Also, check below comments where I have mentioned reference for each value.

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.

<dimen name="general_button_item_exploration_split_view_margin_start">48dp</dimen>
<dimen name="general_button_item_exploration_split_view_margin_end">48dp</dimen>

<!-- General Button: Exploration View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

correct

<dimen name="general_button_item_question_split_view_margin_start">48dp</dimen>
<dimen name="general_button_item_question_split_view_margin_end">48dp</dimen>

<!-- General Button: Question View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

correct

<dimen name="general_button_item_exploration_view_margin_start">28dp</dimen>
<dimen name="general_button_item_exploration_view_margin_end">28dp</dimen>

<!-- General Button: Question Split View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -399,4 +399,20 @@
<!-- Previous Responses Item: Question View -->
<dimen name="previous_responses_item_question_view_margin_start">44dp</dimen>
<dimen name="previous_responses_item_question_view_margin_end">44dp</dimen>

<!-- General Button Item: Exploration Split View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

The same applies to here, this is the mobile res directory so we might not be using the split resources here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually Sliptview depends on two things: (a.) Physical size of more than 7" and (b.) DragAndDrop/ImageRegionSelection interaction

It is independent of tablet or mobile or its configuration

So there might come a mobile which is more than 7" and in that case will need to use split screen.

<dimen name="general_button_item_exploration_split_view_margin_start">48dp</dimen>
<dimen name="general_button_item_exploration_split_view_margin_end">48dp</dimen>

<!-- General Button: Exploration View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need these values?

As this is a port res dir, so if they will always use the split view, the split resources will be used. I think we can remove these items!! Let me know if I miss anything here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually Sliptview depends on two things: (a.) Physical size of more than 7" and (b.) DragAndDrop/ImageRegionSelection interaction

It is independent of tablet or mobile or its configuration

<dimen name="general_button_item_question_split_view_margin_start">48dp</dimen>
<dimen name="general_button_item_question_split_view_margin_end">48dp</dimen>

<!-- General Button: Question View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

correct

@@ -200,4 +200,20 @@
<!-- Previous Responses Item: Question View -->
<dimen name="previous_responses_item_question_view_margin_start">140dp</dimen>
<dimen name="previous_responses_item_question_view_margin_end">140dp</dimen>

<!-- General Button Item: Exploration Split View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

correct

<dimen name="general_button_item_exploration_view_margin_start">112dp</dimen>
<dimen name="general_button_item_exploration_view_margin_end">112dp</dimen>

<!-- General Button: Question Split View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

correct

<dimen name="general_button_item_exploration_split_view_margin_start">48dp</dimen>
<dimen name="general_button_item_exploration_split_view_margin_end">64dp</dimen>

<!-- General Button: Exploration View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks a bit odd, the start margin is the same as the content, which makes them display in a similar margin of 176, but the end, the button has 176 and the content has 208.

But, in another exploration view, we tend to keep the button more margin so it comes inside than content.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For mobile we are generally keeping the buttons a bit inward w.r.t. overall content but in tablet we are keeping them outward. The outward is more correct but for mobile we need to make sure that there is sufficient margins on all side and thats why we kept it inwards.

<dimen name="general_button_item_exploration_split_view_margin_start">48dp</dimen>
<dimen name="general_button_item_exploration_split_view_margin_end">64dp</dimen>

<!-- General Button: Exploration View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct

<dimen name="general_button_item_question_split_view_margin_start">48dp</dimen>
<dimen name="general_button_item_question_split_view_margin_end">64dp</dimen>

<!-- General Button: Question View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct

<dimen name="general_button_item_question_split_view_margin_start">48dp</dimen>
<dimen name="general_button_item_question_split_view_margin_end">64dp</dimen>

<!-- General Button: Question View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

correct

@@ -197,4 +197,20 @@
<!-- Previous Responses Item: Question View -->
<dimen name="previous_responses_item_question_view_margin_start">204dp</dimen>
<dimen name="previous_responses_item_question_view_margin_end">204dp</dimen>

<!-- General Button Item: Exploration Split View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct

@@ -149,4 +149,20 @@
<!-- Previous Responses Item: Question View -->
<dimen name="previous_responses_item_question_view_margin_start">76dp</dimen>
<dimen name="previous_responses_item_question_view_margin_end">76dp</dimen>

<!-- General Button Item: Exploration Split View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct

<dimen name="general_button_item_exploration_view_margin_start">64dp</dimen>
<dimen name="general_button_item_exploration_view_margin_end">64dp</dimen>

<!-- General Button: Question Split View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct

<dimen name="general_button_item_exploration_view_margin_start">176dp</dimen>
<dimen name="general_button_item_exploration_view_margin_end">176dp</dimen>

<!-- General Button: Question Split View -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

correct

Copy link
Contributor

@anandwana001 anandwana001 left a comment

Choose a reason for hiding this comment

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

Nit thoughts left, Thanks @rt4914

@anandwana001 anandwana001 assigned rt4914 and unassigned anandwana001 May 17, 2021
@rt4914 rt4914 assigned anandwana001 and unassigned rt4914 May 17, 2021
Copy link
Contributor

@anandwana001 anandwana001 left a comment

Choose a reason for hiding this comment

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

LGTM

@oppiabot
Copy link

oppiabot bot commented May 17, 2021

Unassigning @anandwana001 since they have already approved the PR.

@oppiabot oppiabot bot added the PR: LGTM label May 17, 2021
@anandwana001 anandwana001 merged commit 132d333 into develop May 17, 2021
@anandwana001 anandwana001 deleted the general-button-extreme-margins branch May 17, 2021 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants