-
Notifications
You must be signed in to change notification settings - Fork 499
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 #4586: Improve text scaling according to accessibility scanner #4587
Conversation
@rt4914 Test case is failing because back button and navigation drawer icon is not displayed completely. With the current approach, I am setting minHeight=48dp and layout_height=wrap_content. The problem with this approach is that back button and navigation drawer icon is not set vertically. To set it vertically we need to remove minHeight attribute or need to set minHeight and layout_height same. |
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.
@vrajdesai78 A lot of changes in this PR seems non-required.
For example:
If in current develop code we have attributes
android:layout_height="?attr/actionBarSize"
android:minHeight="?attr/actionBarSize"
than the simplest and most correct solution for that is
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
Also, I am not getting any error for navigation drawer except for the overall width of the entire navigation drawer, nothing related to icons in toolbar/actionbar.
Please do check app and your changes once again.
Also,
- if anywhere scanner tests are failing, attach screenshot with correct committed code.
- if anywhere UI is not looking good as you mentioned, please share screenshot of that too.
@vrajdesai78 Solution 1using Solution 2Just a sample code, not perfect, check mocks for perfect code. This sample code is for button.
Solution 3In this also the |
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.
@vrajdesai78 Please mention what issues you are still facing in this PR.
Earlier I had a look at PR description from which I understood that you are still stuck on errors but from code it looks like you are not.
So if you are stuck on something explicitly mention that.
Otherwise I have mentioned the approach for buttons, please follow that for better results.
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.
@vrajdesai78 Requested some explanations. PTAL
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.
Unassigning @rt4914 since they have already approved the PR. |
## Explanation Fixes #4684 This PR reverts #4587. I think the change of match_parent to wraps_content caused the promoted story container to grow for larger images, and this wasn't caught until we tried the changes with production assets. I noticed other places in the PR that might have the same issue, so rather than trying to make sense of everything in order to properly fix it & add tests, I opted to revert the change since the regression is beta-blocking (even though it wasn't a clean reversion and required manual changes). Note that the reversion includes keeping the changes to recently_played_fragment since otherwise changes in RecentlyPlayedFragmentTest fail, and the change seems unlikely to cause any problems with respect to potential thumbnail sizing issues. ## 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)). ## For UI-specific PRs only There's not much to show here--see the issue for context on the problem. The post-reversion just reverts things back to their previous state (i.e. no regression).
Explanation
Fixes #4586: Improved text scaling by setting layout_height and layout_width to wrap_content and setting min_height = 48dp and min_width = 48dp (may vary in some cases).
Essential Checklist
A11YS result before changes
A11Ys result after changes