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

Merge profile_chooser_fragment.xml into single xml file #3557

Closed
rt4914 opened this issue Jul 27, 2021 · 31 comments
Closed

Merge profile_chooser_fragment.xml into single xml file #3557

rt4914 opened this issue Jul 27, 2021 · 31 comments
Labels
enhancement End user-perceivable enhancements. good first issue This item is good for new contributors to make their pull request. Impact: Low Low perceived user impact (e.g. edge cases). Priority: Nice-to-have This work item is nice to have for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@rt4914
Copy link
Contributor

rt4914 commented Jul 27, 2021

Currently there are 4 versions of profile_chooser_fragment.xml file merge it into single xml file.

We can use https://text-compare.com/ to compare two versions of this file and for all the differences we can create variables in dimens.xml file and use it accordingly.

It can happen that it becomes really hard to merge all 4 files into single file, in such cases prefer code-readability over single file. Therefore it can be fine if in the end the code still contains 2 or 3 files.

Note: In PR, make sure you add before and after screenshot of mobile-portrait, mobile-landscape, tablet-portrait and tablet-landscape for comparison and make sure that there is not difference between before and after UI.

@rt4914 rt4914 added good first issue This item is good for new contributors to make their pull request. Priority: Nice-to-have This work item is nice to have for its milestone. Type: Improvement labels Jul 27, 2021
@rt4914 rt4914 added this to the Backlog milestone Jul 27, 2021
@priyatanu
Copy link
Contributor

@rt4914 , I would like to work on this issue ?

@priyatanu
Copy link
Contributor

@Arjupta , I would like to work on this issue ?

@Arjupta
Copy link
Contributor

Arjupta commented Jan 12, 2022

@priyatanu assigned it to you

@priyatanu
Copy link
Contributor

Thank you :D

@adizcode
Copy link
Contributor

adizcode commented Feb 1, 2022

I'm interested! Is this available?

@priyatanu
Copy link
Contributor

I'm interested! Is this available?

Hi @adizcode , I am working on it.

@adizcode
Copy link
Contributor

adizcode commented Feb 1, 2022

Okay

@ShivamMadlani
Copy link

I would like to work on this issue. Plz assign it to me

@ritece
Copy link

ritece commented Jul 9, 2022

I'm working on this! Please assign.

@rt4914
Copy link
Contributor Author

rt4914 commented Aug 2, 2022

Unassigned because of inactivity.

@BenHenning BenHenning added Z-ibt Temporary label for Ben to keep track of issues he's triaged. issue_user_developer labels Sep 15, 2022
@dmdbilal
Copy link

Can i work on this issue ?

@sorinmircea
Copy link

I did open: #4729

I do have a question regarding sw600dp-land and port files. The only difference that puzzles me is:

  • app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/space_0dp: @dimen/profile_chooser_margin_top_profile_not_added}"
  • app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/profile_chooser_fragment_margin_top_profile_already_added : @dimen/profile_chooser_fragment_margin_top_profile_not_added}"

Is there any way to merge this (@dimen/space_0dp and @dimen/profile_chooser_fragment_margin_top_profile_already_added
being different) into one XML without relying on any code changes?

@BenHenning
Copy link
Member

@dmdbilal it looks like this issue is being actively worked on, so you’ll need to find another one to work on.

@BenHenning
Copy link
Member

I did open: #4729

I do have a question regarding sw600dp-land and port files. The only difference that puzzles me is:

  • app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/space_0dp: @dimen/profile_chooser_margin_top_profile_not_added}"
  • app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/profile_chooser_fragment_margin_top_profile_already_added : @dimen/profile_chooser_fragment_margin_top_profile_not_added}"

Is there any way to merge this (@dimen/space_0dp and @dimen/profile_chooser_fragment_margin_top_profile_already_added being different) into one XML without relying on any code changes?

@msorins is the difference between those two based on a qualifier (like sw600dp or land)? If so, you could make sure that profile_chooser_fragment_margin_top_profile_already_added is defined as 0 in its dimens.xml file corresponding to whichever qualifier is used the 0dp code today. Could that work?

I’m also not sure what is meant by “no code changes”—could you clarify?

@sorinmircea
Copy link

Thank you for the tip, I was able to solve this and amended the PR with another commit.

@seanlip
Copy link
Member

seanlip commented Jan 13, 2023

Deassigning @msorins since he is no longer working on this.

@ArchitJain1201
Copy link
Contributor

@seanlip I would like to work on this issue. Can you please assign it to me?

@seanlip
Copy link
Member

seanlip commented Jan 15, 2023

@ArchitJain1201 Feel free to go ahead and raise a PR. If it looks reasonable we can assign you to this. Thanks!

@kunsistent
Copy link

Can I work on this issue? @seanlip

@seanlip
Copy link
Member

seanlip commented Jan 19, 2023

@kunsistent My response to @ArchitJain1201 above applies here, too.

@masclot
Copy link
Collaborator

masclot commented Jan 27, 2023

I created a PR, #4849, but I cannot assign it. Will it be automatically assigned or do i need to ping somebody?

@seanlip
Copy link
Member

seanlip commented Jan 27, 2023

Ah, I assigned @rt4914 for you @masclot. In the future I think you can just say "@xxx PTAL" and Oppiabot will assign them for you. Thanks!

rt4914 added a commit that referenced this issue Jan 27, 2023
<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
Fix part of #3557: Merges landscape and portrait versions of
profile_chooser_fragment.xml for sw600 screens.

## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [x] 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: ...".)
- [X] Any changes to
[scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets)
files have their rationale included in the PR explanation.
- [X] The PR follows the [style
guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [X] The PR does not contain any unnecessary code changes from Android
Studio
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [X] 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](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

## For UI-specific PRs only
<!-- Delete these section if this PR does not include UI-related
changes. -->
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](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines))
- Add a video showing the full UX flow with a screen reader enabled (see
[accessibility
guide](https://github.com/oppia/oppia-android/wiki/Accessibility-(A11y)-Guide))
- Add a screenshot demonstrating that you ran affected Espresso tests
locally & that they're passing

Portrait after:

![portrait-new](https://user-images.githubusercontent.com/103062089/213681891-df7c7f31-5092-49d9-983d-bf063d95830e.png)

Portrait before:

![portrait-current](https://user-images.githubusercontent.com/103062089/213681896-1c15ee67-7d55-4c81-9527-2f173ea5423d.png)

Landscape after:

![landscape-new](https://user-images.githubusercontent.com/103062089/213681897-331ae0a2-02bd-4c72-95c9-c8881de48d73.png)

Landscape before:

![landscape-current](https://user-images.githubusercontent.com/103062089/213681903-ffaa2ba0-8edb-4fe5-a55e-be695d7cfa48.png)

ProfileChooserSpanTest results:
![ProfileChooserSpanTest
results](https://user-images.githubusercontent.com/103062089/213684744-d8c9f6dc-e63d-4d0f-89cb-c55e5660ff15.png)

ProfileChooserFragmentTest results:

![ProfileChooserFragmentTest](https://user-images.githubusercontent.com/103062089/213691103-13051677-d193-48c4-8245-0624bd0237ac.png)

ProfileChooserFragmentTest on tablet:
![ProfileChooserFragmentTest on
tablet](https://user-images.githubusercontent.com/103062089/213702923-651578c3-6a3b-422d-b80c-595cf3b50751.png)

ProfileChooserActivityTest on tablet:
![ProfileChooserActivityTest on
tablet](https://user-images.githubusercontent.com/103062089/213701916-641a41d8-22d7-419c-83fc-928d6b9a9fe8.png)

Tablet portrait before:
![Tablet portrait
before](https://user-images.githubusercontent.com/103062089/213732359-cb9bd179-7a91-4328-8eb2-96b68cf4d086.png)

Tablet portrait after:
![Tablet portrait
after](https://user-images.githubusercontent.com/103062089/213732363-377b6d25-3345-4d41-a8e1-96ff67c70342.png)

Tablet landscape before:
![tablet landscape
before](https://user-images.githubusercontent.com/103062089/213732368-e830f9cb-df6e-46c3-85fd-40198c7961b9.png)

Tablet landscape after:
![Tablet landscape
after](https://user-images.githubusercontent.com/103062089/213732369-769c5357-5886-477f-8ac3-99d9ef8fdd40.png)

Tablet RTL portrait before:
![tablet RTL portrait
before](https://user-images.githubusercontent.com/103062089/213741488-dc4cd5a0-c0f6-4dc1-a87b-31c80183001a.png)

Tablet RTL portrait after:
![Tablet RTL portrait
after](https://user-images.githubusercontent.com/103062089/213741491-5a758ab7-3530-458c-8ced-c57c8573444d.png)

Tablet RTL landscape before:
![Tablet RTL landscape
before](https://user-images.githubusercontent.com/103062089/213741494-03739d21-1736-45db-bc25-e5937338582b.png)

Tablet RTL landscape after:
![Tablet RTL landscape
after](https://user-images.githubusercontent.com/103062089/213741496-dbef3ac3-1151-4afb-8939-262981c05dfb.png)

Co-authored-by: Rajat Talesra <[email protected]>
@seanlip seanlip added enhancement End user-perceivable enhancements. and removed issue_type_infrastructure labels Mar 28, 2023
@chrislee115
Copy link
Contributor

I'm working on this issue and making a PR

@seanlip
Copy link
Member

seanlip commented Mar 31, 2023

Hi @masclot @chrislee115 Just a question about this -- reading the conversation above, there's a PR #4849 that's already been merged. Are there remaining tasks for this issue?

/cc @BenHenning @adhiamboperes

@seanlip
Copy link
Member

seanlip commented Mar 31, 2023

(Also, PR #4849 says that it fixes part of the issue but doesn't really specify which part it fixes or which parts are left ... @masclot would you mind clarifying please? Thanks!)

@masclot
Copy link
Collaborator

masclot commented Mar 31, 2023

I merged the two layouts for big screens. There remained two layouts for small screens which I think can be merged. I don't think it makes sense to merge the layout for big screen with the ones for small screens.

@chrislee115
Copy link
Contributor

Are you referring to merging layout-sw600dp-land and layout-sw600dp-port?

@seanlip
Copy link
Member

seanlip commented Apr 5, 2023

Per discussion with @BenHenning, closing this issue because it looks like merging these files is a bit complicated and probably not worth it.

@seanlip seanlip closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement End user-perceivable enhancements. good first issue This item is good for new contributors to make their pull request. Impact: Low Low perceived user impact (e.g. edge cases). Priority: Nice-to-have This work item is nice to have for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
Development

No branches or pull requests