Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes as several critical requirements have been missed. You've set up a good HTML structure, but please update the following to match the task description:
- Styling: The header must be full-width (remove horizontal
margin),marginmust be used instead ofgapfor spacing navigation items, and.nav-linkshould not havepadding. Also, reset the defaultmarginandpaddingon the<ul>element. - HTML & CSS Classes: The active link class must be
is-active, notactive. Thedata-qa="hover"attribute needs to be on the fourth link. Navigation text should be lowercase in HTML and uppercased via CSStext-transform. - Testing: The
backstop.jsonfile uses absolute paths which will break tests in other environments; please change them to relative paths.
Addressing these points will bring your solution in line with the requirements.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
backstop.json
Outdated
| "scenarios": [ | ||
| { | ||
| "label": "Header - estado normal", | ||
| "url": "file:///C:/Users/Usuário/Desktop/layout_moyo-header/src/index.html", |
There was a problem hiding this comment.
Using an absolute file path (file:///C:/...) makes the test setup specific to your local machine and will prevent it from running in other environments (like a CI/CD pipeline or another developer's computer). Please use a relative path to the HTML file (e.g., ./src/index.html) to make your project portable. This applies to the URL on line 26 as well.
src/style.css
Outdated
| display: flex; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| margin: 20px 60px; |
There was a problem hiding this comment.
According to the requirements, "the header should stretch the full page width (don't use a horizontal margin)". Applying horizontal margins here prevents that. The spacing should be applied inside the header, for example by using padding on the .header element.
src/style.css
Outdated
|
|
||
| .nav-list { | ||
| display: flex; | ||
| gap: 25px; |
There was a problem hiding this comment.
The task requirements state: "don't use the flex gap property for indents. It's not supported in tests, use margin instead". Please use margins on the .nav-item elements to create space between them.
| .nav-list { | ||
| display: flex; | ||
| gap: 25px; | ||
| list-style: none; | ||
| width: 100%; |
There was a problem hiding this comment.
The <ul> element has default browser margins and padding. The requirement to "reset browser default margins" applies here. You should add margin: 0; and padding: 0; to this ruleset.
src/style.css
Outdated
| text-decoration: none; | ||
| color: #000; | ||
| text-transform: uppercase; | ||
| padding: 8px 0; |
There was a problem hiding this comment.
The requirements explicitly state that "Nav Links should not have any padding". To control the element's height and vertically center the text, consider using height and line-height properties, or turn the link into a flex container.
src/style.css
Outdated
| } | ||
|
|
||
| /* link ativo */ | ||
| .nav-item.active .nav-link { |
There was a problem hiding this comment.
The requirement specifies using the class is-active for the active link, but the CSS selector is using .active. Please update this to match the requirement.
src/style.css
Outdated
| } | ||
|
|
||
| /* traço do active */ | ||
| .nav-item.active .nav-link::after { |
There was a problem hiding this comment.
The requirement specifies using the class is-active for the active link, but the CSS selector is using .active. Please update this to match the requirement.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving this solution as an educational exception to help you progress, but please review the feedback carefully for your next task. You've done a great job with the HTML structure and implementing many of the requirements correctly!
Here are the main points to correct:
- Test Configuration: In
.github/workflows/test.yml, thebackstop referencecommand should be removed to ensure tests compare against the committed references. Also, inbackstop.config.js, theurlshould point to your local./src/index.htmlfile, not the live site. - CSS Rules: The universal selector (
*) is not allowed; please apply resets to specific elements likebody. For navigation spacing, use a selector like.nav-item + .nav-itemto add margins only between items, avoiding margins on the first and last elements. - HTML Structure: The
is-activeclass should be on the<a>tag inside the list item, not on the<li>itself, as per the requirements.
Addressing these items will significantly improve your code. Keep up the excellent effort!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| - name: Backstop reference | ||
| run: npx backstop reference --config=backstop.config.js |
There was a problem hiding this comment.
The backstop reference command should not be run in the CI pipeline. This command creates new reference images from the live URL, and the following backstop test command will compare against these new images, causing the test to always pass. Reference images should be generated locally by the developer and committed to the repository. Please remove this step.
| backstop_data/** | ||
| !backstop_data/bitmaps_reference/ | ||
| !backstop_data/bitmaps_reference/** | ||
| !backstop_data/html_report |
There was a problem hiding this comment.
Generated files like test reports should not be committed to the repository. This line explicitly prevents the html_report directory from being ignored, which means it will be tracked by Git. It's better to remove this line and let the backstop_data/** rule on line 13 handle ignoring the report.
| scenarios: [ | ||
| { | ||
| label: 'Header layout', | ||
| url: 'https://johannpdaniel.github.io/layout_moyo-header/', |
There was a problem hiding this comment.
The URL for the test scenario is hardcoded to a live, deployed site. This means the visual regression tests will run against the main branch version, not the code in your pull request. To test your changes correctly, this should point to a local file, like ./src/index.html.
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| } |
There was a problem hiding this comment.
The task requirements state that you should not use the universal selector (*). While it's good practice to reset default browser styles, it should be done on specific elements. Please remove this rule and apply margin: 0 to the body element instead.
|
|
||
| .nav-item { | ||
| position: relative; | ||
| margin-inline: 10px; |
There was a problem hiding this comment.
This rule adds margin to the left and right of every list item, which violates the requirement: "there should not be margins before the first and after the last list items". A better approach is to add margins only between the items, for example by using the adjacent sibling selector (.nav-item + .nav-item) to apply a margin-left.
|
|
||
| <nav class="nav"> | ||
| <ul class="nav-list"> | ||
| <li class="nav-item is-active"> |
There was a problem hiding this comment.
According to the requirements, the is-active class should be on the link (<a>) itself, not on the list item (<li>). The requirement states: "the blue link with a line below should have a class is-active". Moving this class to the <a> tag on line 50 will align the code with this requirement.
No description provided.