microsoft / fluentui-blazor

Microsoft Fluent UI Blazor components library. For use with ASP.NET Core Blazor applications
https://www.fluentui-blazor.net
MIT License
3.74k stars 361 forks source link

feat: Add IToastService, IMesssageService, IDialogService to a new library Microsoft.FluentUI.AspNetCore.Components.Abstractions #1484

Open davte-beijer opened 7 months ago

davte-beijer commented 7 months ago

🙋 Feature Request

I would like to use the following services: IToastService, IMesssageService, IDialogService without having to have a reference to the full Microsoft.FluentUI.AspNetCore.Components package, instead I would like to use something like Microsoft.FluentUI.AspNetCore.Components.Abstractions.

This would allows me to e.g. inject these services view models that are not in the same project as my Blazor UI code.

💁 Possible Solution

Microsoft.FluentUI.AspNetCore.Components package is separated into

🔦 Context

If doing MVVM together with fluent-ui blazor, the simplest workaround is to put all view models inside razor.class lib or wherever the UI blazor components exists, however idealy I would prefer a finer level on granularity and separation between my view models and UI code.

dvoituron commented 7 months ago

This is indeed an improvement that could be useful in certain cases, like the one you're presenting. It's not currently planned, but we can analyze it and put it in the backlog of a future major release.