Skip to content

Conversation

@ItsAminov
Copy link

No description provided.

@Tamir198 Tamir198 self-requested a review November 26, 2025 22:02
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.

Hey good work, I left you some comments.

@@ -0,0 +1,3 @@
const AppConstants = {
Copy link
Member

Choose a reason for hiding this comment

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

Great work, this is a good practice

@@ -0,0 +1,109 @@
@media screen and (min-width: 800px) {
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 great, it you didnt knew this you can also :

Image

The image is from the docs

.container {
width: 850px;
height: 590px;
padding: 2em;
Copy link
Member

Choose a reason for hiding this comment

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

Any reason to mix px and em ?
I would keep consistency with 1 unit as much as possible

background-image: url("./assets/images/illustration-sign-up-desktop.svg");
}
button {
height: 25%;
Copy link
Member

Choose a reason for hiding this comment

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

What will you think happen if you will place a new button inside really tall parent?
The button may stretch and be super big and then you will have to override this css rule.

I think that a better approach will be to give this button maybe max-height ?

Do you have any other reason to use % in here?

Copy link
Author

@ItsAminov ItsAminov Nov 29, 2025

Choose a reason for hiding this comment

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

i used it because i only had one button in this page and didnt think about the possibillity of adding another one, but you are right i should have

.container {
flex-direction: column-reverse;
width: 320px;
height: 110vh;
Copy link
Member

Choose a reason for hiding this comment

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

Putting aside the differences between the css units, why would you want some container to be more tall then the current view port?

<script src="constants.js"></script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- displays site properly based on user's device -->
Copy link
Member

Choose a reason for hiding this comment

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

Looks like AI code, and that ok we all are using AI, just remove his comments.
if not feel free to tell me that im wrong

Copy link
Author

@ItsAminov ItsAminov Nov 29, 2025

Choose a reason for hiding this comment

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

you are incorrect on this one it, this comment was in the code i forked and forgot to delete.
all the code here was written by me without ai code generation but i did use it for searching.

<article class="s-container">
<img class="check-icon" src="./assets/images/icon-list.svg" />
<h1>thanks for subscribing!</h1>
<p id="article-text"></p>
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need id in here? class should work and its got less specificity

Copy link
Author

Choose a reason for hiding this comment

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

i used id in order to access the html tag in dom and not for css , is it still considered bad practice?

document.addEventListener("DOMContentLoaded", function () {
const urlParams = new URLSearchParams(window.location.search);
const email = urlParams.get(AppConstants.EMAIL_PARAM_KEY);
const paragraph = document.getElementById("article-text");
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 add null checks in here, for stuff like :

element is not defined
no url params

const email = urlParams.get(AppConstants.EMAIL_PARAM_KEY);
const paragraph = document.getElementById("article-text");

paragraph.innerHTML = `A confirmation email has been sent to <strong>${email}</strong>. Please open it and click the button inside to confirm your subscription.`;
Copy link
Member

Choose a reason for hiding this comment

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

innerHTML considered to be really a bad practice, use textContent instead

Copy link
Author

@ItsAminov ItsAminov Nov 29, 2025

Choose a reason for hiding this comment

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

i used innerHtml because i want to use "<strong/" in order to bold one word and it isnt working with textContent.

Copy link
Member

Choose a reason for hiding this comment

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

Thays because you should make the text bold via css

});

const dismissButton = document.getElementById("return-button");
dismissButton.addEventListener("click", function () {
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 remove your event lister after you navigate into another page and this listener is no longer needed

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