feat(MAJOR): removed the need for dyn_id

This is a very very very big update for UX! Ewwii finally has support
for automatically assigning `dyn_id`.

This was actually not as hard as I thought! I just had to mutate the
widget AST and inject a `dyn_id` in based on its parent.

It works soooo well and the burden on the user just reduced sooo much!
This commit is contained in:
Byson94
2025-09-03 16:49:46 +05:30
parent abe59bc374
commit 39912d3f46
12 changed files with 159 additions and 57 deletions

View File

@@ -27,9 +27,8 @@ fn animalButton(emoji, selected) {
class: class,
cursor: "pointer",
onclick: "echo " + emoji + " >> /tmp/selected_emoji.txt",
dyn_id: "dyn_eventbox_" + emoji, // unique per emoji
}, [
label(#{ text: emoji, dyn_id: "dyn_label_" + emoji }) // unique per emoji
label(#{ text: emoji }) // unique per emoji
])
]);
}