Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 15 15:18

    dependabot-preview[bot] on nuget

    (compare)

  • Oct 15 15:18

    rockfordlhotka on master

    Bump RabbitMQ.Client from 5.1.1… Merge pull request #1380 from M… (compare)

  • Oct 15 15:18
    rockfordlhotka closed #1380
  • Oct 15 00:35
    dependabot-preview[bot] labeled #1380
  • Oct 15 00:35
    dependabot-preview[bot] opened #1380
  • Oct 15 00:35

    dependabot-preview[bot] on nuget

    Bump RabbitMQ.Client from 5.1.1… (compare)

  • Oct 15 00:13
    rockfordlhotka commented #821
  • Oct 14 23:48
    tabaguley commented #821
  • Oct 14 22:24
    rockfordlhotka commented #821
  • Oct 14 19:49
    tabaguley commented #821
  • Oct 13 23:14
    rockfordlhotka closed #1295
  • Oct 13 23:14
    rockfordlhotka commented #1379
  • Oct 13 23:13

    rockfordlhotka on master

    #1295 Initial trial implementat… Merge branch 'master' of https:… Merge branch 'master' of https:… and 3 more (compare)

  • Oct 13 23:13
    rockfordlhotka closed #1306
  • Oct 13 23:13
    rockfordlhotka labeled #1379
  • Oct 13 23:13
    rockfordlhotka labeled #1379
  • Oct 13 23:12
    rockfordlhotka assigned #1379
  • Oct 13 23:11
    rockfordlhotka commented #809
  • Oct 13 22:09
    cslalearner commented #809
  • Oct 13 18:43
    TheCakeMonster opened #1379
TheCakeMonster
@TheCakeMonster
For determining whether client-side or server-side, I can see a couple of options. Firstly, the hosts are very different types, but I think you'd have to test their type as a string, as you won't want to reference the assemblies in which their types are registered I wouldn't think
String tests like this are fragile, so that's probably out
The other option might be to test if IHttpContextAccessor is registered with DI; I see that this isn't registered for client-side
It's tempting to create a type that implements it, so that you can still use HttpContext's User property on the client side, but I guess this isn't playing nicely, because other people's code might break if they are using the same trick
TheCakeMonster
@TheCakeMonster
IHttpContextAccessor is implemented in Microsoft.AspNetCore.Http.Abstractions, so you'd have to add a reference to that to be able to do the test, which is not ideal
Rockford Lhotka
@rockfordlhotka
Yeah, I don't want to break others' code.
Could try to load the IHttpContextAccessor type by name, but then we're back to a string
One that's unlikely to change though, so pretty safe
Rockford Lhotka
@rockfordlhotka
For binding, the other primary model we've used over recent years is the PropertyInfo control. It is perfect for XAML.
In the UnoExample app is the latest iteration, which I may backport to WPF too
I don't know if that model applies to Blazor or not. It relies on controls binding to other controls
Rockford Lhotka
@rockfordlhotka
@TheCakeMonster thank you for the PR - looks good - though I had some questions that I put in the PR as a review.
TheCakeMonster
@TheCakeMonster
@rockfordlhotka thanks for the feedback; I'll look into your points when I can. Pressure of work may mean it's a few days away. Worst case it'll be next weekend
Rockford Lhotka
@rockfordlhotka
OK, I think I'll move forward with the PR and we can address anything later.
Rockford Lhotka
@rockfordlhotka
Thank you for the PR @TheCakeMonster !
TheCakeMonster
@TheCakeMonster
@rockfordlhotka thanks, and you're very welcome. Nice to give back for once after so many years of benefit from CSLA - even if it is such a small enhancement
I can see more to do; extending editing to handling different severities should be on my list, now that you've pointed it out
Rockford Lhotka
@rockfordlhotka
Just pushed what is likely to be the final prerelease of CSLA 5 to NuGet.
.NET Core 3 is still on track for a Sept 23 release, and I expect to release CSLA 5 immediately after - very likely on Sept 24 (or maybe the evening of Sept 23).
Rockford Lhotka
@rockfordlhotka

Btw, if you haven't reviewed the release notes lately, it is impressive just how much cool stuff is coming in CSLA 5!

https://github.com/MarimerLLC/csla/blob/master/releasenotes.md

TheCakeMonster
@TheCakeMonster
Congrats on new release of CSLA 5 to all who contributed. I'm already using it for sample Blazor apps; very exciting!
Rockford Lhotka
@rockfordlhotka
Nice!
TheCakeMonster
@TheCakeMonster
@rockfordlhotka could you possibly slow down innovation in CSLA so that Microsoft could catch up on version numbers? Hehehe
Don't people get strangely obsessed with a number? Sigh.
Rockford Lhotka
@rockfordlhotka
This is a consequence of switching to semver
Rockford Lhotka
@rockfordlhotka
@TheCakeMonster one thing that I've been wondering, is how does something like asp-validation-for get implemented? That's a property in a span tag, but obviously it is something that is implemented such that the Razor rendering engine invokes some code to generate HTML output.
It might be quite interesting to have a csla-errortext-for and csla-warningtext-for and csla-informationtext-for that works in a similar manner.
Rockford Lhotka
@rockfordlhotka
Yeah, this now works
        <span csla-errors-for="Item.Name" class="text-danger"></span>
        <span csla-warnings-for="Item.Name" class="text-warning"></span>
        <span csla-information-for="Item.Name" class="text-info"></span>
TheCakeMonster
@TheCakeMonster
Oh, interesting. I wasn't sure that helpers would work in Blazor.
This approach results in more markup than my component, and an outer wrapper is necessary in order to target with aria-describedBy for accessibility. Why do you find this attractive when it can be wrapped in a single component?
Rockford Lhotka
@rockfordlhotka
There sure could be a single tag helper that displays all three message severities - that'd be easy to do
The thing is, then the errors, warnings, and info would all have the same style right? So how would the component differentiate them?
I suppose it could be like
<span csla-validation-for="Item.Name" error-class="text-danger" warning-class="text-warning" information-class="text-info">
Is that what you are thinking?
Rockford Lhotka
@rockfordlhotka
Arg! Sadly I was premature - the tag helpers work great in Razor Pages, but I'm starting to suspect you are right - maybe tag helpers don't work in Blazor
Boo!!
That puts me back to the previous implementation, which isn't TOO bad imo...
            <span style="background-color:red;color:white">@vm.GetPropertyInfo(nameof(vm.Model.Name)).ErrorText</span>
            <span style="background-color:yellow;color:black">@vm.GetPropertyInfo(nameof(vm.Model.Name)).WarningText</span>
            <span style="background-color:blue;color:white">@vm.GetPropertyInfo(nameof(vm.Model.Name)).InformationText</span>
Rockford Lhotka
@rockfordlhotka
or better, using the pre-defined classes:
            <span class="text-danger">@vm.GetPropertyInfo(nameof(vm.Model.Name)).ErrorText</span>
            <span class="text-warning">@vm.GetPropertyInfo(nameof(vm.Model.Name)).WarningText</span>
            <span class="text-info">@vm.GetPropertyInfo(nameof(vm.Model.Name)).InformationText</span>
TheCakeMonster
@TheCakeMonster
I'he been aiming for the following syntax:
<CslaValidationMessages For="@vm.GetPropertyInfo(name of(gm.Model.Name))" />
There are other parameters for all of the class names, but they all have defaults, and thus are optional
Oh, sorry about the autocorrect, but hopefully you get the idea
TheCakeMonster
@TheCakeMonster
The thing I have been debating is whether instead to use:
<CslaValidationMessages PropertyName="nameof(vm.Model.Name)" />
And then accessing the object via the context provided via EditForm, which I think is probably more in keeping with Blazor usage patterns
TheCakeMonster
@TheCakeMonster
At the moment my implementation doesn't make use of PropertyInfo because it doesn't expose a list<string> of messages, which is what I consider to be better/more user friendly - one div per validation message
I stopped work to allow you to release 5.0 in peace without any commits, and was then away. Now that I'm back, I might get the first version finished this weekend for you to try out in a little demo app
Rockford Lhotka
@rockfordlhotka
I look forward to seeing it!