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

[Feature Request]: Add Missing style Attributes to TextViews #5661

Open
manas-yu opened this issue Jan 22, 2025 · 5 comments
Open

[Feature Request]: Add Missing style Attributes to TextViews #5661

manas-yu opened this issue Jan 22, 2025 · 5 comments
Assignees
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). Work: Low Solution is clear and broken into good-first-issue-sized chunks.

Comments

@manas-yu
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

The TextViewStyleCheck script was introduced in #5599 to ensure all TextView elements in layout XML files use centrally managed styles to support consistent design and proper RTL/LTR settings. However, a list of hardcoded exceptions (attributeIds) has been added to bypass the style check for specific TextView elements that currently lack a style attribute.

This issue aims to address these exceptions by updating the respective TextView elements to include appropriate centrally managed style attributes.

Describe the solution you'd like

  1. Identify the missing styles for each TextView ID in the attributeIds list and determine the appropriate style that should be applied.
  2. If an existing style is available, reuse it. Otherwise, define a new style in the styles.xml file.
  3. Update the corresponding TextView element to use the identified or newly created style, and then remove its ID from the attributeIds list in the TextViewStyleCheck script.

Describe alternatives you've considered

No response

Additional context

No response

@manas-yu manas-yu added enhancement End user-perceivable enhancements. triage needed labels Jan 22, 2025
@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). Work: Low Solution is clear and broken into good-first-issue-sized chunks. and removed triage needed labels Jan 22, 2025
@Harsh2118-hub
Copy link

@adhiamboperes please assign me this issue.

@adhiamboperes
Copy link
Collaborator

@Harsh2118-hub, I am assigning this issue to you.

Please note that, the linked list of ids is for 100 textviews, so the expectation is to create a PR with not more than 10 ids at a time. This is because you need to upload before and after screenshots for each screen that you have added a style for, so that we can verify that it looks the same as it is currently.

@Harsh2118-hub
Copy link

I am encountering an issue where I cannot find the file TextViewStyleCheck.kt in my Android Studio project. Any help on how to locate this file or resolve this issue would be greatly appreciated.

Thank you!

@manas-yu
Copy link
Collaborator Author

Hi @Harsh2118-hub, the changes in #5599 are yet to be merged but should be merged soon. In the meantime, you can reference the TextView IDs here.

@manas-yu
Copy link
Collaborator Author

@Harsh2118-hub, the TextViewStyleCheck script is now available. Please update your branch and pull the latest changes to access it.

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). Work: Low Solution is clear and broken into good-first-issue-sized chunks.
Development

No branches or pull requests

3 participants