microsoft / fluentui-system-icons

Fluent System Icons are a collection of familiar, friendly and modern icons from Microsoft.
https://aka.ms/fluentui-system-icons
MIT License
5.65k stars 498 forks source link

Convert XML Fluent Icons to ImageVector Compose Icons #597

Closed Younes-Charfaoui closed 1 month ago

Younes-Charfaoui commented 1 year ago

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:

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 šŸ’”

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:

Macintosh-Fan commented 12 months ago

Huge pull request :O

boukhalfa-khaled commented 7 months ago

+945,851 āˆ’13 Wow, with only a little work involved, we've got a huge pull request.

Macintosh-Fan commented 1 month ago

šŸ«”