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

DisableBaselineAlignment + InefficientWeight + Overdraw + UseCompoundDrawables + UselessLeaf + UselessParent #5261

Closed
Tracked by #5169
adhiamboperes opened this issue Dec 6, 2023 · 6 comments
Labels
bug End user-perceivable behaviors which are not desirable. 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). Work: Low Solution is clear and broken into good-first-issue-sized chunks.

Comments

@adhiamboperes
Copy link
Collaborator

No description provided.

@adhiamboperes
Copy link
Collaborator Author

@deonwaju , Re: your comment:

  1. Fix part of [DisableBaselineAlignment + InefficientWeight + Overdraw + UseCompoundDrawables + UselessLeaf + UselessParent]
    Fix for DisableBaselineAlignment: (A) Add android:baselineAligned="false" to LinearLayout on line 12 in "layout-sw600dp-land/topic_info_fragment.xml"
    (B) Add android:baselineAligned="false" to LinearLayout on line 91 in "
    "layout/topic_lessons_story_summary.xml"
    (C) Add android:baselineAligned="false" to LinearLayout on line 93 in "
    "layout-sw600dp-land/topic_lessons_story_summary.xml"
    Example below:
    Warning: Addressing DisableBaselineAlignment warning on the 13th issue on the list [DisableBaselineAlignment + InefficientWeight + Overdraw + UseCompoundDrawables + UselessLeaf + UselessParent]

I have checked this for an explanation of this lint warning. I'm curious about the usage of weight in these layouts. Is it necessary?

@deonwaju
Copy link
Collaborator

deonwaju commented Dec 6, 2023

I have checked this for an explanation of this lint warning. I'm curious about the usage of weight in these layouts. Is it necessary?

I think the weight assignment indicates that the TextView should take up a proportional amount of space horizontally in the linear layout. An alternative would be to use a constraint layout.

Screenshot 2023-12-06 at 23 43 28

@adhiamboperes
Copy link
Collaborator Author

@deonwaju, Sure, let's go with your approach.

@deonwaju
Copy link
Collaborator

deonwaju commented Dec 7, 2023

@deonwaju, Sure, let's go with your approach.

Sorry not clear, the first approach or using a constraint layout?

@adhiamboperes
Copy link
Collaborator Author

The first one for baseline alignment. Pere the SO link, it seems to be a performance improvement, and will require the least effort.

adhiamboperes pushed a commit that referenced this issue Dec 7, 2023
<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
<!--
- Explain what your PR does. If this PR fixes an existing bug, please
include
- "Fixes #bugnum:" in the explanation so that GitHub can auto-close the
issue
  - when this PR is merged.
  -->
Fix part of #5261
(A) Add android:baselineAligned="false" to LinearLayout on line 12 in
"layout-sw600dp-land/topic_info_fragment.xml"
(B) Add android:baselineAligned="false" to LinearLayout on line 91 in "
"layout/topic_lessons_story_summary.xml"
(C) Add android:baselineAligned="false" to LinearLayout on line 93 in "
"layout-sw600dp-land/topic_lessons_story_summary.xml"

## 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".
- [x] 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)).
@adhiamboperes adhiamboperes added 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). bug End user-perceivable behaviors which are not desirable. Work: Low Solution is clear and broken into good-first-issue-sized chunks. labels Dec 14, 2023
adhiamboperes added a commit that referenced this issue Jan 22, 2024
Fix part of #5261

Remove quantity zero from pt-rBR/strings.xml: line 208 [<plurals
name="ongoing_topic_count" fuzzy="true">]
Do the same for <plurals name="completed_story_count" fuzzy="true"> line
203


<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
<!--
- Explain what your PR does. If this PR fixes an existing bug, please
include
- "Fixes #bugnum:" in the explanation so that GitHub can auto-close the
issue
  - when this PR is merged.
  -->

Before:
        
<img width="1266" alt="Screenshot 2024-01-20 at 21 07 05"
src="https://github.com/oppia/oppia-android/assets/54560535/dee10ff1-b395-47b2-958d-a47bc0c1461c">

After:

<img width="1373" alt="Screenshot 2024-01-20 at 22 09 41"
src="https://github.com/oppia/oppia-android/assets/54560535/aea2de1d-a7fc-409b-b6eb-6483ad271402">


## 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".
- [X] 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)).

Co-authored-by: Adhiambo Peres <[email protected]>
adhiamboperes added a commit that referenced this issue Jan 28, 2024
<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation

Fix part of #5261
(A) Added android:layout_width="0dp" to line 34 in
view_event_logs_event_log_item_view.xml

### Layout
Before:
<img width="316" alt="before"
src="https://github.com/oppia/oppia-android/assets/54560535/a37fba9a-d259-4eb3-b59e-b10d65f9ea57">


After:
<img width="321" alt="after"
src="https://github.com/oppia/oppia-android/assets/54560535/c67b01c3-aad7-4b51-9030-e483689c3914">


### Lint Check
Before: 
<img width="1415" alt="Screenshot 2024-01-20 at 14 14 24"
src="https://github.com/oppia/oppia-android/assets/54560535/ad82ff35-88e7-493b-b992-bced3d5ad777">

After:
<img width="1433" alt="Screenshot 2024-01-20 at 15 09 13"
src="https://github.com/oppia/oppia-android/assets/54560535/29c6122b-5d9f-498e-8531-e444c9d62a9f">



## 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".
- [x] 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)).

---------

Co-authored-by: Adhiambo Peres <[email protected]>
@adhiamboperes
Copy link
Collaborator Author

Closing this due to lack of context in the decription. It will be tracked by the main issue - #5169

@adhiamboperes adhiamboperes closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug End user-perceivable behaviors which are not desirable. 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). Work: Low Solution is clear and broken into good-first-issue-sized chunks.
Development

No branches or pull requests

2 participants