-
Notifications
You must be signed in to change notification settings - Fork 528
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
Fix #5075: Revert "Fix #5072 : Remove condition of hex color for drawables from regex" #5081
Conversation
Hi @adhiamboperes, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
Hi @rt4914, as per @MohitGupta121's comment, PTAL and let us know if this sufficiently addresses #5114. |
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.
No concerns since this is a clean revert.
Unassigning @seanlip since they have already approved the PR. |
Hi @adhiamboperes, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks! |
Hi @adhiamboperes, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks! |
The check (to be reintroduced by this revert) is failing because of the following files introduced in #4881:
After replacing the highlighted lines with component_colors: The project fails to build with error:
Which is the original cause for the reversion in #5076. Essentially, this issue is still not fixed, so I will hold off merging this PR. It appears that the CI check is actually not entirely correct, and should be modified in order to actually fix #5075 and #5114. |
Closing in favor of #5123 |
## Explanation Fixes #5075. This PR adds back the color hex regex check removed in #5076. This requires a static check exemption for two vectors in the `drawable` directory, `survey_nps_radio_selected_color.xml` and `survey_nps_radio_unselected_color.xml`. The check `file_path_regex: "app/src/main/res/drawable.*?/.+?\\.xml"` blanket checks all drawables, including vectors. Since these cannot fully be changed to use component colors yet, I think that the best approach is to exempt them from the check. This is a replacement of PR #5081, since #5081 would nolonger be a clean revert. ## 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 <!-- 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 --------- Co-authored-by: Ben Henning <[email protected]>
Fixes #5075 :Reverts #5076
I took another look at the regex checks and noticed that they actually generally prohibit use of color hex in any drawables other than Vector files(which were the files that caused me to request this change in #4945), so the check is valid.(Sorry!)