Skip to content

Commit

Permalink
fix(fluentui): apply migration changes for FluentUI v3
Browse files Browse the repository at this point in the history
replaces #166
  • Loading branch information
amis92 committed Oct 18, 2023
1 parent f366038 commit 44b41d3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 19 deletions.
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<PackageVersion Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
<PackageVersion Include="Microsoft.Fast.Components.FluentUI" Version="3.2.0" />
<PackageVersion Include="Microsoft.Fast.Components.FluentUI.Icons" Version="3.1.1" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NuGet.Versioning" Version="6.7.0" />
<PackageVersion Include="PublishSPAforGitHubPages.Build" Version="2.1.0" />
Expand Down
6 changes: 3 additions & 3 deletions src/Phalanx.App/Pages/Management/GalleryItem.razor
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
span.local-version only shows if the repo is loaded into memory
*@
<FluentButton class="mx-1 mb-1" @onclick="HydrateCat" Disabled="HasFiles">
<FluentIcon Name="@FluentIcons.Save" Slot="start" Filled="true" Size="@IconSize.Size16" />
<FluentIcon Icon="@(Icons.Filled.Size16.Save)" Slot="start" />
Pull
</FluentButton>
<FluentButton class="mx-1 mb-1" Disabled="true">
<FluentIcon Name="@FluentIcons.ArrowUp" Slot="start" Size="IconSize.Size16" Filled=true />
<FluentIcon Icon="@(Icons.Filled.Size16.ArrowUp)" Slot="start" />
Update
</FluentButton>
<FluentButton class="mx-1 mb-1" Disabled="!HasFiles">
<FluentIcon Name="@FluentIcons.Delete" Slot="start" Filled="true" Size="@IconSize.Size16" />
<FluentIcon Icon="@(Icons.Filled.Size16.Delete)" Slot="start" />
Remove
</FluentButton>
</div>
Expand Down
15 changes: 6 additions & 9 deletions src/Phalanx.App/Pages/RosterEdit.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,17 @@
<TitlePart>@roster.Name</TitlePart>
<CascadingValue Value="@Editor">
<FluentTabs>
<FluentTab>Edit</FluentTab>
<FluentTabPanel>
<FluentTab Label="Edit">
<RootRosterEdit />
</FluentTabPanel>
<FluentTab>Options</FluentTab>
<FluentTabPanel>
</FluentTab>
<FluentTab Label="Options">
<RosterOptions />
</FluentTabPanel>
<FluentTab>Preview</FluentTab>
<FluentTabPanel>
</FluentTab>
<FluentTab Label="Preview">
<FluentSelect Items=formatter.Formats @bind-SelectedOption=@Format OptionText="@(x => x.Name)" />

<Phalanx.App.Pages.Printing.RosterPreviewer RosterNode=roster Format=Format />
</FluentTabPanel>
</FluentTab>
</FluentTabs>
</CascadingValue>
}
Expand Down
10 changes: 4 additions & 6 deletions src/Phalanx.App/Pages/RosterPrinter.razor
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@
{
var formattedOutput = RosterFormatter.Format(RosterNode, selectedFormat);
<FluentTabs class="output-tabs">
<FluentTab>Preview</FluentTab>
<FluentTabPanel slot="tabpanel">
<FluentTab Label="Preview">
<RosterPreviewer RosterNode="RosterNode" Format="selectedFormat" />
</FluentTabPanel>
<FluentTab>Raw text</FluentTab>
<FluentTabPanel slot="tabpanel">
</FluentTab>
<FluentTab Label="Raw text">
<pre>@formattedOutput</pre>
</FluentTabPanel>
</FluentTab>
</FluentTabs>
}
</FluentCard>
Expand Down
1 change: 1 addition & 0 deletions src/Phalanx.App/Phalanx.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<PackageReference Include="Microsoft.Extensions.Options" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" />
<PackageReference Include="Microsoft.Fast.Components.FluentUI" />
<PackageReference Include="Microsoft.Fast.Components.FluentUI.Icons" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NuGet.Versioning" />
<PackageReference Include="PublishSPAforGitHubPages.Build" />
Expand Down
2 changes: 1 addition & 1 deletion src/Phalanx.App/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
builder.Services.AddSingleton<GalleryBrowserState>();

builder.Services.AddScoped<GalleryHttpClient>();
builder.Services.AddFluentUIComponents();
builder.Services.AddFluentUIComponents(options => options.HostingModel = BlazorHostingModel.WebAssembly);

await builder.Build().RunAsync();

0 comments on commit 44b41d3

Please sign in to comment.