Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Addede folder with js-dom practice #302

Merged
merged 6 commits into from
Sep 7, 2022
Merged

Conversation

ASTkach
Copy link
Contributor

@ASTkach ASTkach commented Aug 25, 2022

js-dom

Demo |
Code base

The code is submitted in a dedicated feature branch.

Only code files are submitted.

Please, review.

@github-actions
Copy link

Hey!

Congratulations on your PR! 😎😎😎

Let's do some self-checks to fix most common issues and to make some improvements to the code before reviewers put their hands on the code.

Go through the requirements/most common mistakes listed/linked below and fix the code as appropriate.

If you have any questions to requirements/common mistakes feel free asking them here or in Students' chat.

When you genuinely believe you are done put a comment stating that you have completed self-checks and fixed code accordingly.

Also, be aware, that if you would silently ignore this recommendation, a mentor can think that you are still working on fixes. And your PR will not be reviewed. 😒

Please, make sure you haven't made common mistakes

Universal recommendations:

  • Give variables and functions meaningful names. Avoid generic names like item, element, key, object, array or their variations. Exception: helper functions that are specifically and intentionally designed to be multipurpose.
  • Function names should start with a verb as they denote actions; variables are normally nouns; boolean variables/functions start with is, does, has etc; variable containing multiple entities and functions returning lists contain entity name in plural form.
  • Have consistent code style and formatting. Employ Prettier to do all dirty work for you.
  • Use common sense or seek for an advice whenever requirements look ambiguous or unclear.

Also take a note of the requirements above and follow them in all your future projects.

By the way, you may proceed to the next task before this one is reviewed and merged.

Sincerely yours,
Submissions Kottachecker 😺

@ASTkach
Copy link
Contributor Author

ASTkach commented Aug 26, 2022

I have completed self-check and fix the code.

@madmaxWMFU madmaxWMFU self-assigned this Aug 27, 2022
Copy link
Contributor

@madmaxWMFU madmaxWMFU 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. See some comments below.

const data [{
  title: "",
  size: "",
  description: []
}];

const [ firstElement ] = data;
const { title, size, description } = firstElement;
const template = `
     <div>
       <label>${title}</lable>
       <span>${size}</span>
       ${description.map(el => `<p>${el}</p>`).join('')}`;

submissions/ASTkach/js-dom/js/script.js Outdated Show resolved Hide resolved
submissions/ASTkach/js-dom/js/script.js Outdated Show resolved Hide resolved
submissions/ASTkach/js-dom/js/script.js Outdated Show resolved Hide resolved
submissions/ASTkach/js-dom/js/script.js Outdated Show resolved Hide resolved
submissions/ASTkach/js-dom/js/script.js Outdated Show resolved Hide resolved
@ASTkach ASTkach requested a review from madmaxWMFU September 2, 2022 13:59
@ASTkach
Copy link
Contributor Author

ASTkach commented Sep 2, 2022

I left the width and height for the image:

<img src="${planetImage}" alt="${planetAltText}" class="main__img" width="450" height="450"/>

Without them, the text near the image jumps when loading content.

Copy link
Contributor

@madmaxWMFU madmaxWMFU left a comment

Choose a reason for hiding this comment

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

Great, I approve of your work. Good luck with future tasks!

@madmaxWMFU madmaxWMFU merged commit 5be4b3b into kottans:main Sep 7, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants