Thinking of this format to document components, wdyt?
Looks great! 👍
This approach seems very logical! While there's merit in having documentation that doesn't need the application to run, I understand that creating docs in this manner is more enjoyable than managing an external document. At this point in the project, I would focus on the ease of writing documentation rather than the ease of consuming it, so this is excellent. Additionally, these docs serve as a kind of integration test for the components used, which is another benefit. It's great to see some progress and the vdom branch finally merged!
Thank you! It all started from the need for integration tests, but I figured it could serve two purposes
Plus it will always stay true to the real code
hello! If I want to create a label or rectangle in humbleui, specifying coordinates and dimensions xywh, for example [label :x x :y y :w w :h h], how can I do it concisely, thanks
Width and height:
[ui/width {:width w}
[ui/height {:height h}
[ui/label ...]]]For x and y, you can try:
[ui/padding {:left x, :top y}
[ui/width {:width w}
[ui/height {:height h}
[ui/label ...]]]]thanks. I tried but find rect fill-color cover all canvas. (ui/defcomp x-label [text x y w h] [ui/rect {:paint (paint/fill 0xFFB2D7FE)} [ui/padding {:left x :top y} [ui/size {:width w :height h} [ui/label text] ]]])
Dont know why.
I just want rect paint fill color to cover the label. Thanks.
wrap it around label
Or size even
Still not what I expected, after adjusting like this the fill-color covers one row.
I want to place labels with background color anywhere on the canvas.
Show me what are you getting
Wrap it into [ui/halign {:position 0} [ui/valign {:position 0} ...]]
Components stretch by default, if you want them to have their minimal size you have to put them into align
I’ll write a good tutorial one day about all this, but before that, feel free to ping me here
Thanks. HumbleUI is really awesome.