Skip to content

Pronina_sum#4106

Open
ProninaMariia wants to merge 2 commits into
mate-academy:masterfrom
ProninaMariia:develop
Open

Pronina_sum#4106
ProninaMariia wants to merge 2 commits into
mate-academy:masterfrom
ProninaMariia:develop

Conversation

@ProninaMariia
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@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 mandatory checklist violations in src/components/Sum/Sum.jsx, which makes the submission not fully compliant with the task requirements. Specifically, the <p> tag currently spans multiple lines even though it has no attributes and short content, which breaks [CHECKLIST ITEM #1]; it should be written on a single line like <p>{Sum of ${a} and ${b} is ${a + b}}</p>. In the same line, the text inside the <p> uses multiple JSX interpolations (Sum of {a} and {b} is {a + b}), which violates [CHECKLIST ITEM #2] that requires using a single template string expression instead. Functionality, defaults for a and b, and the named export of Sum are all correct, and App.jsx uses the component in all five required ways, so no behavioral changes are needed. As a small cleanliness improvement (not blocking), you can also remove the leftover commented-out line at the top of Sum.jsx to keep the file tidy. Once you adjust the <p> to a single-line template string and ensure it follows the checklist style rules, your solution will fully meet the task 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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/components/Sum/Sum.jsx Outdated
Comment on lines +6 to +8
<p>
Sum of {a} and {b} is {a + b}
</p>
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 checklist item #1: "[CODE STYLE] - If you have < 3 attribues on a tag and the values are short
write the tag in one line (to make it easier to write and read)." The <p> tag has no attributes and its content is short — please put it on one line, for example: <p>{Sum of ${a} and ${b} is ${a + b}}</p>.

Comment thread src/components/Sum/Sum.jsx Outdated
export const Sum = ({ a = 0, b = 0 }) => {
return (
<p>
Sum of {a} and {b} is {a + b}
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 checklist item #2: "[CODE STYLE] - Use string interpolation inside tag content" — currently the content uses multiple JSX expressions (Sum of {a} and {b} is {a + b}). Use a single template string expression instead, e.g. {Sum of ${a} and ${b} is ${a + b}}.

Copy link
Copy Markdown

@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 meets all functional and checklist requirements for the task. The Sum component is a named export, correctly provides default values a = 0 and b = 0, and renders the required text using a single template string like Sum of ${a} and ${b} is ${a + b} in one line, satisfying the string interpolation and one-line tag rules. In App.jsx, you correctly use Sum in all five required ways (with a=2,b=3, a=-5,b=5, a=10, b=5, and with no props), which demonstrates that defaults and props are wired up properly. There are no critical issues or broken behavior that would block task completion.

One small, non-blocking improvement: in src/components/Sum/Sum.jsx, you still have a leftover commented-out line (e.g., something like // export const Sum = () => ();) at the top of the file; removing it would keep the file cleaner and more professional. Overall, this is a clear, correct implementation that follows both the functional requirements and the style checklist—nice work.


✨ 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