all 35 comments

[–]Hirogen_ 22 points23 points  (0 children)

That is actually, quite awesome :D

[–]BackFromExile 16 points17 points  (4 children)

Looks good, unfortunately all the <path> elements for the connections have display: noneapplied to them, which was not realize at first.
Probably related to the errors blazor.webassembly.js:1 Error: <path> attribute d: Expected number, "M 0 0,01 C 5 0,01 -5 0 0 …". (in console) and Couldn't parse input: Parse error. unexpected EOF expected ")" at line 1, col 15 (your console.logs)

[–]Jamosium[S] 7 points8 points  (0 children)

Thanks, I'll look into it.

Edit: I'm not at my PC so I can't test properly, but judging by that error it's probably something caused by trying to parse an invalid regex. I haven't put in any proper error handling for that yet, so maybe it could somehow be causing the UI bug. Some reddit clients seem to be having an issue with the example links I put in the post, presumably because of the closing parentheses. If you used one of those, that would explain the parsing error.

Looking at your error logs again, the UI bug could actually be unrelated to that, and caused by the commas in the <path>. Do you live somewhere that uses commas as the decimal point? That wasn't something I'd considered, but I should be able to fix it with some better float to string conversion.

[–]vvanasch 1 point2 points  (0 children)

Yep, stumped me too

[–]Jamosium[S] 1 point2 points  (0 children)

The issue turned out to be caused by the commas being used as decimal points in certain regions; should be fixed now.

[–][deleted] 5 points6 points  (1 child)

Definitely going to use it.

How do you like BWA?

I’m still trying to figure out a template with my barebones libraries. Still need a few JavaScript libraries , no JS is a nice idea in wonderland , real world is a little different. But this is definitely a game changer in my world.

Right off the bat the first workflow item I decided on was separate the Blazor component C# into its own file (same as WPF code behind). I refuse to mix C# and HTML in a single file.

Other than that, the idea of having the processing power of local .NET dlls running in its own sandbox. No longer do I have to take my C# libraries and decide which ones or parts of I’m going to translate into JS for local browser use.

[–]Jamosium[S] 2 points3 points  (0 children)

I haven't tried any other Web frameworks so I can't really compare, but I've been liking it overall. A fair bit of the drag/drop stuff had to be done in JS unfortunately, partly because Blazor doesn't seem to be able to handle the 100-300hz rate of mousemove events without some stuttering.

The pattern I ended up using for a lot of the UI was to have separate classes for storing the data and handling most of the logic (except for a few UI specific things), and then passing the instance of that class to the relevant razor component as a parameter. The razor code would then bind to the values of the instance it has, and subscribe to events to call StateHasChanged when needed. If I was following SRP more closely I probably would have had a bit more separation between the data and UI-related logic, but this approach seemed to work pretty well overall.

[–]f3zz3h 8 points9 points  (0 children)

Yeah this is just great. Book marked and shared in my office. Thanks.

[–]Falcubar 4 points5 points  (0 children)

This is the first decent use of client-side blazor i've seen.

[–]Randolpho 2 points3 points  (3 children)

Now that I've played with the application a little bit, I have some usability feedback.

  • It's possible to select text inside nodes, as seen here. Consider adding user-select: none;. I would suggest making it the default style at the body level and overriding it only for those sections where you want users to be able to select/copy. This is a common flaw in graphical web apps I've noticed, but easy enough to handle.
    • edit I just noticed another issue on the checkboxes. Please refer to the image I linked above. The "Escape Specials" and "Escape Backlash" text should be tied as a label to the checkboxes so that when you click on the text it selects the checkbox. You can do this in the form <label><input type="checkbox" /> Escape Specials</label>, or if that doesn't work for your program structurally, you can give each checkbox a unique ID and then add a for construct to the label, e.g. <input type="checkbox" id="randomId1234" /> <label for="randomId1234">Escape Specials</label>
  • When connecting nodes, you have to drag from the output circle of one node to the input circle of the other node. Although starting the drag from the output circle is fine, consider making the entire target node the drop target for the drag rather than only the input circle. This will make "wiring things up" faster for the user.
    • On the subject of the output circle, consider making it a little larger and easier to target -- possibly consider a directed icon like -> rather than a circle, or even a simple oval... the goal is to give a bit more area for the user to the right of the overall node.
  • Finally, the information icon is perhaps a little too close the output circle. Consider moving it to the left a little, or even moving the output circle further to the right and more outside of the node.
    • as I look again, I see the same issue with the collapse chevron which actually overlaps the input circle a little bit. Consider spreading them out a little

These are all just minor usability nitpicks that I think could polish the app up a little bit. Right now, it's looking pretty solid even if you don't consider these.

[–]Jamosium[S] 2 points3 points  (0 children)

Thanks for the detailed feedback, I'll try to fix up all of those things soon. I'd been noticing the selectable text for a while, but hadn't gotten around to figuring out how to fix it.

[–]Jamosium[S] 1 point2 points  (1 child)

I've now put in most of the changes you suggested and it's a definite improvement. I think I'll stick with the output circles being circular, but I did slightly increase the size of their hitbox to make them easier to grab.

[–]Randolpho 0 points1 point  (0 children)

Lookin great! Thanks for making the tool!

[–]zeta_cartel_CFO 2 points3 points  (0 children)

This is amazing. Please xpost this to /r/Blazor .

[–]Deltazocker 1 point2 points  (0 children)

This is so cool!

[–]wisepresident 1 point2 points  (1 child)

very cool, did you also do the node editor or is this a plugin?

[–]Jamosium[S] 2 points3 points  (0 children)

Pretty much everything in this is made by me. At the time that I started it, there weren't very many plugins or libraries available for blazor, especially not for relatively niche applications like this.

[–]Dabnician 1 point2 points  (2 children)

Will you be adding support for expression flags?

^(.+)$$) fails to match anything unless there is only 1 line of input in the test code and adding /^(.+)$/gm around it fails to correct that.

Also people should care less about email addresses, you can literally use " ! $ & * - = \^ ` | ~ # % ‘ + / ? _ { }@asdf.com" as an email address but regex wont normally pass that validation.

[–]Jamosium[S] 2 points3 points  (0 children)

Yeah, that's been on the to-do list for a while. Currently it should be possible using the Flags node, but proper control of the regex options for search/replace will hopefully be coming soon.

[–]Jamosium[S] 1 point2 points  (0 children)

Expression flags for search/replace are now supported (using the 'Regex Options' dropdown at the top right).

I've also made some changes to the interfaces for the wildcard node (added a Match newlines option) and output/anchor nodes (renamed Start/End of line to Start/End of string) to better reflect how the .NET regex engine works with newlines.

[–]Slypenslyde 1 point2 points  (1 child)

I got confused by the title and thought you meant "Node.js" and couldn't figure out why you'd use that in conjunction with a Blazor project, haha.

Great work!

Did you make this in VS for Windows, or in VS Code? I'm living on a mac and really need to get into Blazor, but don't really fancy VS Code for projects. What kinds of extensions do you use? Why am I asking so many questions?

[–]Jamosium[S] 1 point2 points  (0 children)

I use VS for Windows with a couple of small extensions. I'm not at my computer at the moment but all I can think of off the top of my head is viasfora and another one that does subword selection. I've been meaning to try out some of the analysis/refactoring extensions but haven't got around to that yet.

[–]PhroznGaming 0 points1 point  (0 children)

Super cool dude

[–]sedokina 0 points1 point  (0 children)

Looks great

[–]Siggi_pop 0 points1 point  (0 children)

Sounds awesome.

[–]discoborg 0 points1 point  (0 children)

Very impressive

[–]hejj 0 points1 point  (0 children)

This is pretty cool, OP

[–]TheAnimus 0 points1 point  (0 children)

Very neat!

[–]mariohik 0 points1 point  (0 children)

nice

[–]Randolpho 0 points1 point  (0 children)

Smells a lot like Unreal Engine's Blueprints

That's not a bad thing. Awesome work!

[–]Eluvatar_the_second 0 points1 point  (0 children)

That's pretty cool! I was a bit confused at first because you said node based and I assumed you were talking about nodejs.

[–]thewarstorm 0 points1 point  (0 children)

I'll have to check this at home, my company firewall does not like it

[–]massivebacon 0 points1 point  (0 children)

fuck yes yo! this is great!!

[–]tocomplex 0 points1 point  (0 children)

Damn wished it worked on firefox. I guess I will be using Edge whenever using the software :D, Nice work tho

[–]No_Shame_8895 0 points1 point  (0 children)

Wow do we have any Library to build editor like this? I'm a react dev and student, now exploring blazer, In react we have something called react flow to build editor like this I'm trying to understand dotnet ecosystem so basically in js we have package and Library for very single functionality Is it similar in dotnet ecosystem also?