-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add files for test #5392
base: master
Are you sure you want to change the base?
add files for test #5392
Conversation
internal77
commented
Sep 20, 2024
- DEMO LINK
- TEST REPORT LINK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're doing great! There are a few important naming and syntax issues that need to be addressed before we can move forward. Make sure to follow the BEM convention for class names and correct the href
attributes in your anchor tags. Keep up the good work, and with these changes, your code will be even better! 🌟🛠️
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
src/index.html
Outdated
<a | ||
href="/" | ||
class="logo" | ||
> | ||
<img | ||
src="images/logo.png" | ||
alt="Company Logo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember about correct indentation between parent and child elements. The img
tag should have a 2-space indentation from its parent a
tag.
src/index.html
Outdated
/> | ||
</a> | ||
<nav> | ||
<ul class="nav_list"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class names should represent the meaning of the content, not the styles or tag names. Consider renaming nav_list
to nav__list
to follow BEM naming convention and to indicate that it's a part of the nav
block.
src/index.html
Outdated
<li class="nav_item"> | ||
<a | ||
href="/apple" | ||
class="nav_link is-active" | ||
> | ||
APPLE | ||
</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add empty lines between multiline sibling blocks of HTML to simplify reading. There should be an empty line before and after each li
block.
src/index.html
Outdated
</a> | ||
<nav> | ||
<ul class="nav_list"> | ||
<li class="nav_item"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class name nav_item
should be nav__item
to follow BEM naming conventions.
src/index.html
Outdated
<a | ||
href="/apple" | ||
class="nav_link is-active" | ||
> | ||
APPLE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use spaces in <a>
tag's href
property. Anchor links should start with the #
symbol if they are meant to be internal links.
src/style.css
Outdated
@@ -1,3 +1,67 @@ | |||
html { | |||
font-family: Roboto, sans-serif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding fallback font families to improve robustness of your font settings. For example: font-family: Roboto, 'Arial', sans-serif;
src/style.css
Outdated
justify-content: center; | ||
} | ||
|
||
.nav_list { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class name .nav_list
should be .nav__list
to follow the BEM naming convention which represents the element part of the block nav
.
src/style.css
Outdated
padding: 0; | ||
} | ||
|
||
.nav_item { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class name .nav_item
should be .nav__item
for consistency with BEM naming convention.
src/style.css
Outdated
margin-left: 0; | ||
} | ||
|
||
.nav_link { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class name .nav_link
should be .nav__link
to maintain BEM naming convention.
text-decoration: none; | ||
} | ||
|
||
.is-active { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class name .is-active
is not following BEM naming convention. It should be something like .nav__link--active
to indicate that it's a modifier for the .nav__link
element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great effort on this Pull Request! Here are a few points to consider for future improvement: 🚀 - Ensure proper indentation and spacing for readability. - Use fallback fonts for better cross-platform compatibility. - Correct the href
attribute format in anchor tags. - Provide descriptive alt
text for images. Keep up the good work, and remember to address these issues in your next update! 👍
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
<a | ||
href="/" | ||
class="logo" | ||
> | ||
|
||
<img | ||
src="images/logo.png" | ||
alt="Company Logo" | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add empty lines between multiline sibling blocks of HTML to add some 'air' and simplify reading. There should be an empty line before and after the tag containing the logo.
<a | ||
href="apple" | ||
class="nav__link is-active" | ||
> | ||
APPLE | ||
</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use spaces in tag's href
property. Anchor links start with the #
symbol. Change href="apple"
to href="#apple"
.
<img | ||
src="images/logo.png" | ||
alt="Company Logo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alt
attribute should describe the image content. Instead of a generic 'Company Logo', provide a more descriptive alternative text that describes the logo or the company it represents.
<a | ||
href="samsung" | ||
class="nav__link" | ||
> | ||
SAMSUNG | ||
</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the href
attribute in the tags, ensure there are no spaces and that it starts with a #
symbol. For example, change href="samsung"
to href="#samsung"
.
<a | ||
href="smartphones" | ||
class="nav__link" | ||
> | ||
SMARTPHONES | ||
</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to use #
for the href
attribute in the tags to indicate that it's an anchor link. Change href="smartphones"
to href="#smartphones"
.
<a | ||
href="photo" | ||
class="nav__link" | ||
> | ||
PHOTO | ||
</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The href
attribute in tags should start with #
and not include spaces. Change href="photo"
to href="#photo"
.
<a | ||
href="video" | ||
class="nav__link" | ||
> | ||
VIDEO | ||
</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anchor links in href
should start with #
and not have spaces. Modify href="video"
to href="#video"
.
<header class="header"> | ||
<a | ||
href="/" | ||
class="logo" | ||
> | ||
|
||
<img | ||
src="images/logo.png" | ||
alt="Company Logo" | ||
/> | ||
|
||
</a> | ||
<nav> | ||
<ul class="nav__list"> | ||
<li class="nav__item"> | ||
<a | ||
href="apple" | ||
class="nav__link is-active" | ||
> | ||
APPLE | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
href="samsung" | ||
class="nav__link" | ||
> | ||
SAMSUNG | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
href="smartphones" | ||
class="nav__link" | ||
> | ||
SMARTPHONES | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
href="laptops" | ||
class="nav__link" | ||
data-qa="hover" | ||
> | ||
LAPTOPS & COMPUTERS | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
href="gadgets" | ||
class="nav__link hover" | ||
> | ||
GADGETS | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
href="tablets" | ||
class="nav__link" | ||
> | ||
TABLETS | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
href="photo" | ||
class="nav__link" | ||
> | ||
PHOTO | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
href="video" | ||
class="nav__link" | ||
> | ||
VIDEO | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</header> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember about correct indentation between parent and child elements. The
block should be indented with 2 spaces from the tag.@@ -1,3 +1,67 @@ | |||
html { | |||
font-family: Roboto, Arial, sans-serif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a fallback font family in case the specified font 'Roboto' is not available. For example, 'font-family: Roboto, Arial, sans-serif;' can be written as 'font-family: Roboto, 'Helvetica Neue', Arial, sans-serif;' to provide better cross-platform compatibility.
line-height: 14px; | ||
font-weight: 500; | ||
text-transform: uppercase; | ||
margin-left: 20px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be consistent with your vertical margins. It's recommended to add only top or only bottom margin, but not both. In your case, .nav__item
has a left margin, which is horizontal, but keep the principle in mind for vertical margins.