Skip to content

add task solution#4278

Open
IvanovvvIhor wants to merge 2 commits intomate-academy:masterfrom
IvanovvvIhor:develop
Open

add task solution#4278
IvanovvvIhor wants to merge 2 commits intomate-academy:masterfrom
IvanovvvIhor:develop

Conversation

@IvanovvvIhor
Copy link

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

I am requesting changes because one core requirement of the task is not yet met: the navigation has not been moved into its own Navigation component with its own CSS.

Critical issues to fix (blockers):

  1. In src/components/Header/Header.jsx, the <nav className="navigation">...</nav> block is still defined inside Header. The task explicitly requires moving the navigation into a separate Navigation component. Create src/components/Navigation/Navigation.jsx, move the <nav> markup there, export it with export default Navigation, and then import and render <Navigation /> inside Header instead of the inline <nav>.
  2. In src/components/Header/Header.css, there are navigation-specific styles such as .navigation__link and its hover/focus rules. The task also requires splitting CSS per component, so you should move all navigation-related rules into a new src/components/Navigation/Navigation.css and remove them from Header.css. Then import Navigation.css inside Navigation.jsx (not in Header.jsx).

Apart from this structural issue, your decomposition of App, Article, and Welcome looks good: each has its own folder, JSX, and CSS file with export default used correctly. Once you extract the navigation component and its styles as described, your solution should align well with the task requirements. Keep going — you’re very close, and this refactor is a valuable practice in clean component structure.


✨ 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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment on lines 23 to 35
.navigation__link {
display: inline-block;
outline: none;
text-decoration: none;
opacity: 0.7;
padding: 0 0.5em;
color: black;
transition: opacity 0.2s ease-in-out;
}

.navigation__link:hover,
.navigation__link:focus {
opacity: 1;

Choose a reason for hiding this comment

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

This file contains navigation-specific styles (.navigation__link and its hover/focus rule). This violates the description requirement: "Split the App.js into components based on CSS blocks. CSS code should be split too." and specifically: "Move the navigation into a separate Navigation component (you may also create a folder for the Navigation component and move navigation there)." Consider moving these rules into Navigation.css inside a new Navigation folder and removing them from Header.css. Also update Header.jsx to import and use the new Navigation component (exported with export default).

Comment on lines 9 to 19
<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>

Choose a reason for hiding this comment

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

The <nav> block is defined inside Header. This violates the task description requirement: "Move the navigation into a separate Navigation component (you may also create a folder for the Navigation component and move navigation there)." Extract the <nav className="navigation">...</nav> into a new Navigation component (in its own folder) and import that component into Header instead of keeping the markup inline.

@@ -1,5 +1,25 @@
// import a css file containig header styles
import './Header.css';

Choose a reason for hiding this comment

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

The file currently imports ./Header.css. Since navigation styles should be separated, this violates checklist item #2: "Create separate folder per component, where you could put all files(styles, components, and so on)". Move navigation-related CSS rules into Navigation.css inside the new Navigation folder and remove them from Header.css; then import the new CSS from the Navigation component.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

Your solution is approved because it cleanly decomposes the app into the required components (Header, Navigation, Welcome, Article) and gives each its own JSX and CSS file with appropriate imports and export default usage. The Header component correctly delegates navigation to a separate Navigation component, and navigation-related styles have been moved out of Header.css into Navigation.css, matching the requirement to split both markup and styles per component. App.jsx now composes these components in a clear, top-level structure without any obvious syntax or runtime issues.

Nothing in the current codebase appears to block task completion or break functionality based on the files reviewed. The only remaining points are project-level best practices: make sure you run npm test locally and resolve any failures, and use Prettier/VS Code settings as required so formatting stays consistent across files. Overall, this is a solid, well-structured implementation of the decomposition task.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

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