Skip to content

Conversation

@Elad-Abutbul
Copy link

No description provided.

Copy link
Member

@Tamir198 Tamir198 left a comment

Choose a reason for hiding this comment

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

Good work overall, left you some commetns

@@ -0,0 +1,8 @@
:root {
--red: hsl(4, 100%, 67%);
Copy link
Member

Choose a reason for hiding this comment

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

This is good practice to use css variables

display: flex;
flex-direction: column;
}
.font-weight-600{
Copy link
Member

Choose a reason for hiding this comment

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

I would change this name into something like font-bold so in the future you will be able to change the value of this the selector name will remain relevant

justify-content: center;
align-items: center;
}
.button {
Copy link
Member

Choose a reason for hiding this comment

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

If you give a button class button that a bit redundant, try to give this a better more meaningful name.

The name should indicate what the button should so like submit-button etc...

Copy link
Author

Choose a reason for hiding this comment

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

It’s a generic button class because there are two buttons — one in the signup page and one in the success page. They look the same, so there’s no reason to give them different class names.

Copy link
Member

Choose a reason for hiding this comment

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

you could give them the same class with more meaningful meaning like what they are doing
If you will add another button that will not looks like this then it can be confusing to have button class

transition: 0.2s ease-in;
}
.button:hover {
background: linear-gradient(90deg, hsl(347, 100%, 66%), hsl(13, 100%, 61%));
Copy link
Member

Choose a reason for hiding this comment

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

This as well can be saved inside css variable

box-shadow: 0 12px 20px rgba(255, 83, 123, 0.35);
}

/* */
Copy link
Member

Choose a reason for hiding this comment

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

Remove those comments, they are not contributing to the understanding of the code




// handlerim |
Copy link
Member

Choose a reason for hiding this comment

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

For the same reason above we can remove this comments


const email = emailInput.value.trim();

if (isValidEmail(email)) {
Copy link
Member

Choose a reason for hiding this comment

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

You should also check that the email is defined and not undefined or null


emailInput.classList.remove("input-error");

errorMsg.style.display = "none";
Copy link
Member

Choose a reason for hiding this comment

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

Its better to add class name and via css give this element styling of hidden or displayed


emailInput.classList.add("input-error");

errorMsg.style.display = "block";
Copy link
Member

Choose a reason for hiding this comment

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

Same in here

function toggleViews(toggle) {

if (toggle=="signup") {
signup.style.display = "flex";
Copy link
Member

Choose a reason for hiding this comment

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

In this function you can have early return and by doing so you will not need the else statement:

function toggleViews(toggle) {
  if (toggle === "signup") {
    signup.style.display = "flex";
    success.style.display = "none";
    return;
  }
  signup.style.display = "none";
  success.style.display = "flex";
}

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.

2 participants