Skip to content

[Landing] llv examples animation#613

Open
mmietla wants to merge 8 commits into
mainfrom
mmietla/llv-examples/landing
Open

[Landing] llv examples animation#613
mmietla wants to merge 8 commits into
mainfrom
mmietla/llv-examples/landing

Conversation

@mmietla

@mmietla mmietla commented May 21, 2026

Copy link
Copy Markdown
Contributor
Screen.Recording.2026-05-21.at.12.39.22.mov
Screen.Recording.2026-05-21.at.12.39.49.mov

@mmietla mmietla requested review from FranekKubis and jgonet May 21, 2026 10:41
@mmietla mmietla changed the title [LandingMmietla/llv examples/landing [Landing] llv examples animation May 21, 2026
<h1>[Local Runtime] User List:</h1>
<div data-value="errors-list">
<%= for error <- @errors do %>
<p style="color:red;">{error}</p>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could move it to styles.

</div>
<div class="bordered" data-value="users-list">
<h2 class="title">[Local Runtime] User List:</h2>
<%= if @users == [] do %>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enum.is_empty?(@users)

Comment on lines +57 to +58
env:
CXXFLAGS: "-std=c++20"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or ~w(validate save generate_random)


def handle_event(event, params, socket)
when event in ["validate", "save", "generate_random"] do
effective_socket =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is weird:

  1. why the assign starts with underscore?
  2. do we need two versions of socket?

<div
id={`llv-code-body-${i}`}
class="code-body-wrap llv-scroll"
style={i === 0 ? "" : "display:none"}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be a toggleable class?

Comment on lines +15 to +19
const libDir = path.resolve(
fileURLToPath(import.meta.url),
"../../../../..",
"examples/local-lv-forms/local/lib",
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it's needed?

Comment on lines +157 to +158
const result =
errors > 0 ? `errors: ${errors}` : users > 0 ? `users: ${users}` : "ok";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this shouldn't be nested ternary?

Comment on lines +175 to 181
function handlePresentation(payload: unknown) {
const { block, event, assigns } = payload as {
block: string | null;
event: string;
assigns: Record<string, unknown>;
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks weird, why we add unknown and then immediately cast?

Comment on lines +121 to +128
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";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this could be written a but more clearer by defining types or is functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants