[Landing] llv examples animation#613
Conversation
| <h1>[Local Runtime] User List:</h1> | ||
| <div data-value="errors-list"> | ||
| <%= for error <- @errors do %> | ||
| <p style="color:red;">{error}</p> |
| </div> | ||
| <div class="bordered" data-value="users-list"> | ||
| <h2 class="title">[Local Runtime] User List:</h2> | ||
| <%= if @users == [] do %> |
| env: | ||
| CXXFLAGS: "-std=c++20" |
There was a problem hiding this comment.
Would be nice to leave a comment why we need it so we can remove it later if it stops being necessary.
| end | ||
|
|
||
| def handle_event(event, params, socket) | ||
| when event in ["validate", "save", "generate_random"] do |
There was a problem hiding this comment.
Or ~w(validate save generate_random)
|
|
||
| def handle_event(event, params, socket) | ||
| when event in ["validate", "save", "generate_random"] do | ||
| effective_socket = |
There was a problem hiding this comment.
This is weird:
- why the assign starts with underscore?
- do we need two versions of socket?
There was a problem hiding this comment.
This is a workaround to keep track of the previous event, allowing the animation to continue when the user spams events and executing the animation with the last pending update value
| <div | ||
| id={`llv-code-body-${i}`} | ||
| class="code-body-wrap llv-scroll" | ||
| style={i === 0 ? "" : "display:none"} |
There was a problem hiding this comment.
Maybe this should be a toggleable class?
| const libDir = path.resolve( | ||
| fileURLToPath(import.meta.url), | ||
| "../../../../..", | ||
| "examples/local-lv-forms/local/lib", | ||
| ); |
There was a problem hiding this comment.
to import the example from the source code instead of using hardcoded code for display purposes only
| const result = | ||
| errors > 0 ? `errors: ${errors}` : users > 0 ? `users: ${users}` : "ok"; |
There was a problem hiding this comment.
Maybe this shouldn't be nested ternary?
| function handlePresentation(payload: unknown) { | ||
| const { block, event, assigns } = payload as { | ||
| block: string | null; | ||
| event: string; | ||
| assigns: Record<string, unknown>; | ||
| }; | ||
|
|
There was a problem hiding this comment.
This looks weird, why we add unknown and then immediately cast?
| if (ann?.block) | ||
| (node.properties as Record<string, unknown>)["data-block"] = ann.block; | ||
|
|
||
| if (ann?.defpGroup) | ||
| (node.properties as Record<string, unknown>)["data-defp-group"] = ann.defpGroup; | ||
|
|
||
| if (ann?.defpHeader) | ||
| (node.properties as Record<string, unknown>)["data-defp-header"] = "true"; |
There was a problem hiding this comment.
I feel like this could be written a but more clearer by defining types or is functions.
df9e30d to
d353f84
Compare
Screen.Recording.2026-05-21.at.12.39.22.mov
Screen.Recording.2026-05-21.at.12.39.49.mov