-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Replace deprecated icons and update ArticleScreen KDoc #1573
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
base: main
Are you sure you want to change the base?
Conversation
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.
Hello @onurvatansever6, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
Hello! Gemini here, ready to give you a quick rundown of this pull request. This PR focuses on modernizing the codebase by addressing deprecated icon usage and improving documentation clarity. Specifically, it replaces several instances of Icons.Filled
with their Icons.AutoMirrored.Filled
counterparts, which is the recommended approach for icons that should automatically mirror in right-to-left (RTL) layouts. Additionally, the KDoc for the isExpandedScreen
parameter in the ArticleScreen
composable has been updated to provide a more precise description of its function in determining layout behavior based on screen size.
Highlights
- Icon Replacement: Deprecated
Icons.Filled
usage forArrowBack
andListAlt
has been replaced withIcons.AutoMirrored.Filled
to ensure proper mirroring in RTL layouts, aligning with Material Design guidelines. - Documentation Update: The KDoc for the
isExpandedScreen
parameter inArticleScreen.kt
has been updated to clarify its role in controlling the visibility of the navigation icon and bottom bar based on window width classification.
Changelog
- JetNews/app/src/main/java/com/example/jetnews/ui/AppDrawer.kt
- Replaced import and usage of
Icons.Filled.ListAlt
withIcons.AutoMirrored.Filled.ListAlt
.
- Replaced import and usage of
- JetNews/app/src/main/java/com/example/jetnews/ui/article/ArticleScreen.kt
- Replaced import and usage of
Icons.Filled.ArrowBack
withIcons.AutoMirrored.Filled.ArrowBack
. - Updated KDoc for the
isExpandedScreen
parameter (line 75).
- Replaced import and usage of
- JetNews/app/src/main/java/com/example/jetnews/ui/components/AppNavRail.kt
- Replaced import and usage of
Icons.Filled.ListAlt
withIcons.AutoMirrored.Filled.ListAlt
.
- Replaced import and usage of
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Icons point the way,
Auto-mirrored now they are,
Docs are clear and bright.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Code Review
This pull request successfully addresses the stated objectives: replacing deprecated Material Design icons with their AutoMirrored
counterparts and updating the KDoc for the isExpandedScreen
parameter in ArticleScreen.kt
. The changes are clean and directly implement the necessary updates for better support of RTL layouts and improved documentation clarity.
Summary of Findings
- Deprecated Icon Replacement: The pull request correctly replaces deprecated icon imports and usage (
Icons.Filled.ListAlt
,Icons.Filled.ArrowBack
) with the recommendedIcons.AutoMirrored.Filled
versions. This is important for ensuring icons are displayed correctly in Right-to-Left (RTL) layouts, improving the user experience for users of those languages. - KDoc Update: The KDoc for the
isExpandedScreen
parameter inArticleScreen.kt
has been updated to provide a more accurate and detailed description of its role in determining layout behavior and hiding certain UI elements. This improves code maintainability and understanding. - Accessibility - Icon Content Description: A low severity issue was noted regarding the
null
content description for theListAlt
icon inAppDrawer.kt
. While this issue existed before this PR and was not introduced by these changes, it is generally recommended to provide meaningful content descriptions for icons to improve accessibility for users who rely on screen readers. This issue was not commented on directly in the code review due to the configured review settings, but is included here for completeness.
Merge Readiness
The changes in this pull request are well-implemented and directly address the stated goals. No critical, high, or medium severity issues were found in the modified code. The pull request appears ready to be merged. Please note that I am unable to directly approve the pull request; other reviewers should review and approve this code before merging.
This PR updates outdated documentation and replaces deprecated icon usage in accordance with the latest Material guidelines.
Changes:
Closes #1572