feat: updated components for the app#4485
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because there are still critical, blocking issues relative to the task requirements and tests. The navigation block is not extracted into its own Navigation component and folder, and its styles remain in App.css; this violates the requirement to decompose by BEM/CSS blocks and [CHECKLIST ITEM #2] about a separate folder per component. You need to create a Navigation component (e.g., src/components/Navigation/Navigation.jsx with Navigation.css), move the <nav className="navigation">...</nav> from Header.jsx into it, and move all .navigation / .navigation__link styles from App.css into Navigation.css, then import and use Navigation inside Header. Tests are also failing due to CSS issues: the Article media query font size is half of what the tests expect (22.4px instead of 44.8px), and the Header CSS has incorrect opacity (should be 0.7) and media-query display (should be flex, not block), so you need to adjust these styles to match the expected responsive behavior. Additionally, there are redundant blank lines in Article.jsx around the component and default export, which conflicts with [CHECKLIST ITEM #1] about not overusing empty lines; tighten this spacing by removing the unnecessary empty lines. Finally, make sure any new files like Navigation.jsx and Navigation.css are added to git and that your PR description includes the required GitHub Pages DEMO link, as specified in the task. Once these structural and CSS issues are fixed, your solution will align well with the requirements, as your current component structure and default exports are otherwise solid.
✨ 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
|
added changes and updated tests |
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution as an educational override so you can move forward while continuing to learn and improve.
You’ve done a solid job decomposing App into Header, Article, and Welcome, and your header media-query now correctly uses display: flex, which aligns with the responsive requirement. The main structural gap is that the <nav className="navigation">...</nav> block is still inside Header.jsx instead of being moved into its own Navigation component and folder, and the .navigation / .navigation__link styles are still in Header.css instead of a dedicated Navigation.css [CHECKLIST ITEM #2]. In addition, tests expect opacity: 0.7 on .header in Header.css and an Article media-query font-size of 44.8px in Article.css, which are currently missing and will cause style-related test failures. As you iterate, aim to (1) create src/components/Navigation/Navigation.jsx and Navigation.css, move the <nav> markup and navigation styles there, and import <Navigation /> inside Header, and (2) add opacity: 0.7; to .header plus the font-size: 44.8px; in the appropriate @media rule for .article.
Your solution is approved so you can progress, and addressing these points next will help you match the project’s decomposition and styling requirements more closely.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| </p> | ||
| </article> | ||
| <Welcome /> | ||
| <Header /> |
There was a problem hiding this comment.
The navigation block is still rendered directly inside Header instead of being extracted into a separate Navigation component and imported here. This violates the core requirement to "move navigation into its own Navigation component and folder" and [CHECKLIST ITEM #2] about separate folders per component.
| import Welcome from './components/Welcome/Welcome'; | ||
| import Header from './components/Header/Header'; | ||
| import Article from './components/Article/Article'; | ||
| // Move each BEM block to a separate component (file) and import them here | ||
|
|
||
| function App() { | ||
| return ( | ||
| <main className="app"> |
There was a problem hiding this comment.
.navigation__link styles are placed in Header.css, but all .navigation / .navigation__link styles must be moved into a dedicated Navigation.css file associated with a Navigation component. Keeping them here violates the requirement to split CSS per component and decompose by BEM block.
| @@ -1 +1,31 @@ | |||
| /* Put article styles here */ | |||
| .article { | |||
| margin: 5em auto 0; | |||
There was a problem hiding this comment.
The navigation block is still rendered directly in Header instead of being extracted into a separate Navigation component and imported here, which violates the core requirement to move navigation into its own component and [PROJECT STRUCTURE] checklist item #2 (separate folder per component).
| .article { | ||
| margin: 5em auto 0; | ||
| padding: 1em; | ||
| font-size: 140%; |
There was a problem hiding this comment.
There is no media query here adjusting the article font size to 44.8px as required by the tests and previous review; you need to add the expected font-size in the appropriate breakpoint.
| margin-top: 0.7em; | ||
| } | ||
|
|
||
| @media (min-width: 500px) { | ||
| .article { | ||
| margin: 3.5em auto 0; | ||
| padding: 2em; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
.header is missing opacity: 0.7;, which tests and previous review require; please add this property so the sticky header has the correct default opacity.
| display: flex; | ||
| outline: none; | ||
| text-decoration: none; | ||
| opacity: 0.7; |
There was a problem hiding this comment.
Checklist item #1 says: "Don't overuse empty lines between components". The extra blank line before the App function is unnecessary and should be removed to match the guideline.
| .header { | ||
| width: 100%; | ||
| padding: 1em; | ||
| font-size: 140%; |
There was a problem hiding this comment.
Per the generalized requirements, Article should have a media-query font-size of 44.8px at the expected breakpoint. Currently there is no font-size adjustment inside any media query, so tests that check for this value will fail.
| opacity: 1; | ||
| } | ||
|
|
||
| .header { |
There was a problem hiding this comment.
The Header block is missing the required opacity: 0.7; that tests and requirements expect ("The Header CSS opacity must be 0.7"). Add this property to .header so the sticky header appears with the correct transparency.
| @@ -1 +1,43 @@ | |||
| /* Put header styles here */ | |||
| .navigation__link { | |||
There was a problem hiding this comment.
The .navigation__link styles are currently in Header.css, but requirements state they should live in a Navigation.css for a separate Navigation component. This violates checklist item #2 (separate folder per component) and the instruction to move navigation styles into their own block.
| <nav className="navigation"> | ||
| <a className="navigation__link" href="#about"> | ||
| About | ||
| </a> | ||
| <a className="navigation__link" href="#services"> | ||
| Services | ||
| </a> | ||
| <a className="navigation__link" href="#contact"> | ||
| Contact | ||
| </a> | ||
| </nav> |
There was a problem hiding this comment.
The navigation markup (<nav className="navigation">…</nav>) is still inside Header instead of being extracted into a separate Navigation component and imported here, which conflicts with the requirement to move navigation into its own component/folder and violates checklist item #2 (separate folder per component).
Updated app to handle new components