00:09
Pe_Elle joined
00:54
Pe_Elle left,
Pe_Elle joined
00:55
Pe_Elle left
00:56
Pe_Elle joined
00:57
Pe_Elle left
00:59
Pe_Elle joined
01:04
Pe_Elle left
01:27
Pe_Elle joined
01:36
Pe_Elle left
01:51
Pe_Elle joined
02:27
Pe_Elle left,
Pe_Elle joined
02:57
Pe_Elle left
03:02
Pe_Elle joined
03:16
Pe_Elle left
03:39
Pe_Elle joined
03:43
Pe_Elle left
04:04
Pe_Elle joined
04:42
Pe_Elle left
04:56
Pe_Elle joined
|
|||
SmokeMachine | librasteve: when you have some time, if you could take a look at my answer to your PR, please: github.com/FCO/Cromponent/pull/7#i...2563346884 | 05:51 | |
for doing that I had to wrap add-handler to be able to access route-set from inside the handler... does any one know a better way? | 05:53 | ||
06:51
Pe_Elle left
06:52
Pe_Elle joined
08:54
Pe_Elle left
|
|||
librasteve | lizmat: my initial guess was that this compile-dir is called on each cro run rebuild github.com/croservices/cro-webapp/...kumod#L110 | 10:01 | |
lizmat | that could well be it :-) | ||
librasteve | my new guess is that this monitor Cro::WebApp::Template::Repository::FileSystem::Reloading is used bu cro run github.com/croservices/cro-webapp/...kumod#L116 | 10:02 | |
lizmat | I'd suggest making an issue for it | 10:03 | |
librasteve | lizmat ++ (I have asked arun to do that already) | ||
the begumpura site they shared has (see my notes ^^) some other stuff in it that may be the botteneck and I would like to see that ruled out | 10:07 | ||
(eg Red database start command) | |||
also they may be running on an i286 | |||
10:31
sena_kun joined
10:32
Pe_Elle joined,
Pe_Elle left
10:33
Pe_Elle joined
12:24
Pe_Elle left
12:29
Pe_Elle joined
12:34
Pe_Elle left
12:50
Pe_Elle joined
13:51
Pe_Elle left
14:03
Pe_Elle joined
|
|||
SmokeMachine: i have checked the answer to my issue / PR and I am 100% happy with this change ... thank you for addressing the issue (which I think is a common case to have multiple route includes - so hopefully will make Cromponents even better for most) | 14:12 | ||
that said - I have been figthing a losing battle with Cro Templates and the Cromponent module over the holiday period | 14:13 | ||
at the time I wrote my post Day 18 – Happy™ Xmas I felt that Cromponents would be the cornerstone of my aim of 1. get to the point where I can build a website on Cro the right way ... of course the right way is the key thing here (and timtorwy - there is more than one right way) | 14:16 | ||
14:17
Pe_Elle left,
Pe_Elle joined
14:18
Pe_Elle left
14:24
Pe_Elle joined
|
|||
the things that led me in the Cromponent direction were ... (i) I want to build websites in a componetized way so that components would have LOB and would be reusable across a site (ie a navbar or search box on multiple pages) and across multiple sites (ii) there needs to be a way to populate a component with arguments and (iii) it would be great to map (HTMX) actions on a component via methods.... | 14:28 | ||
use Cromponent; class AComponent { has $.data; method RENDER { Q:to/END/ <h1><.data></h1> END } } | |||
14:29
Pe_Elle left
|
|||
^^ I reproduce the Cromponent synopsis here so that others can see what I mean in these comments | 14:29 | ||
simples | |||
so... what's not to like? | 14:33 | ||
gist.github.com/librasteve/af74f12...f1b0dc65b5 << this gist is pretty much what a Cromponent implementation of an HTML table looks like (at the time I wrote this I was keen to prove that Cromponent could handle nesting and I thought that it would be easy to refactor this into a less fully normalized design. | 14:37 | ||
then - on the road to completing this table example picocss.com/docs/table, I wanted to add THead for table and for row... | 14:42 | ||
gist.github.com/librasteve/abceefc...84c813eec9 <<< hmmm that's 89 lines for a non working example | 14:44 | ||
and then I tried to refactor that to an unnormalized component - you know one class does one thing ... this was (for me) very vexing and I eventually (after about 2 days of trying) gave up | 14:45 | ||
the issues were (i) crotmp does not support nested loops (afaict) so I hade to pace the cell iterations in a different class from the row iteration, (ii) only VERY limited manipulation of Cromponent attribute values can be done through the rules of attr initialisation - no TWEAK can be done and no changes in eg the RENDER method since all the crotmp rendering is done at use time and (iii) juggling the crotmp syntax | 14:49 | ||
and the attributes values across both use time and run time was mentally taxing (honestly I am a meat and ppotatoes developer and I was really struggling to work out how I could do what I wanted) | |||
then I can to add the row headers from the pico table example (just want the first cell to be in a th not in a td and realised that this would be 10 more lines of code some more classes HRow, HCell ... grrr | 14:51 | ||
so I stopped digging my hole and realised that I want the power of full raku when I build me components and thus decided that (while most of the great ideas in Crom,ponent were great (actions as methods etc), the presence of Cro Template was holding me back | 14:52 | ||
here is the table example (no row headers yet, but hopefully you get the idea) using HTML::Functional... gist.github.com/librasteve/b3e03cb...97127d92ee ... 34 lines instead of 89 and imo much more adaptable and maintainable.... | 14:54 | ||
sorry for the long rant ... this is by way of explaining why I am moving away form Cromponent for now ... I do not mean to minimize it's benefits and think that the Cro template world needs this too... | 14:55 | ||
15:04
Pe_Elle joined
15:13
Pe_Elle left
15:22
Pe_Elle joined
15:37
Pe_Elle left
15:38
Pe_Elle joined
|
|||
aruniecrisps | @librasteve i'll get my issue up tonight EST probably | 17:29 | |
i've had some other life updates that have been grabbing my attention lately | |||
or rather that i've had to address immediately | 17:30 | ||
librasteve | np - appreciate your thoughts on this and I do agree this needs attention! | ||
18:34
Pe_Elle left
18:49
Pe_Elle joined
18:54
Pe_Elle left
19:09
Pe_Elle joined
20:10
Pe_Elle left
20:50
Pe_Elle joined
20:54
Pe_Elle left
|
|||
SmokeMachine | librasteve: here is a implmentation of that table you linked here using Cromponents: github.com/FCO/Cromponent/blob/spr...table.raku | 21:09 | |
21:10
Pe_Elle joined
|
|||
librasteve | haha - and interesting to see how it looks - I respect the eating your own dog food vibe! | 21:13 | |
SmokeMachine | On that implementation you can pass arrays of arrays of strings to :head, :body, :foot, or instead of strings you can pass Cells and it will not be touched on instantiation… | 21:14 | |
About having to transform the <th>s, is there any other way of doing that? I mean, is there any other example of doing that in a different way using components? For example, is there an react example of doing a component for that table? How is that implemented? | 21:18 | ||
I don’t think crotmp does not accept nested loops… if that’s true, I think it should be changed… | 21:21 | ||
librasteve | kudos to your raku wrangling skills - I see that you did in Table submethod BUILD {...} what I had failed to do. here is my challenge -> do the same with HTML::Functional (aka the other way to write html embedded in raku) and tell me (as a user / consumer) do you prefer this or writing crotmp (to make a component)? | 21:23 | |
SmokeMachine | Another question: why can’t you use TWEAK? I don’t think anything from cromponents would break TWEAK()… | 21:27 | |
librasteve | btw did you make nested loops in crotmp work? Those wishing for more are encouraged to consider writing their logic outside of the template. says cro.raku.org/docs/reference/cro-we...nditionals | ||
SmokeMachine | I’ll try the nested loops when I’m back to my computer | 21:30 | |
librasteve | ok - tx | 21:31 | |
TWEAK works when I call Table.new: $[[1,2][3,4]] but I could not add eg :thead<left right> and somehow inject the behaviour to somehow make a head row - you have solved this with your BUILD method ... but this is an iceberg that expects component writers to be comfortable writing BUILD methods | 21:38 | ||
SmokeMachine | nested loops work: github.com/FCO/Cromponent/blob/spr...#L181-L187 | 22:02 | |
TWEAK should work as well... and isn't the case that if the user knows how to use TWEAK, they should also know how to use BUILD? | 22:04 | ||
22:12
Pe_Elle left
22:50
Pe_Elle joined
23:12
sena_kun left
23:54
Pe_Elle left
|