Skip to content

Conversation

@TarasYelahin
Copy link

No description provided.

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 a few core requirements of the task are not yet met and they affect the expected structure and behavior of the app.

Critical issues that must be fixed:

  1. In src/App.jsx, the welcome markup is still inline and not using the Welcome component. The task explicitly requires splitting App into components by BEM blocks and moving the welcome block into src/components/Welcome/Welcome.jsx, so you should import Welcome with a default import and render <Welcome /> instead of the inline JSX, and move the related .welcome styles from App.css into Welcome.css.
  2. In src/components/Navigation/Navigation.jsx, the component is only exported as a named export; tests require all components to use default exports. Add a default export (e.g., export default Navigation;) and update imports (like in Header.jsx) to use import Navigation from '../Navigation/Navigation';.
  3. In src/components/Header/Header.jsx, there is a nested <header> inside another <header>, which breaks proper semantics and likely the expected DOM; keep a single <header className="header"> wrapping the title and <Navigation />. Also remove the redundant import '../Navigation/Navigation.css'; since the Navigation component already imports its own CSS.
  4. In src/components/Article/Article.css, there are .header rules inside the @media (min-width: 500px) block. These header styles must be moved into src/components/Header/Header.css so that each component owns its own CSS, and the duplicate .header block should be removed from Article.css.

Once you address these points, your structure will align with the component/CSS-splitting requirement and the default-export expectation, and the app should be ready for approval. You’ve already done a solid job creating separate component folders and CSS files; fixing these remaining mismatches will complete the refactor cleanly.


✨ 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 20 to 25
@media (min-width: 500px) {
.header {
text-align: left;
display: flex;
justify-content: space-between;
}

Choose a reason for hiding this comment

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

This file contains .header rules inside the @media (min-width: 500px) block. The project requirement states: "CSS code should be split too." Move these .header rules to the Header component stylesheet (src/components/Header/Header.css) so each component keeps its own styles.

Comment on lines 21 to 25
.header {
text-align: left;
display: flex;
justify-content: space-between;
}

Choose a reason for hiding this comment

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

Header-related rules here duplicate header styles that belong in Header.css. Consolidate header styles into src/components/Header/Header.css and remove the duplicate .header block from this Article.css to avoid duplication. See Header.css for the proper place.

src/App.jsx Outdated
@@ -1,5 +1,7 @@
import React from 'react';
import './App.css';
import { Header } from './components/Header/Header';

Choose a reason for hiding this comment

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

This file still contains the welcome markup inline rather than using the Welcome component. The task requires: "Split the App.js into components based on CSS blocks." Move this block to the existing Welcome component and import/use <Welcome /> here. The Welcome component already exists: src/components/Welcome/Welcome.jsx.

src/App.jsx Outdated
import React from 'react';
import './App.css';
import { Header } from './components/Header/Header';
import { Article } from './components/Article/Article';

Choose a reason for hiding this comment

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

You import Article as a named import. The component files provide default exports — prefer importing components by their default export (e.g. import Article from './components/Article/Article';) so your imports match the components' default exports and project expectations.

diam.
</p>
</article>
<Header />

Choose a reason for hiding this comment

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

Change the inline welcome section to use the Welcome component here (import it at the top). Also ensure welcome styles are moved out of src/App.css into src/components/Welcome/Welcome.css — the description requires "CSS code should be split too." See App.css for current welcome rules and move them.

</p>
</article>
<Header />
<Article />

Choose a reason for hiding this comment

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

After moving the welcome block into Welcome, keep App.jsx as a composition of components only (e.g. <Welcome />, <Header />, <Article />). This keeps BEM blocks and their styles isolated per component as requested. The Welcome component exists and can be used: src/components/Welcome/Welcome.jsx.

Comment on lines 3 to 17
export const Navigation = () => {
return (
<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.

This file exports Navigation as a named export (export const Navigation = ...) but the task description requires: "Tests expect you to use export default for all the components." Add a default export (for example, export default Navigation;) so the component meets the requirement and can be imported as a default import elsewhere.

// Create a Header function returning the HTML of header block

// Add a default export statement for Header component to use it in the other files
import { Navigation } from '../Navigation/Navigation';

Choose a reason for hiding this comment

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

Importing Navigation as a named import (import { Navigation } ...) conflicts with the project requirement that components use default exports. Use a default import instead (e.g. import Navigation from '../Navigation/Navigation';) and ensure Navigation file exports a default export. This keeps imports consistent with the requirement that "Tests expect you to use export default for all the components."

// Add a default export statement for Header component to use it in the other files
import { Navigation } from '../Navigation/Navigation';
import './Header.css';
import '../Navigation/Navigation.css';

Choose a reason for hiding this comment

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

This file imports Navigation CSS here (import '../Navigation/Navigation.css';) while the Navigation component should own its own CSS (Navigation.jsx already imports ./Navigation.css). Remove this redundant import to avoid duplicate style imports.

Comment on lines 12 to 16
<header className="header">
<header className="header">
<h1 className="header__title">Site Name</h1>
<Navigation />
</header>

Choose a reason for hiding this comment

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

There is a nested <header> element inside another <header>. Keep only one <header className="header"> that contains the title and <Navigation />. The nested duplicate likely causes incorrect semantics/DOM structure — remove the inner or outer one.

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 there are still a couple of requirement-level issues that block this task from being fully correct.

Critical issues that must be fixed

  1. In src/App.jsx, you still import the Navigation module as a side effect (e.g. import './components/Navigation/Navigation';). This violates the requirement that Navigation is owned and used by Header only, not by App. Please remove this import from App.jsx and ensure Header.jsx is the component that imports Navigation via import Navigation from '../Navigation/Navigation';.
  2. In src/components/Header/Header.jsx, there is a redundant import '../Navigation/Navigation.css';. The checklist explicitly states that Navigation should own its own CSS, and your Navigation.jsx already imports ./Navigation.css. Remove this extra CSS import from Header.jsx so each component is responsible for its own styles.

Once you remove the Navigation side-effect import from App.jsx and the extra Navigation.css import from Header.jsx, your component ownership and imports will align with the task requirements. Overall, your component structure and CSS separation look good, and these changes will complete the refactor cleanly.


✨ 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

src/App.jsx Outdated
import Header from './components/Header/Header';
import Article from './components/Article/Article';

import './components/Navigation/Navigation';

Choose a reason for hiding this comment

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

This line imports Navigation as a side-effect into App. Remove this import — the Navigation component should be owned/used by Header (not imported in App). Per the task: “Move the navigation into a Navigation component (you may create a folder for it) and use that component.” Ensure Navigation is exported as a default export and that Header.jsx imports it like import Navigation from '../Navigation/Navigation';.

// import a css file containig header styles
import Navigation from '../Navigation/Navigation';
import './Header.css';
import '../Navigation/Navigation.css';

Choose a reason for hiding this comment

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

This violates checklist item: "Remove the redundant import '../Navigation/Navigation.css'; from Header.jsx because the Navigation component imports its own CSS." Remove this import (the Navigation component should import its own CSS) so each component owns its styles.

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 approving your solution as part of an educational override so you can keep progressing while you learn, even though the CI currently fails due to a platform-specific dependency issue during npm install (a Windows-only Rollup binary on a Linux runner). You did a very good job structuring the React app: App.jsx composes Welcome, Header, and Article, each component lives in its own folder with its own .css file, and Navigation is correctly owned and used only by Header with its own Navigation.css [CHECKLIST ITEM #2]. Your components use default exports consistently and the JSX/CSS in Article, Header, Navigation, and Welcome is clean and focused, matching the requirement for component-scoped styling.

The main issue to address next is the CI install error: your dependencies (or package-lock.json) include @rollup/rollup-win32-x64-msvc, which only works on Windows, but the CI runs on Linux, causing EBADPLATFORM and blocking linter/tests. To fix this, regenerate package-lock.json on a Linux environment (rm -rf node_modules package-lock.json && npm install, then commit) or adjust the CI to use npm install --no-optional or run on windows-latest, depending on your course guidelines. Once that is resolved, run npm test locally to make sure everything passes and confirm your Prettier/VSCode formatting rules are applied consistently. Overall, your component design and file organization are strong; resolving the dependency/CI setup will bring the project to a fully production-ready state—well done so far and keep going.


✨ 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