Open kmelmon opened 4 years ago
Omar says: "we need to figure out how to generate SVG elements at runtime in the new version" This will need to be taken into consideration - we'll need a way to generate SVG. Currently we do this in code.
Omar says:
There were a couple of reasons we were using C# directly: • Blazor was still highly experimental, and didn't provide any type safety or debuggability for the code, so iterating and fixing issues then on anything that is not a "CRUD" form was increasingly difficult as I was working on the editor. Using C# directly was much more productive (although more verbose). • We generate UI (SVG) elements at runtime based on the code we are executing. That was not possible in the older version to do from templates, maybe something has changed since? Upgrading to the new Blazor version is a great goal, it would also enable non-Windows developers to contribute to the project. The existing UI code is simple, and I don't expect it to be a lot of work to switch to templates, but we need to figure out how to generate SVG elements at runtime in the new version.
Daniel says: Ah, yeah, we do still have a number of known issues when working with SVG content in Razor. Some stuff does work, but there are rough edges that you may still run into. @Steve Sanderson What would you recommend here? Should they give it a try with the latest bits and we’ll see what we can do to help them workaround any SVG issues that come up?
@Keith Melmon Instead of starting with Blazor WebAssembly 3.2, I actually think you should go ahead and start working with Blazor WebAssembly in .NET 5 RC2. .NET 5 will release in about two weeks, and the RC2 bits are really close to the final version.
Steve says:
=> What would you recommend here? Should they give it a try with the latest bits and we’ll see what we can do to help them workaround any SVG issues that come up?
Yes. The known SVG issues are more to do with runtime issues, not compile-time ones. So I would not expect that the use of .razor vs .cs would make any difference to those issues. However it’s possible I’m missing something subtle.
When investigating https://github.com/sb/smallbasic-editor/issues/165, I asked for some help from Daniel Roth (Blazor guy from DevDiv), who said this:
"It looks like most of the components in this project are written directly in C# instead of using Razor. That complicates things a bit, because we didn’t bother to document many of the API changes in the render tree builder in the various preview releases."
We should consider converting the C# tree builders to .razor files as it will keep us more inline with the docs/samples/guidance.