fluentui-blazor icon indicating copy to clipboard operation
fluentui-blazor copied to clipboard

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

Open davte-beijer opened this issue 1 year ago • 1 comments

🙋 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

  • Microsoft.FluentUI.AspNetCore.Components
  • Microsoft.FluentUI.AspNetCore.Components.Abstractions.

🔦 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.

davte-beijer avatar Feb 09 '24 06:02 davte-beijer

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.

dvoituron avatar Feb 09 '24 08:02 dvoituron