Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

onurvatansever6
Copy link

This PR updates outdated documentation and replaces deprecated icon usage in accordance with the latest Material guidelines.

Changes:

  • Replaced deprecated icon imports such as Icons.Filled.ArrowBack with Icons.AutoMirrored.Filled.ArrowBack.
  • Updated KDoc for isExpandedScreen to more clearly reflect its role in determining layout behavior.

Closes #1572

@onurvatansever6 onurvatansever6 requested a review from a team as a code owner June 4, 2025 07:29
@onurvatansever6 onurvatansever6 changed the title Replace deprecated icons and update ArticleScreen KDoc #1572 Replace deprecated icons and update ArticleScreen KDoc Jun 4, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a 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 for ArrowBack and ListAlt has been replaced with Icons.AutoMirrored.Filled to ensure proper mirroring in RTL layouts, aligning with Material Design guidelines.
  • Documentation Update: The KDoc for the isExpandedScreen parameter in ArticleScreen.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 with Icons.AutoMirrored.Filled.ListAlt.
  • JetNews/app/src/main/java/com/example/jetnews/ui/article/ArticleScreen.kt
    • Replaced import and usage of Icons.Filled.ArrowBack with Icons.AutoMirrored.Filled.ArrowBack.
    • Updated KDoc for the isExpandedScreen parameter (line 75).
  • JetNews/app/src/main/java/com/example/jetnews/ui/components/AppNavRail.kt
    • Replaced import and usage of Icons.Filled.ListAlt with Icons.AutoMirrored.Filled.ListAlt.
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

  1. 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.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 recommended Icons.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 in ArticleScreen.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 the ListAlt icon in AppDrawer.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR]: Update redundant KDoc and replace use of deprecated icons
1 participant