Skip to content

add task solution#3900

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

add task solution#3900
YuliiaKulish wants to merge 2 commits into
mate-academy:masterfrom
YuliiaKulish:develop

Conversation

@YuliiaKulish
Copy link
Copy Markdown

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

The implementation is functionally correct, but it violates a required checklist rule, which is considered a blocker for this task. Specifically, in src/components/Sum/Sum.jsx, the paragraph content on the line rendering the result uses separate text and JSX expressions (e.g., Sum of {a} and {b} is {a + b}), which breaks [CHECKLIST ITEM #2]: use string interpolation inside tag content.

Required fix:

  • In src/components/Sum/Sum.jsx, update the paragraph to a single template-literal expression, for example: <p>{Sum of ${a} and ${b} is ${a + b}}</p>.

Why: The checklist explicitly requires string interpolation within the tag content, and automated checks may fail otherwise. Everything else looks good: named export, default values, correct sum, and App renders the five required instances correctly. Once you make this small style change, this should be ready to approve. Keep up the good work!


✨ 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 +2 to +3
<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: "2. [CODE STYLE] - Use string interpolation inside tag content"

The paragraph currently uses separate text and JSX expressions (Sum of {a} and {b} is {a + b}), which produces the correct output but does not follow the required style. See the checklist for the exact requirement and examples .

Consider changing the paragraph to a single template-literal expression, for example:

<p>{`Sum of ${a} and ${b} is ${a + b}`}</p>

This will satisfy the checklist and keep behavior identical. (File: src/components/Sum/Sum.jsx)

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

Great work! All core requirements are met: Sum is a named export, provides default values for a and b as 0, and renders the paragraph using a single template literal expression inside JSX. In App.jsx, you correctly render the five required cases: a=2 b=3, a=-5 b=5, a=10 only, b=5 only, and no props, and you keep short-prop JSX on one line, aligning with the style checklist. The arithmetic and handling of negatives/missing props are correct and produce the expected output.

Minor (non-blocking) suggestion: consider adding a couple of simple tests to verify the rendered text for each case, which would help catch regressions in the future. Nicely done—this is ready to merge.


✨ 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