AnnaSasDev
Extending a razor component so I can make developer experience a bit easier
Have eventually "figured out" a solution that I wanted, though Im still debating the fact if this is the best approach in the long run.
Made a small manual cli tool, instead of a Roslyn Incremental Generator, that parses the svg files from
lucide-static
into individual razor files, which follow the naming convention of Li{lucideName.ToPascalCase()}
(pseudo).
Ive also made the option to resolve the icon the old way, through a simple inject ILucideService
so you can now have two options. This service works by using an underlying dictionary with lazy loaded values, which is populated by a Roslyn Incremental Generator
meaning hat I can use an Icon in two ways:
For anyone wondering, the full package's code is here: (constructive feedback is always appreciated):
https://github.com/InfiniLore/lucide.blazor4 replies
Extending a razor component so I can make developer experience a bit easier
But the only way Ive been able to make this work is by doing the following (work in progress testing):
which then results in the following workaround.
Because razor files are already brought dozn to C# through a roslyn generator, Im unsure if I could build something like I envisioned with the
<LucideIcon.Signature/>
idea4 replies
Issue with Github Actions when using Node & Dotnet together
Issue is resolved
The issue could be traced back to IncrementalGeneratorInitializationContextExtensions.SelectLucideSvgFiles where we were checking if a filepath matches a regex (why of all reasons I did this, ill never remember) and the age old / vs \ paths caused the issue.
Changed it to a simpler FileEndsWith() and thus the issue is resolved
2 replies
Issue with configuring Auth0 and the "Allowed Callback url"
from as far as I can understand their docs, I think the callback is the OIDC
redirect_uri
, which I can't override myself as far as I understand
I eventually got a beginning to the functionality that I wanted by using the OnAuthenticationStateChanged
from PersistingRevalidatingAuthenticationStateProvider
https://github.com/InfiniLore/infinilore.cs/blob/6acef6a31869d16fbb9063c3ac3a0a6d15f96847/src/InfiniLore.Server.Services/AuthenticationStateSyncer/PersistingRevalidatingAuthenticationStateProvider.cs#L63
Which I can then at a later point use to create a command which creates a user for my database
I just feel frustrated because this feels like such a convoluted workaround to get to the functionality that I want13 replies
Roslyn not finding a referenced package
I haven't created a new latest nuget package for
AterraEngine.Unions.Generators
yet as the code isn't working. Within the project there is a Sample project AterraEngine.Unions.Generators.Sample
which when I try and build outputs:
AterraEngine.Unions.Generators
is on the latest uploaded version of CodeOfChaos.GeneratorTools
which is 1.1.0
8 replies