8 Dec 2024
SmokeMachine librasteve: github.com/FCO/Cromponent/commit/8...0470405560 22:23
9 Dec 2024
librasteve SmokeMachine: I have finally got some concrete feedback onto your Cromponent proto - this is pretty much what I had in mind for functional composition of Cromponents, but using crotmp under the hood and optionally in assemblies depending on what floats you boat. I have offered as a PR hope this is a way to contribute. 17:43
/way/good way/ 17:44
Next on my list is to elaborate the MyLib.rakumod to get CSS (SASS?) mixing in at the component level. I can be pretty self sufficient in that since I don't think that will need any changes to the existing prototype. (Although I epect you to be freely making any improvements you side so may have to reintegrate when you get to where you are going. Hopefully the form of the Cromponent classes/roles is stable since it 17:48
is nicely declarative already imo)
SmokeMachine Im currently trying to replace add-component with a trait `is cromponent` but I’m having a big problem of my trait not basing matched… :( 18:01
librasteve the trait meister 19:16
SmokeMachine librasteve: I implemented 2 new features to Cromponent: now you can define a cromponent will use a macro instead of a sub and for every cromponent you create it creates the sub/macro with the name of the component, but now it also creates a sub/macro with the name <CromponentName>-new that instanciates the cromponent and uses it from inside the template: github.com/FCO/Cromponent/blob/mai...macro.raku 21:03
10 Dec 2024
librasteve very nice! appreciate this new feature ... when I asked for this, it seemed the only way to do nested components - but when you made the librasteve.raku example, I better understood that nested Cromponents would work fine without macro feature... please can you describe the status as you see it with the macros ... is this a better way to do nesting and we should stop using the librasteve way, or this this timtowdi 16:36
and both will be equal?
SmokeMachine No, I think using macro is good when you want to customise the component with template and not component… 18:27
librasteve ah - perfect - thanks for clarifying! 18:35
SmokeMachine librasteve: did you have the chance to look at the <MyCromponent>-new? I just thought a better way of doing that and I think I’ll unify that with the original one… if, on template, you call Bla and pass a single instance of Bla it works as usual. Otherwise, it will instantiate a new object using .new() and the arguments you passed… 19:57
librasteve I saw it (actually it echoes an early version of what I tried for functional - to somehow generate two tags) - sounds like your second variant is better - I trust you to do that ... right now I am happy to use the version from a couple of days ago (prior to my PRs) and I am mostly exploring how to bring in CSS atm 20:50
17 Dec 2024
.seen SmokeMachine 15:26
SmokeMachine: just wanted to give you a heads' up that I did include some cromponent code in my demo (tomorrow's advent post) - the code I made just finished today (and it was done in a hurry as the original date was 21st) here github.com/librasteve/raku-Cro-Web.../02-sharc1 (not main branch). This is about halfway to an MVP - I need to put in Red (ie data model inside the component), merge in 15:35
your latest Cromponent updates and fix some things I broke and distinguish between installable libraries and site specific libraries... but I thnk that the sample site is pretty much in the form of my idea of how to build a website (which may be very different to your idea ?!)
It would suit me to have Cromponent be an external module dependency - better than duplicating the code - but I see that you have not been able to be as active on the Cromponent prototype recently so I am happy to keep that code within these site level examples for now, but with the idea that I would maybe release and support as a raku module. Please can you give me an idea of your thoughts for this? When Cromponent 15:41
does become a module in its own right, then I would probably break out the library of crompoments to also be external dependencies - maybe one for HTMX examples and one for Pico CSS examples.
PS. maybe a module name like HTML::Components or Cro::WebApp::Components would be better than Cromponents?[yeah I like that Cromponents is funny ... but the rest of the Cro naming is quite straight-laced ...] 15:45
lizmat colloquially cromponents could continue to be used :-) 18:52
scullucs "Cromponents" sounds perfectly cromulent. 18:56
SmokeMachine librasteve_: Hi! So would it help you if I released what we have now? 19:39
I wouldn't say `the rest of the Cro naming is quite straight-laced`, once its name came from `my Cro $service` (at least that's what I remember). I'm not a big fan of straight-laced names... 19:42
it have no tests yet, but if it will help you, I can release it now... 19:43
ans sorry for not being very active the last days... I'm working too much... 19:44
librasteve_: can you see if this helps you? github.com/FCO/Cromponent/pull/6 20:28
librasteve your module - your name :-) 22:09
please do release what you wrote as early experimental - that would be very helpful 22:10
i can try and write some tests and PR if you like 22:11
oh - we do need to work out the “reentrency” issue i posted please 22:47
SmokeMachine have you tried that with this new version? 22:48
I don't see why that would break and I could't reproduce.. 22:49
it's released... let's see if it will go to raku.land... 22:55
librasteve_: you need your version of cro webapp to make that work... 23:00
librasteve I tried with the old version… will merge and close issue if fixed 23:07
&afk 23:08
SmokeMachine If that’s not fixed, if you could share a code to reproduce the error, I can try to fix
18 Dec 2024
raku.land/zef:FCO/Cromponent 00:23
librasteve_: by reading your post (congratulations!) I think I found the problem you were getting. Cromponent should not be instantiated. It exports functions that should be used… unless that was you trying to workaround my bugs… :) 01:24
librasteve SmokeMachine: I have just provided a more detailed explanation in the Issue - please comment with your feedback - I am hoping to merge your latest back into my workflow today / tomorrow and can apply the "instantiation" then, test and offer back as a PR to Cromponent if you agree that it is heading in the right direction 11:01
forgive me if this was fixed in your latest - however, I think that my examples (multiple included route blocks) are testing a wider use case in this sense - but then maybe I misunderstand 11:03
&afk for a bit 11:07
SmokeMachine I think Cro::HTTP::Router is breaking &trait_mod:<is>... 23:46
the only difference between AAA.rakumod and BBB.rakumod is that BBB is using Cro::HTTP::Router... and it breaks... usercontent.irccloud-cdn.com/file/.../image.png 23:48
just to make it clear: the method RENDER is not required to work nor to break... 23:50
doing use Cro::HTTP::Router qw//; seems to work... 23:58
19 Dec 2024
librasteve Smoke: suggest you raise an issue on Cro::HTTP::Router ... maybe patrickbr can take a look? meantime maybe you can isolate the use in a lexical block {}? 16:35
SmokeMachine I still need som time on that… I still don’t get why not adding the component only once… 18:48
(Sorry, wrong channel…) 18:52
librasteve sorry I should have posted here 19:24
21 Dec 2024
SmokeMachine librasteve: how can I send you a private message? 15:16
librasteve librasteve@furnival.net (or pm here on discord) 17:27