Skip to content

add task solution#4455

Open
Dpdpodudu wants to merge 3 commits into
mate-academy:masterfrom
Dpdpodudu:develop
Open

add task solution#4455
Dpdpodudu wants to merge 3 commits into
mate-academy:masterfrom
Dpdpodudu:develop

Conversation

@Dpdpodudu

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Your implementation has critical syntax errors that will prevent the application from rendering. Both Header.jsx and Welcome.jsx are missing return statements — the JSX blocks need to be wrapped with return( at the beginning and ); at the end. Without these, your components return undefined instead of actual UI content, which is why all 6 Header tests and 2 Welcome tests are failing in Cypress. The Article component passes correctly, so you can use that as a reference for the proper function structure. Additionally, the task requires creating a separate Navigation component folder under src/components/Navigation/, but the navigation element remains embedded in the Header component. These issues are blocking — the application won't work until the return statements are added.


✨ 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 +4 to +15
return (
<article className="article">
<h2 className="article__title">Headline</h2>
<p className="article__paragraph">
In elementum lorem eget est euismod ornare. Phasellus sit amet
pellentesque mauris. Aliquam quis malesuada ex. Nullam eu aliquam nibh.
Mauris molestie, urna accumsan ornare semper, augue nibh posuere lorem,
vitae feugiat sem magna eget massa. Vivamus quis tincidunt dolor. Fusce
efficitur, orci non vestibulum consequat, lectus turpis bibendum odio,
in efficitur leo felis sed justo. Fusce commodo iaculis orci, quis
imperdiet urna. Sed mollis facilisis lacus non condimentum. Nunc
efficitur massa non neque elementum semper. Vestibulum lorem arcu,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing return statement - the function body contains JSX but doesn't return it. Add return ( before the JSX and ); after it.

Comment on lines +3 to +7
function Article() {
return (
<article className="article">
<h2 className="article__title">Headline</h2>
<p className="article__paragraph">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing return statement - the function body contains JSX but doesn't return it. Add return ( before the JSX and ); after it.

Comment on lines +3 to +19
padding: 1em;
font-size: 140%;
position: sticky;
top: 0;
left: 0;
right: 0;
transition: opacity 0.2s ease-in-out;
text-align: center;
}

.header__title {
font-weight: 600;
display: inline;
margin: 0;
padding: 0;
font-size: inherit;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The Header function is missing return( before the JSX and ) after it. Without return, this component won't render anything. Add return( at line 3 before <header and ) after </header>; at line 19.

Comment on lines +3 to +21
padding: 1em;
font-size: 140%;
max-width: 800px;
background: white;
box-shadow: rgba(0, 0, 0, 0.05) 0 3px 15px;
}

.article__paragraph {
margin: 0;
color: #333;
}

.article__paragraph:not(:first-child) {
margin-top: 0.7em;
}

@media (min-width: 500px) {
.article {
margin: 3.5em auto 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Header component is missing the return keyword. The function body contains JSX but will return undefined instead of rendering. Add return ( before the opening <header> tag and ); after the closing </header> tag.

Comment on lines +3 to +6
padding: 1em;
font-size: 140%;
max-width: 800px;
background: white;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Welcome component is missing the return keyword. The function body contains JSX but will return undefined instead of rendering. Add return ( before the opening <section> tag.

Comment on lines +3 to +5
background: coral;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL BUG: Missing return statement. The function body contains JSX but will return undefined. Add return ( before the opening <section> tag and close with ); after </section>;

Comment thread src/components/Header/Header.jsx Outdated
Comment on lines +8 to +21
function Header() {
<header className="header">
<h1 className="header__title">Site Name</h1>
<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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Missing return statement. The JSX inside this function is never returned, so the component will render nothing. Add return ( before <header> and ); after </header>;.

Comment thread src/components/Header/Header.jsx Outdated
Comment on lines +3 to +6
// 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 './Header.css';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Missing return statement. The JSX inside this function is never returned, so the component will render nothing. Add return ( before <section> and ); after </section>;.

Comment thread src/components/Header/Header.jsx Outdated
function Header() {
<header className="header">
<h1 className="header__title">Site Name</h1>
<nav className="navigation">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The task description states: 'You may also create a folder for the Navigation component and move navigation there.' The <nav> element with .navigation__link CSS styles should be extracted into a separate Navigation component folder.

Comment thread src/components/Welcome/Welcome.jsx Outdated
Comment on lines +4 to +6
<section className="welcome">
<span className="welcome__text">Sticky Header!</span>
</section>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Missing return statement - the function body contains JSX but doesn't return it. Add return ( before <section on line 4 and ); after </section>; on line 6.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

The implementation is very close to complete, but Header.css still contains duplicate .navigation__link styles (lines 20-33) that violate the task requirement 'CSS code must be split along with components'. Since the Navigation component now has its own folder with Navigation.css, those navigation styles should only exist there. Please remove lines 20-33 (the .navigation__link styles) from Header.css to complete the CSS separation requirement.


✨ 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 +33
</p>
<p className="article__paragraph">
In ac nisi lacus. Fusce est dolor, tincidunt ut bibendum vitae,
fermentum ac quam. Aliquam pretium tristique nibh quis iaculis. In et
cursus ex, eu aliquet ex. Proin facilisis lacus sit amet sapien
ultrices, ut vehicula arcu lobortis. Vivamus mollis ipsum ut hendrerit
molestie. Morbi lacinia, sapien eu dictum dignissim, tellus tortor
congue magna, sit amet bibendum libero nisi id massa.
</p>
<p className="article__paragraph">
Donec arcu elit, euismod vel lobortis eu, fringilla sit amet dolor. Cras
congue, massa nec sagittis mollis, dui felis ultrices magna, tincidunt
finibus lorem quam in sem. Morbi odio turpis, pulvinar sit amet
vulputate quis, ultricies eu libero. Donec ac maximus neque, nec maximus

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates the task requirement 'CSS code must be split along with components'. The .navigation__link styles (lines 20-33) should not be in Header.css - they belong only in Navigation.css since there's a separate Navigation component. Remove these styles from Header.css to avoid duplication.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Your implementation is complete and meets all requirements. The App.jsx has been properly decomposed into separate components (Article, Header, Welcome, Navigation) with their own folders and co-located CSS files, and all components correctly use export default as required. The CSS is cleanly split along component boundaries - each component owns its specific styles. Great work on maintaining proper file structure and encapsulation!


✨ 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