BlazorExtensions / BlazorOfficeUIFabric

Microsoft Office Fabric UI port for Blazor
MIT License
48 stars 14 forks source link

Limitations of this approach #4

Open limefrogyank opened 5 years ago

limefrogyank commented 5 years ago

After playing around with your port of Fabric, I'm having trouble getting around one big problem with server-side blazor.

With server-side Blazor, you currently have to wait until after the first render for javascript interop to be available. As this library depends heavily on javascript since we are adding stylesheets via `, all of the controls show up in their unstyled state for a small amount of time before being transformed to their Fabric styles. It's pretty ugly.

It seems it might be a good idea to go without Javascript (as much as possible). I've tried an approach where I create a FabricStyle component that you stick somewhere near the root component. All it does is contain a <style></style> tag and watches an IObservable that outputs the latest set of css rules. It seems to work ok.

I don't have a solution for RTL or browser-specific prefixes yet though.

galvesribeiro commented 5 years ago

Good idea. I'm out on vacation returning by the end of the month. Please expect an update on that earlier next month.