-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Jetchat] Update icons and remove material icons dependency #1589
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
Conversation
This commit replaces the Material Icons dependency with local drawable resources for all icons used in the Jetchat sample. This involves: - Adding new vector drawable XML files for each icon. - Updating composable functions to use painterResource for loading these local drawables instead of relying on the Icons object from the material-icons-extended library. - Removing the material-icons-extended dependency from the app's build.gradle.kts file. - Removing tint from `ic_baseline_person_24.xml` as it's applied in Compose.
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.
Summary of Changes
Hello @JolandaVerhoef, 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!
This pull request significantly refactors how icons are handled within the Jetchat sample application. The primary goal is to remove the external dependency on the material-icons-extended
library by replacing all its usages with local vector drawable resources. This change enhances the project's self-sufficiency and potentially optimizes the application's footprint.
Highlights
- Dependency Decoupling: The
material-icons-extended
library has been completely removed from the project's build configuration, reducing external dependencies and potentially the app's footprint. - Local Icon Management: All previously used Material Icons are now provided as local vector drawable XML files, ensuring that icon assets are bundled directly within the application.
- Composable Function Updates: Existing Compose UI components that previously referenced
Icons.Filled
orIcons.Outlined
now utilizepainterResource
to load icons from the newly added local drawables. - Drawable Resource Standardization: A minor adjustment was made to
ic_baseline_person_24.xml
to remove an inline tint, aligning with Compose's approach to applying tints programmatically.
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.
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 removes the Material Icons dependency and replaces them with local resources. I've added comments to improve code readability by using named arguments and to address a hardcoded color in ic_baseline_person_24.xml
.
android:fillColor="@color/blue500" | ||
android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/> |
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.
@@ -255,7 +252,7 @@ fun ChannelNameBar( | |||
actions = { | |||
// Search icon | |||
Icon( | |||
imageVector = Icons.Outlined.Search, | |||
painterResource(id = R.drawable.ic_search), |
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.
@@ -265,7 +262,7 @@ fun ChannelNameBar( | |||
) | |||
// Info icon | |||
Icon( | |||
imageVector = Icons.Outlined.Info, | |||
painterResource(id = R.drawable.ic_info), |
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.
@@ -114,7 +113,7 @@ fun RecordButton( | |||
state = tooltipState, | |||
) { | |||
Icon( | |||
Icons.Default.Mic, | |||
painterResource(id = R.drawable.ic_mic), |
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.
This commit replaces the Material Icons dependency with local drawable resources for all icons used in the Jetchat sample. This involves:
ic_baseline_person_24.xml
as it's applied in Compose.