Skip to content

Commit e7c3034

Browse files
vnbaaijdvoituron
andauthored
[Icons] Update to Fluent UI System Icons 1.1.266 (#2990)
* Update to Fluent UI System Icons 1.1.266 Create project for each variant, change core Icon project ot reference new projects * Refactoring * Update sub-classes to namespaces * Update csproj emojis * Update sln * Fix existing emoji * Update emoji csproj to add dll in nuget package * Update ADO pipeline * - Move general project properties to `Directory.Build.Props` - Adjust `RootNamespace`s * ADO pipeline: remove old icons project and add OData adapter * Update templates to use packages version 4.11 or later and add required using * Doc updates * More docs --------- Co-authored-by: Denis Voituron <[email protected]>
1 parent fb59bc6 commit e7c3034

File tree

170 files changed

+27826
-34940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+27826
-34940
lines changed

Directory.Build.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
<AssemblyVersion>$(VersionFile)</AssemblyVersion>
1919
<FileVersion>$(VersionFile)</FileVersion>
2020

21+
<LangVersion>latest</LangVersion>
22+
<Nullable>enable</Nullable>
23+
<ImplicitUsings>enable</ImplicitUsings>
24+
2125
<!-- Enable code style analysis -->
2226
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
2327
<EnableNETAnalyzers>true</EnableNETAnalyzers>

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
</PropertyGroup>
1111
<ItemGroup>
1212
<!-- For Sample Apps -->
13-
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.10.2" />
14-
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" version="4.10.2" />
13+
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.10.4" />
14+
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" version="4.10.4" />
1515
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.6.0" />
1616
<!-- Test dependencies -->
1717
<PackageVersion Include="bunit" Version="1.31.3" />

eng/pipelines/build-all-lib.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ trigger: none # Disable dev and main branches.
55
pr: none # Disable pull request triggers.
66

77
parameters:
8-
- name: Projects # List of projects to build #**/Microsoft.FluentUI.AspNetCore.Components.Emoji.csproj
8+
- name: Projects # List of projects to build
99
default: |
1010
**/Microsoft.FluentUI.AspNetCore.Components.csproj
11-
**/Microsoft.FluentUI.AspNetCore.Components.Icons.csproj
11+
**/Components.Icons.Package.csproj
12+
**/Components.Emoji.Package.csproj
1213
**/Microsoft.FluentUI.AspNetCore.Templates.csproj
1314
**/Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter.csproj
15+
**/Microsoft.FluentUI.AspNetCore.Components.DataGrid.ODataAdapter.csproj
1416
1517
- name: Tests # List of Unit-Test projects to run
1618
default: |

examples/Demo/Shared/Microsoft.FluentUI.AspNetCore.Components.xml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4314,6 +4314,28 @@
43144314
<member name="M:Microsoft.FluentUI.AspNetCore.Components.FluentDropZone`1.OnDropHandler(Microsoft.AspNetCore.Components.Web.DragEventArgs)">
43154315
<summary />
43164316
</member>
4317+
<member name="T:Microsoft.FluentUI.AspNetCore.Components.CustomEmoji">
4318+
<summary>
4319+
Custom emoji loaded from <see cref="M:Microsoft.FluentUI.AspNetCore.Components.EmojiExtensions.GetInstance(Microsoft.FluentUI.AspNetCore.Components.EmojiInfo)"/>
4320+
</summary>
4321+
</member>
4322+
<member name="M:Microsoft.FluentUI.AspNetCore.Components.CustomEmoji.#ctor">
4323+
<summary>
4324+
Initializes a new instance of the <see cref="T:Microsoft.FluentUI.AspNetCore.Components.CustomEmoji"/> class.
4325+
</summary>
4326+
</member>
4327+
<member name="M:Microsoft.FluentUI.AspNetCore.Components.CustomEmoji.#ctor(Microsoft.FluentUI.AspNetCore.Components.Emoji)">
4328+
<summary>
4329+
Initializes a new instance of the <see cref="T:Microsoft.FluentUI.AspNetCore.Components.CustomEmoji"/> class.
4330+
</summary>
4331+
<param name="emoji"></param>
4332+
</member>
4333+
<member name="M:Microsoft.FluentUI.AspNetCore.Components.CustomEmoji.Zip(System.String)">
4334+
<summary />
4335+
</member>
4336+
<member name="M:Microsoft.FluentUI.AspNetCore.Components.CustomEmoji.CopyTo(System.IO.Stream,System.IO.Stream)">
4337+
<summary />
4338+
</member>
43174339
<member name="T:Microsoft.FluentUI.AspNetCore.Components.Emoji">
43184340
<summary>
43194341
FluentUI Emoji content.
@@ -4368,6 +4390,32 @@
43684390
<member name="M:Microsoft.FluentUI.AspNetCore.Components.EmojiCompress.CopyTo(System.IO.Stream,System.IO.Stream)">
43694391
<summary />
43704392
</member>
4393+
<member name="T:Microsoft.FluentUI.AspNetCore.Components.EmojiExtensions">
4394+
<summary />
4395+
</member>
4396+
<member name="M:Microsoft.FluentUI.AspNetCore.Components.EmojiExtensions.GetInstance(Microsoft.FluentUI.AspNetCore.Components.EmojiInfo)">
4397+
<summary>
4398+
Returns a new instance of the emoji.
4399+
</summary>
4400+
<remarks>
4401+
This method requires dynamic access to code. This code may be removed by the trimmer.
4402+
</remarks>
4403+
<returns></returns>
4404+
<exception cref="T:System.ArgumentException">Raised when the <see cref="P:Microsoft.FluentUI.AspNetCore.Components.EmojiInfo.Name"/> is not found in predefined emojis.</exception>
4405+
</member>
4406+
<member name="M:Microsoft.FluentUI.AspNetCore.Components.EmojiExtensions.GetAllEmojis">
4407+
<summary>
4408+
Returns a new instance of the emoji.
4409+
</summary>
4410+
<remarks>
4411+
This method requires dynamic access to code. This code may be removed by the trimmer.
4412+
</remarks>
4413+
<returns></returns>
4414+
<exception cref="T:System.ArgumentException">Raised when the <see cref="P:Microsoft.FluentUI.AspNetCore.Components.EmojiInfo.Name"/> is not found in predefined emojis.</exception>
4415+
</member>
4416+
<member name="P:Microsoft.FluentUI.AspNetCore.Components.EmojiExtensions.AllEmojis">
4417+
<summary />
4418+
</member>
43714419
<member name="T:Microsoft.FluentUI.AspNetCore.Components.EmojiInfo">
43724420
<summary>
43734421
FluentUI Emoji meta-data.
@@ -4719,6 +4767,22 @@
47194767
Gets or sets the content to be rendered inside the component.
47204768
</summary>
47214769
</member>
4770+
<member name="T:Microsoft.FluentUI.AspNetCore.Components.CustomIcon">
4771+
<summary>
4772+
Custom icon loaded from <see cref="M:Microsoft.FluentUI.AspNetCore.Components.IconsExtensions.GetInstance(Microsoft.FluentUI.AspNetCore.Components.IconInfo)"/>
4773+
</summary>
4774+
</member>
4775+
<member name="M:Microsoft.FluentUI.AspNetCore.Components.CustomIcon.#ctor">
4776+
<summary>
4777+
Initializes a new instance of the <see cref="T:Microsoft.FluentUI.AspNetCore.Components.CustomIcon"/> class.
4778+
</summary>
4779+
</member>
4780+
<member name="M:Microsoft.FluentUI.AspNetCore.Components.CustomIcon.#ctor(Microsoft.FluentUI.AspNetCore.Components.Icon)">
4781+
<summary>
4782+
Initializes a new instance of the <see cref="T:Microsoft.FluentUI.AspNetCore.Components.CustomIcon"/> class.
4783+
</summary>
4784+
<param name="icon"></param>
4785+
</member>
47224786
<member name="T:Microsoft.FluentUI.AspNetCore.Components.FluentIcon`1">
47234787
<summary>
47244788
FluentIcon is a component that renders an icon from the Fluent System icon set.
@@ -4912,6 +4976,33 @@
49124976
Gets the variant of the icon: Filled, Regular.
49134977
</summary>
49144978
</member>
4979+
<member name="T:Microsoft.FluentUI.AspNetCore.Components.IconsExtensions">
4980+
<summary />
4981+
</member>
4982+
<member name="M:Microsoft.FluentUI.AspNetCore.Components.IconsExtensions.GetInstance(Microsoft.FluentUI.AspNetCore.Components.IconInfo)">
4983+
<summary>
4984+
Returns a new instance of the icon.
4985+
</summary>
4986+
<param name="icon">The <see cref="T:Microsoft.FluentUI.AspNetCore.Components.IconInfo"/> to instantiate.</param>
4987+
<remarks>
4988+
This method requires dynamic access to code. This code may be removed by the trimmer.
4989+
</remarks>
4990+
<returns></returns>
4991+
<exception cref="T:System.ArgumentException">Raised when the <see cref="P:Microsoft.FluentUI.AspNetCore.Components.IconInfo.Name"/> is not found in predefined icons.</exception>
4992+
</member>
4993+
<member name="M:Microsoft.FluentUI.AspNetCore.Components.IconsExtensions.GetAllIcons">
4994+
<summary>
4995+
Returns a new instance of the icon.
4996+
</summary>
4997+
<remarks>
4998+
This method requires dynamic access to code. This code may be removed by the trimmer.
4999+
</remarks>
5000+
<returns></returns>
5001+
<exception cref="T:System.ArgumentException">Raised when the <see cref="P:Microsoft.FluentUI.AspNetCore.Components.IconInfo.Name"/> is not found in predefined icons.</exception>
5002+
</member>
5003+
<member name="P:Microsoft.FluentUI.AspNetCore.Components.IconsExtensions.AllIcons">
5004+
<summary />
5005+
</member>
49155006
<member name="T:Microsoft.FluentUI.AspNetCore.Components.FluentInputFile">
49165007
<summary />
49175008
</member>

examples/Demo/Shared/Pages/Emoji/EmojiPage.razor

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,23 @@
1616
contains all these emoji, which you can access directly in your projects.
1717
To use them, simply reference this package in your project.
1818
</p>
19+
<p>
20+
<div class="demopanel" style="margin: 1rem 0; padding: 1.5rem;">
21+
<h3>Important</h3>
22+
As of version 4.11.0 of our Emoji package, we are packaging each emoji category (activity, food, etc.) in its own assembly.
23+
This became necessary due to the large number of emoji and some compiler limitations. Nothing has changed on how the Emoji package needs to be installed or added to your project.
24+
There is a just a small change needed to your imports file (or using statements).
25+
<br />
26+
<br />
27+
<blockquote>
28+
To use the new version in your (upgraded) projects, you need add the following <code>&#64;using</code> statement to your _Imports.razor file:
29+
<CodeSnippet Language="csharp">&#64;using Emoji = Microsoft.FluentUI.AspNetCore.Components.Emoji</CodeSnippet>
30+
</blockquote>
31+
<br />
32+
Alternatively, you can use the full namespace in your code or define the alias for the namespace at the top of your file.
33+
</div>
34+
</p>
35+
1936
<p>
2037
You can use any of these emoji by levaraging the <code>&lt;FluentEmoji&gt;</code> component. See below for the parameters and examples. There is
2138
also a search capability available on this page which allows you to browse through all the available emoji.

examples/Demo/Shared/Pages/Icon/IconPage.razor

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,34 @@
77
<h1>Icon</h1>
88

99
<p>
10-
The <a title="FluentUI System Icons repository" href="https://github.com/microsoft/fluentui-system-icons" target="_blank" rel="noopener">Fluent UI System Icons</a>
11-
are a (still growing) collection of familiar, friendly and modern icons from Microsoft. At the moment there are more than 2200 distinct icons
10+
The <a title="FluentUI System Icons repository" href="https://github.com/microsoft/fluentui-system-icons" target="_blank" rel="noopener">Fluent UI System Icons</a>
11+
are a (still growing) collection of familiar, friendly and modern icons from Microsoft. At the moment there are more than 2200 distinct icons
1212
available in both filled and outlined versions and in various sizes. In total the collections consists of well over 11k icons in SVG format.
1313
</p>
1414
<p>
1515
This <a href="https://www.nuget.org/packages/Microsoft.FluentUI.AspNetCore.Components.Icons" target="_blank">FluentUI Icons NuGet package</a>
16-
contains all these icons, which you can access directly in your projects.
17-
To use them, simply reference this package in your project.
16+
contains all these icons, which you can access directly in your projects. To use them, simply reference this package in your project.
17+
</p>
18+
<p>
19+
<div class="demopanel" style="margin: 1rem 0; padding: 1.5rem;">
20+
<h3>Important</h3>
21+
As of version 4.11.0 of our Icons package, we are packaging each icon variant (filled, outlined, regular, etc.) in its own assembly.
22+
This became necessary due to the large number of icons and some compiler limitations. Nothing has changed on how the Icons package needs to be installed or added to your project.
23+
There is a just a small change needed to your imports file (or using statements).
24+
<br />
25+
<br />
26+
<blockquote>
27+
To use the new version in your (upgraded) projects, you need add the following <code>&#64;using</code> statement to your _Imports.razor file:
28+
<CodeSnippet Language="csharp">&#64;using Icons = Microsoft.FluentUI.AspNetCore.Components.Icons</CodeSnippet>
29+
</blockquote>
30+
<br />
31+
Alternatively, you can use the full namespace in your code or define the alias for the namespace at the top of your file.
32+
<br />
33+
<br />
34+
When creating an application through one of the Fluent templates (v4.11.0 or higher), everything will already be correctly set up for you.
35+
36+
37+
</div>
1838
</p>
1939
<p>
2040
During the DotNet Publication process, the unused icons are automatically removed from the final library.
@@ -27,9 +47,9 @@
2747
</p>
2848

2949
<p>
30-
You can use any of these icons by levaraging the <code>&lt;FluentIcon&gt;</code>&nbsp;component. See below for the parameters and examples.
31-
There is also a search capability available on this page wich allows you to browse to all the different icons. At the moment the icons
32-
displayed in this explorer below are always using the default blue accent color. When using the icons in your application, they will render
50+
You can use any of these icons by levaraging the <code>&lt;FluentIcon&gt;</code>&nbsp;component. See below for the parameters and examples.
51+
There is also a search capability available on this page wich allows you to browse to all the different icons. At the moment the icons
52+
displayed in this explorer below are always using the default blue accent color. When using the icons in your application, they will render
3353
in the color set with the <code>Color</code> parameter.
3454
</p>
3555

@@ -78,15 +98,15 @@
7898
<br />
7999
<ul>
80100
<li>
81-
<FluentIcon Value="@(new MyCircle())" Width="16px" />
101+
<FluentIcon Value="@(new MyCircle())" Width="16px" />
82102
<code>&lt;FluentIcon Value="@@(new MyCircle())" Width="16px" /></code>
83103
</li>
84104
<li>
85-
<FluentIcon Value="@(new MyCircle().WithColor("red"))" Width="16px" />
105+
<FluentIcon Value="@(new MyCircle().WithColor("red"))" Width="16px" />
86106
<code>&lt;FluentIcon Value="@@(new MyCircle().WithColor("red"))" Width="16px" /></code>
87107
</li>
88108
<li>
89-
@(new MyCircle().ToMarkup("16px", "blue"))
109+
@(new MyCircle().ToMarkup("16px", "blue"))
90110
<code>@@new MyCircle().ToMarkup("16px", "blue")</code>
91111
</li>
92112
<li>
@@ -108,7 +128,7 @@
108128
// Default Color (`fill` style)
109129
WithColor("#F97316");
110130
}
111-
}</CodeSnippet>
131+
}</CodeSnippet>
112132
</p>
113133
<p>
114134
Using the <b>IconSize.Custom</b> size, certain restrictions will apply: <code>FluentButton.Loading</code> or <code>Icon.ToMarkup</code> could be affected.
@@ -118,8 +138,8 @@
118138

119139
<ApiDocumentation Component="typeof(FluentIcon<>)" InstanceTypes="@(new[] {typeof(Icon)})" GenericLabel="Icon">
120140
<Description>
121-
You can use either the <code>Icon</code> or <code>Value</code> parameter to specify the icon to render. The <code>Icon</code> parameter takes a
122-
<code>Icon</code> Type, while the <code>Value</code> parameter takes a icon object.
141+
You can use either the <code>Icon</code> or <code>Value</code> parameter to specify the icon to render. The <code>Icon</code> parameter takes a
142+
<code>Icon</code> Type, while the <code>Value</code> parameter takes a icon object.
123143
</Description>
124144
</ApiDocumentation>
125145

examples/Demo/Shared/wwwroot/docs/IconsAndEmoji.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ Icons and Emoji are provided through additional packages (except for the icons t
44
[Microsoft.FluentUI.AspNetCore.Components.Icons](https://www.nuget.org/packages/Microsoft.FluentUI.AspNetCore.Components.Icons) and/or
55
[Microsoft.FluentUI.AspNetCore.Components.Emoji](https://www.nuget.org/packages/Microsoft.FluentUI.AspNetCore.Components.Emoji) packages
66
is enough to make the resources available to your code.
7-
7+
88
We use the [.NET trimming capabilities](https://learn.microsoft.com/aspnet/core/blazor/host-and-deploy/configure-trimmer) to publish only those
9-
assests that are actually being used in your program. Usually this results in some very small DLL's that only contain the resources that are
10-
actually being used in your application.
9+
assests that are actually being used in your program. Usually this results in only some very small DLL's in your application files.
1110

1211
We support the **complete** [Fluent UI System Icons](https://github.com/microsoft/fluentui-system-icons) and
1312
[Fluent Emoji](https://github.com/microsoft/fluentui-emoji) collections.
@@ -33,6 +32,13 @@ dotnet add package Microsoft.FluentUI.AspNetCore.Components.Emojis
3332

3433
#### Using the `FluentIcon` component
3534

35+
**Important:** Starting with v4.11.0 you need to add the following <code>&#64;using</code> statement to your _Imports.razor file:
36+
37+
```
38+
@using Icons = Microsoft.FluentUI.AspNetCore.Components.Icons
39+
```
40+
41+
3642
> **Note:** Use the [Icon explorer](/Icon#explorer) to search through the entire collection of icons. You can easily copy a complete icon component
3743
instance from the explorer by clicking the clipboard in the results list.
3844

@@ -80,6 +86,12 @@ After adding the class, you can start using this custom icon like a "normal" Flu
8086
```
8187

8288
#### Using the `FluentEmoji` component
89+
**Important:** Starting with v4.11.0 you need to add the following <code>&#64;using</code> statement to your _Imports.razor file:
90+
91+
```
92+
@using Emoji = Microsoft.FluentUI.AspNetCore.Components.Emoji
93+
```
94+
8395
> **Note:** Use the [Emoji explorer](/Emoji#explore-emojis) to search through the entire collection of emoji. You can easily copy a complete emoji component
8496
instance from the explorer by clicking the clipboard in the results list.
8597

examples/Demo/Shared/wwwroot/docs/UpgradeGuide.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
## Breaking changes v4.11.0
2+
3+
As of version 4.11.0 of our Icons and Emoji packages, we are packaging each icon variant (filled, outlined, regular, etc.) and emoji category (animals, food, etc.) in its own assembly.
4+
This became necessary due to the large number of icons and some compiler limitations. Nothing has changed on how the packages need to be installed or added to your project.
5+
6+
There is a just a small change needed to your imports file (or using statements).
7+
8+
To use the new versions in your (upgraded) projects, you need add the following <code>&#64;using</code> statement to your _Imports.razor file:
9+
10+
```
11+
@using Icons = Microsoft.FluentUI.AspNetCore.Components.Icons
12+
@* add line below only if you are using the Emoji package *@
13+
@using Emoji = Microsoft.FluentUI.AspNetCore.Components.Emoji
14+
```
15+
16+
Alternatively, you can use the full namespace(s) in your code or define the alias(es) for the namespace(s) at the top of your file(s).
17+
18+
When creating an application through one of the Fluent templates (v4.11.0 or higher), everything with regards to the icons will already be correctly set up for you.
19+
The templates do not use emoji so you'll need to make the necessary change yourself after addin the Emoji package.
20+
21+
22+
123
## Breaking changes v4.8.0
224

325
The `Option<TType>`-type is a utility class that can be used to define list of options that are presented in a `FluentSelect` or any of the other list components. We have [examples of showing how this work](https://www.fluentui-blazor.net/Select#fromalistofoptiontit) available on the demo site.

0 commit comments

Comments
 (0)