Skip to content

Commit

Permalink
Prep release 3.2.1 (#883)
Browse files Browse the repository at this point in the history
* fix: chinese abbreviated day name in FluentCalendar (#834)
* Minor documentation corrections (#837)
* Fix #836
* fix NavMenuLink width
* Rename solution file
* FluentMenu: move overlay into anchored section code
* Update version on index page
* Update Menu example
* Add some (😉) more tests
* [Unit Tests] Add Unit Tests in .razor files (#844)
* Fix gitignore
* Add FluentBadgeTests.razor
* Fix #845 Exception with NavMenuLink
* Fix #841 (#842)
* Hide collapse button on demo site menu and remove some commented code
* Fix #851
* Fix #852
* Update Fluent UI System Icons to 1.1.220 (#854)
* Small ToC script optimization
* Use latest SDKs
* Make demos better when opening in light/dark mode
* Fix initial theme switch setting
* Fix: Add '@' to keyframe for fade-out animation (#855)
* MessageBar: fix fadein effect
* [Accessibility] Fix some FluentButton and FluentNav aria attributes (#853)
* Fix FluentButton aria-label based on Title
* Fix NavMenu aria
* Fix Button Titles
* Fix unit Tests
* Add examples and documentation for the Persona component. (#843)
* Fix the Persona samples to use "@DataSource.SamplePicture" instead of using external resources.
* [Autocomplete] Update some Accessibility issues (#866)
* Update Autocomplete Accessibility items
* Fix Enter key when popup is closed
* Update Previous and Next titles (and Unit Tests)
* [FluentGrid] Add FluentGridItem with no breakpoints (#862)
* Add FluentGridItem with no breakpoints
* Update FluentValidationSummary.razor
* Fix #865
* docs: Update sample InputFileDefault.razor (#867)
* Update InputFileDefault.razor
* Update InputFileByCode.razor
* Update the documentation: inverse Api and Example sections
* fix: Implement DesignToken.WithDefault and use in Demo site (#869)
* Add 'System' option to theme settings
* Fix aria-orientation (#877)
* Fix #861 and also fix rendering in case of manual grid (#874)
* Fix security scanning workflow
* Add @ref to some layout components and adjust css of those to use css vars for font properties
* Update WhatsNew
* Update docs
  • Loading branch information
vnbaaij committed Oct 23, 2023
1 parent 9671e54 commit 1899238
Show file tree
Hide file tree
Showing 324 changed files with 4,772 additions and 1,008 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- if: matrix.language == 'csharp'
name: Manually build CSharp on .NET
run: |
dotnet build Microsoft.Fast.sln
dotnet build Microsoft.FluentUI.sln
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ FodyWeavers.xsd

# Verify Test generated Files
*.received.html
*.received.razor.html

# Specific files, typically generated by tools
*.cobertura.xml
Expand Down
48 changes: 27 additions & 21 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
<Project>
<PropertyGroup>
<Authors>Microsoft</Authors>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<NeutralLanguage>en</NeutralLanguage>
<Owners>Microsoft Corporation</Owners>
<PackageProjectUrl>https://github.com/microsoft/fluentui-blazor</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/microsoft/fluentui-blazor</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PropertyGroup>
<Authors>Microsoft</Authors>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<NeutralLanguage>en</NeutralLanguage>
<Owners>Microsoft Corporation</Owners>
<PackageProjectUrl>https://github.com/microsoft/fluentui-blazor</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/microsoft/fluentui-blazor</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>

<SolutionDir>$(MSBuildThisFileDirectory)</SolutionDir>

<VersionFile>3.2.0</VersionFile>
<VersionPrefix>3.2.0</VersionPrefix>
<VersionSuffix></VersionSuffix>

<AssemblyVersion>$(VersionFile)</AssemblyVersion>
<FileVersion>$(VersionFile)</FileVersion>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<Version>$(VersionPrefix)$(VersionSuffix)</Version>
</PropertyGroup>
<SolutionDir>$(MSBuildThisFileDirectory)</SolutionDir>

<VersionFile>3.2.1</VersionFile>
<VersionPrefix>3.2.1</VersionPrefix>
<VersionSuffix></VersionSuffix>

<AssemblyVersion>$(VersionFile)</AssemblyVersion>
<FileVersion>$(VersionFile)</FileVersion>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<Version>$(VersionPrefix)$(VersionSuffix)</Version>
</PropertyGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Microsoft.Fast.Components.FluentUI.Tests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Project>
File renamed without changes.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ To make it easier to start a project that uses the Fluent UI Blazor components o
[Microsoft.Fast.Templates.FluentUI](https://www.nuget.org/packages/Microsoft.Fast.Templates.FluentUI/) template package.

The package contains templates for creating Blazor Server and/or Blazor WebAssembly apps that mimic the regular Blazor
templates. The library is already set up (and all the Bootstrap styling removed). All components fromthe regular template have been
templates. The library is already set up (and all the Bootstrap styling removed). All components from the regular template have been
replaced with Fluent UI Blazor counterparts (and a few extra have been added). Please see the [documentation page](https://www.fluentui-blazor.net/Templates)
for more information.

Expand Down Expand Up @@ -125,7 +125,7 @@ maintaining accessibility. This is accomplished through setting various "design
## Blazor Hybrid
You can use this library in Blazor Hybrid (MAUI/WPF/Windows Forms) projects. Setup is almost the same as described in the "Getting started" section above, but to get everything to work you'll need to take some extra steps (for now):

1. You need to make some changes in your `{Type}Program.cs` file
1. You need to make some changes in your `{Type}Program.cs` file.
Make sure the following is added before the `return builder.Build()` line:
```csharp
builder.Services.AddFluentUIComponents(options =>
Expand All @@ -134,11 +134,9 @@ builder.Services.AddFluentUIComponents(options =>
});
```

### Tempory workaround for MAUI/WPF/Windows Forms issues
### Temporary workaround for MAUI/WPF/Windows Forms issues
Currently when using the WebView to run Blazor (so all Hybrid variants) the web-components script is not imported automatically (see [#404](https://github.com/microsoft/fluentui-blazor/issues/404).
There is also an isue with loading the custom event handlers that are being configured by the web-components script. Until these are fixed on the WebView side, there is
a workaround available, namely to intercept '_framework/blazor.modules.json' and provide proper JS initializers file (created by build). The needed `initializersLoader.webview.js` has
been added to the library and needs to be included with a script tag **before** the `_framework/blazor.webview.js` script tag:
There is also an issue with loading the custom event handlers that are being configured by the web-components script. Until these are fixed on the WebView side, there is a workaround available, namely to intercept `'_framework/blazor.modules.json'` and provide proper JS initializers file (created by build). The needed `initializersLoader.webview.js` has been added to the library and needs to be included with a script tag **before** the `_framework/blazor.webview.js` script tag:

```xml
<script app-name="{NAME OF YOUR APP}" src="./_content/Microsoft.Fast.Components.FluentUI/js/initializersLoader.webview.js"></script>
Expand All @@ -151,8 +149,7 @@ initializersLoader replaces standard `fetch` function with one which provides th
For more information regarding the bug, see issue [15234](https://github.com/dotnet/maui/issues/15234) in the MAUI repo.

## Use the DataGrid component with EF Core
If you want to use the `<FluentDataGrid>` with data provided through EF Core, you need to install
an additional package so the grid knows how to resolve queries asynchronously for efficiency. .
If you want to use the `<FluentDataGrid>` with data provided through EF Core, you need to install an additional package so the grid knows how to resolve queries asynchronously for efficiency. .

### Installation
Install the package by running the command:
Expand All @@ -161,7 +158,7 @@ dotnet add package Microsoft.Fast.Components.FluentUI.DataGrid.EntityFrameworkAd
```

### Usage
In your Program.cs file you need to add the following after the `builder.Services.AddFluentUIComponents(...);` lines:
In your `Program.cs` file, you need to add the following after the `builder.Services.AddFluentUIComponents(...);` lines:
```csharp
builder.Services.AddDataGridEntityFrameworkAdapter();
```
Expand Down
58 changes: 55 additions & 3 deletions WHATSNEW.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,62 @@
## V3.2.0
## V3.2.1
- Design Tokens WithDefault method implemented to allow setting a default value for a token. This is technically a breaking chage, but it is unlikely to affect anyone as the previous implementation did not do anything. See the `SiteSettingsPanel.razor.cs` in the demo site for an implementation example.
- Fix [#872](https://github.com/microsoft/fluentui-blazor/issues/872): A11y issue in FluentDivider
- Fix [#864](https://github.com/microsoft/fluentui-blazor/issues/864): A11y issue in FluentAutoComplete
- Fix [#861](https://github.com/microsoft/fluentui-blazor/issues/861): A11y issue in FluentDataGrid EmptyContent
- Fix [#848](https://github.com/microsoft/fluentui-blazor/issues/848): A11y issue in FluentDialogHeader
- Fix [#847](https://github.com/microsoft/fluentui-blazor/issues/847): A11y issues in FluentNavMenu
- Fix [#861](https://github.com/microsoft/fluentui-blazor/issues/861): A11y issue in FluentDataGrid EmptyContent
- Fix [#859](https://github.com/microsoft/fluentui-blazor/issues/859): Fix FluentNavMenuGroup not clickable ouside of <a> tag
- Fix [#857](https://github.com/microsoft/fluentui-blazor/issues/857): Fix copy Emoji code in search page
- Fix [#841](https://github.com/microsoft/fluentui-blazor/issues/841): Overflow causes loss of background with Panel
- Fix [#833](https://github.com/microsoft/fluentui-blazor/issues/833): Use correct abbreviation for day name in FluentCalendar (Chinese)
- Miscelaneous documentation and typo fixes
- Add more unit tests
- Update to FluentUI System Icons 1.1.220

- **What's new (Name / Size(s) / Variant(s))**
- Arrow Download / 28, 32 / Filled & Regular
- Arrow Expand / 16 / Filled & Regular
- Arrow Export Up / 16 / Filled & Regular
- Arrow Import / 16 / Filled & Regular
- Arrow Up Right Dashes / 16 / Filled & Regular
- Battery 10 / 16 / Filled & Regular
- Beaker Empty / 16 / Filled & Regular
- Book / 16 / Filled & Regular
- Border None / 16 / Filled & Regular
- Branch Request / 16 / Filled & Regular
- Clipboard Task List / 16 / Filled & Regular
- Cut / 16 / Filled & Regular
- Folder Search / 16, 20, 24 / Filled & Regular
- Hexagon / 28, 32, 48 / Filled & Regular
- Plug Connected / 16 / Filled & Regular
- Plug Disconnected / 16 / Filled & Regular
- Projection Screen Text / 20 / Filled & Regular
- RSS / 16 / Filled & Regular
- Shape Organic / 16, 20, 24, 28, 32, 48 / Filled & Regular
- Teardrop Bottom Right / 16, 20, 24, 28, 32, 48 / Filled & Regular
- Text Asterisk / 16 / Filled & Regular
- Text Edit Style / 16 / Filled & Regular
- Text Whole Word / 16 / Filled & Regular
- Triangle / 24, 28 / Filled & Regular

**What's updated (Name / Size(s) / Variant(s))**
- Arrow Bidirectional Left Right / 16 / Filled & Regular
- Arrow Download / 24, 48 / Filled & Regular
- Beaker Edit / 20 / Filled & Regular
- Beaker Off / 20 / Filled & Regular
- Beaker Settings / 20 / Filled & Regular
- Clipboard Letter / 24 / Filled & Regular
- Prohibited / 16, 24, 28, 48 / Filled & Regular


## V3.2.0
- New NavMenu, NavGroup and NavLink components. **Breaking change** - See the [Upgrade guide](https://www.fluentui-blazor.net/UpgradeGuide) for details. See [NavMenu](https://www.fluentui-blazor.net/NavMenu) page for examples.
- New FluentInputLabel component.
- New FluentInputLabel component.
- FluentCard: Add AreaRestricted parameter to allow content to break out of card area.
- Provide error message when FluentDialogProvider missing
- It is now possible to add a tooltip to DataGridColumns

Fix [#796](https://github.com/microsoft/fluentui-blazor/pull/796): Fix IconColor doc page
Fix [#797](https://github.com/microsoft/fluentui-blazor/pull/797): Fix MessageBar issues
Fix [#805](https://github.com/microsoft/fluentui-blazor/pull/805): InlineStyleBuilder on .NET6
Expand Down
16 changes: 10 additions & 6 deletions examples/Demo/Client/FluentUI.Demo.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.22" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.22" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.23" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.23" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net7.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.11" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.12" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.12" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0-rc.1.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0-rc.1.*" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0-rc.2.*" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<None Include="wwwroot\js\site.js" />
</ItemGroup>

<ItemGroup>
Expand Down
48 changes: 39 additions & 9 deletions examples/Demo/Client/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,36 @@
<title>FluentUI.Demo.Client</title>
<base href="/" />
<link href="_content/FluentUI.Demo.Shared/css/site.css" rel="stylesheet" />
<style>
:root {
--neutral-fill-layer-rest: #ffffff;
color: #000000;
}

.loading-progress-text {
color: #000000;
}

@media(prefers-color-scheme: dark) {
:root {
--neutral-fill-layer-rest: #464646;
color: #ffffff;
}

.loading-progress-text {
color: #ffffff;
}
}

body,
#container {
font: 14px "Segoe UI Variable", "Segoe UI", sans-serif;
color: var(--neutral-base-color);
background-color: var(--neutral-fill-layer-rest);
}
</style>
<link href="FluentUI.Demo.Client.styles.css" rel="stylesheet" />

<!-- Monaco editor -->
<link rel="stylesheet" data-name="vs/editor/editor.main" href="_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs/editor/editor.main.min.css">

Expand All @@ -18,17 +46,17 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlightjs-copy@1.0.3/dist/highlightjs-copy.min.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VML6BZWWTC"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());

gtag('config', 'G-VML6BZWWTC');
gtag('config', 'G-VML6BZWWTC');
</script>
<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
(function (c, l, a, r, i, t, y) {
c[a] = c[a] || function () { (c[a].q = c[a].q || []).push(arguments) };
t = l.createElement(r); t.async = 1; t.src = "https://www.clarity.ms/tag/" + i;
y = l.getElementsByTagName(r)[0]; y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "hnr14wvzj8");
</script>
</head>
Expand All @@ -48,6 +76,8 @@
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.webassembly.js"></script>
<script src="js/site.js"></script>
<script src="_content/FluentUI.Demo.Shared/js/theme.js" type="module"></script>

<!-- Monaco Editor -->
<script src="_content/Microsoft.Fast.Components.FluentUI/lib/monaco-editor/min/vs/loader.min.js"></script>
Expand Down
Empty file.
14 changes: 14 additions & 0 deletions examples/Demo/Server/Pages/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="~/" />
<style>
:root {
--neutral-fill-layer-rest: #ffffff;
color: #000000;
}
@@media(prefers-color-scheme: dark) {
:root {
--neutral-fill-layer-rest: #464646;
color: #ffffff;
}
}
</style>
<link href="_content/FluentUI.Demo.Shared/css/site.css" rel="stylesheet" />
<link href="FluentUI.Demo.Server.styles.css" rel="stylesheet" />

Expand Down Expand Up @@ -42,6 +55,7 @@

<script src="_framework/blazor.server.js"></script>
<script src="js/site.js"></script>
<script src="_content/FluentUI.Demo.Shared/js/theme.js" type="module"></script>


<!-- Monaco Editor -->
Expand Down
4 changes: 2 additions & 2 deletions examples/Demo/Server/wwwroot/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// the before-started CSS class. Here we'll find the first web component
// and wait for it to be upgraded. When it is, we'll remove that class
// from the body.
console.log('site.js');

const firstUndefinedElement = document.body.querySelector(":not(:defined)");

if (firstUndefinedElement) {
customElements.whenDefined(firstUndefinedElement.localName).then(() => {
document.body.classList.remove("before-started");
});
}
}
2 changes: 1 addition & 1 deletion examples/Demo/Shared/Components/ApiDocumentation.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@if (Component.BaseType != null && Component.BaseType != typeof(FluentComponentBase) && Component.BaseType.Name.StartsWith("Fluent"))
{
<p>
Inherits from <a href="/@Component.BaseType.Name">@Component.BaseType.Name.Replace("`1", $"<{GenericLabel}>").Replace("`2", $"<{GenericLabel}>")</a>. <br />
Inherits from <a href="/@Component.BaseType.Name.Replace("`1", "").Replace("`2", "")">@Component.BaseType.Name.Replace("`1", $"<{GenericLabel}>").Replace("`2", $"<{GenericLabel}>")</a>. <br />
<em>There might be parameters and/or methods shown here that are inherited from the component's base type but are not applicable to this component.</em>
</p>
}
Expand Down
2 changes: 1 addition & 1 deletion examples/Demo/Shared/Components/NotificationCenter.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@inject IDialogService DialogService
@inject IMessageService MessageService

<FluentButton BackgroundColor="var(--neutral-layer-4)" OnClick="OpenNotificationCenterAsync">
<FluentButton BackgroundColor="var(--neutral-layer-4)" OnClick="OpenNotificationCenterAsync" Title="Notification center">
@if (MessageService.Count(App.MESSAGES_NOTIFICATION_CENTER) > 0)
{
<FluentCounterBadge Count="@MessageService.Count(App.MESSAGES_NOTIFICATION_CENTER)"
Expand Down
2 changes: 1 addition & 1 deletion examples/Demo/Shared/Components/SiteSettings.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@inject IDialogService DialogService

<FluentButton BackgroundColor="var(--neutral-layer-4)" OnClick="OpenSiteSettingsAsync">
<FluentButton BackgroundColor="var(--neutral-layer-4)" OnClick="OpenSiteSettingsAsync" Title="Site settings">
<FluentIcon Icon="Icons.Regular.Size20.Settings" Color="Color.Neutral" Title="Site settings" />
</FluentButton>
16 changes: 8 additions & 8 deletions examples/Demo/Shared/Components/SiteSettingsPanel.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
TOption="OfficeColor"
Position="SelectPosition.Below"
@bind-SelectedOption="@_selectedColorOption"
@onchange="@(x => HandleColorChange(x))"
@onchange="@(x => UpdateColorAsync(x))"
aria-label="Accent color selector" />
</div>

<FluentSwitch @bind-Value="@_inDarkMode" title="Switch theme" AfterBindValue="UpdateTheme">
<span class="label">Theme</span>
<span slot="unchecked-message">Light</span>
<span slot="checked-message">Dark</span>
</FluentSwitch>
<FluentSwitch @bind-Value="@_rtl" title="Switch direction" AfterBindValue="UpdateDirection">
<FluentRadioGroup TValue="string" Label="Theme" @bind-Value="@_currentTheme" AfterBindValue="UpdateThemeAsync" Orientation="Orientation.Vertical">
<FluentRadio Value="@ThemeSettingSystem">System</FluentRadio>
<FluentRadio Value="@ThemeSettingLight">Light</FluentRadio>
<FluentRadio Value="@ThemeSettingDark">Dark</FluentRadio>
</FluentRadioGroup>

<FluentSwitch @bind-Value="@_rtl" title="Switch direction" AfterBindValue="UpdateDirectionAsync">
<span>Direction</span>
<span slot="unchecked-message">LTR</span>
<span slot="checked-message">RTL</span>
Expand Down
Loading

0 comments on commit 1899238

Please sign in to comment.