This pull request (PR) aims to enhance the icons set provided by fluent system icons converting existing XML icons to Jetpack Compose ImageVector icons. By migrating to Jetpack Compose, we can leverage the declarative nature of Compose UI and take advantage of its powerful features for rendering scalable icons. This conversion will result in improved performance, flexibility, and maintainability of the icons in the project.
The main purpose was to have fluent API access to Fluent icons, the developer using Jetpack Compose can create an Icon like the following:
Icon(imageVector = FluentIcons.Filled.MyLocation12, contentDescription = "My Location")
How it was done ā
I have created a parser that parses the XML icons and converts them to fluentIcons using ImageVector compose's nature using materialPath.
Changes Made š”
Converted existing XML icons to Jetpack Compose ImageVector format.
Added necessary code to accommodate the changes introduced by the new icon format (especially the different sizes of the icons)
Testing Done ā
Verified that the icons maintain their original appearance and fidelity after the conversion process.
I think we can also make some screenshot tests for each icon, but that would take a long time to run the tests.
Missing Stuff š
Three icons are still remaining since they don't share the same structure as the other icons (they contain an extra clip-path); I will try to convert those manually. Here are the icons:
What has been done š„
This pull request (PR) aims to enhance the icons set provided by fluent system icons converting existing XML icons to Jetpack Compose ImageVector icons. By migrating to Jetpack Compose, we can leverage the declarative nature of Compose UI and take advantage of its powerful features for rendering scalable icons. This conversion will result in improved performance, flexibility, and maintainability of the icons in the project.
The main purpose was to have fluent API access to Fluent icons, the developer using Jetpack Compose can create an
Icon
like the following:How it was done ā
I have created a parser that parses the XML icons and converts them to
fluentIcons
usingImageVector
compose's nature usingmaterialPath
.Changes Made š”
Testing Done ā
I think we can also make some screenshot tests for each icon, but that would take a long time to run the tests.
Missing Stuff š
Three icons are still remaining since they don't share the same structure as the other icons (they contain an extra
clip-path
); I will try to convert those manually. Here are the icons: