Skip to content

Conversation

@EdroCode
Copy link
Contributor

@EdroCode EdroCode commented Dec 5, 2025

Closes #32
Closes #30
Closes #31

Copy link
Member

@enricoprazeres enricoprazeres left a comment

Choose a reason for hiding this comment

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

Very nice job! 🔥

@EdroCode
Copy link
Contributor Author

Closes #28

Copy link
Member

@enricoprazeres enricoprazeres left a comment

Choose a reason for hiding this comment

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

Awesome job! 🔥 Just need you to polish some things.

~H"""
<div>
<.form for={@form} phx-change="validate" phx-target={@myself}>
<div class="mb-2 mt-4">
Copy link
Member

Choose a reason for hiding this comment

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

Avoid using these margins across the code. You should prefer using flex and gaps. It makes the code cleaner and less unpredictable.

</span>
</div>
<% else %>
<div class="grid w-full h-full grid-cols-[auto_1rem] justify-stretch py-1 pr-2">
Copy link
Member

Choose a reason for hiding this comment

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

This grid and notation usage is not necessary if the suggestions are followed (mainly the one on the core_components -> see it). Also, consider removing all occurrences as well.

Comment on lines +117 to +127
def handle_event("validate", %{"auth" => form}, socket) do
{:noreply,
socket
|> assign(
form:
FormData.to_form(
%{"password" => form["password"], "confirm_password" => form["confirm_password"]},
as: :auth
)
)}
end
Copy link
Member

Choose a reason for hiding this comment

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

With the changeset you validate the data you're submitting in the form. It's strongly desired to use it.

Suggested change
def handle_event("validate", %{"auth" => form}, socket) do
{:noreply,
socket
|> assign(
form:
FormData.to_form(
%{"password" => form["password"], "confirm_password" => form["confirm_password"]},
as: :auth
)
)}
end
@impl true
def handle_event("validate", %{"auth" => form}, socket) do
changeset = %User{} |> User.changeset(form)
{:noreply,
socket
|> assign(form: to_form(changeset, as: "auth"))}
end

@@ -0,0 +1,26 @@
defmodule Yearbook.User do
@moduledoc """
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add validations for the email and to see if the password and confirm password fields are equal. With this, you should make alerts at the form.

Comment on lines +9 to +10
<div class="bg-white/30 m-4 w-auto backdrop-blur-md p-3 rounded-2xl hover:scale-102 transition-transform hover:bg-white/50">
<a href="/" class="flex items-center gap-3 cursor-pointer">
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<div class="bg-white/30 m-4 w-auto backdrop-blur-md p-3 rounded-2xl hover:scale-102 transition-transform hover:bg-white/50">
<a href="/" class="flex items-center gap-3 cursor-pointer">
<div class="bg-white/30 m-4 w-auto backdrop-blur-md rounded-2xl hover:scale-102 transition-transform hover:bg-white/50">
<a href="/" class="flex items-center gap-3 cursor-pointer p-3">

Copy link
Member

Choose a reason for hiding this comment

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

Maybe refactor this structure. Since there is just one background, just remove the folder and put it inside the images folder directly.

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.

feat: forgot password page feat: sign up page feat: sign in page

3 participants