Skip to content

Dimon#3842

Open
DmytroPAvlichenko wants to merge 6 commits into
mate-academy:masterfrom
DmytroPAvlichenko:Dimon
Open

Dimon#3842
DmytroPAvlichenko wants to merge 6 commits into
mate-academy:masterfrom
DmytroPAvlichenko:Dimon

Conversation

@DmytroPAvlichenko
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’m requesting changes because two core checklist requirements are not met, which blocks the task from being complete.

Critical issues to fix:

  1. src/App.jsx

    • Issue: The five rendered Sum instances don’t match the required props (checklist item #3). You currently have:
      • <Sum a={3} b={5} />, <Sum a={5} b={0} />, <Sum a={0} b={10} />, <Sum a={5} b={5} />, <Sum a={0} b={0} />
    • Requirement: Render exactly these five:
      • a={2} b={3}
      • a={-5} b={5}
      • a={10} only
      • b={5} only
      • no props
    • Why: This is a core functional requirement demonstrating defaults and different prop combinations.
    • How to fix: Update each invocation to the exact combinations above. Keep each on a single line.
  2. src/components/Sum/Sum.jsx

    • Issue: The paragraph text is incorrect and not using a single string interpolation (checklist item #2). It reads like “Sum or {-a + b} and {a} is {b}”.
    • Requirement: Use exactly one string interpolation with the correct wording and values: Sum of {a} and {b} is {a + b}.
    • Why: Tests/spec expect this exact sentence and a single interpolation expression.
    • How to fix: Replace the

      content with a single template literal: {Sum of ${a} and ${b} is ${a + b}}.

Minor notes:

  • Your named export and default values for a and b are good. File structure and imports look clean.

You’re close—once you align the props in App and fix the single interpolation line in Sum, this should pass. Keep going!


✨ 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/App.jsx Outdated
<p>Sum of 0 and 0 is 0</p>
{/* Replace paragraphs with Sum componets */}
{/* And remove commented lines :) */}
<Sum a={3} b={5} />
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 #3: "In App, render five instances of Sum with the following props: a={2} b={3}, a={-5} b={5}, a={10} only, b={5} only, and no props at all." The current Sum instances do not match the required props or combinations. Please update the props to match the requirements exactly.

Comment thread src/App.jsx Outdated
{/* Replace paragraphs with Sum componets */}
{/* And remove commented lines :) */}
<Sum a={3} b={5} />
<Sum a={5} b={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.

This violates checklist item #3: "In App, render five instances of Sum with the following props: a={2} b={3}, a={-5} b={5}, a={10} only, b={5} only, and no props at all." The current Sum instances do not match the required props or combinations. Please update the props to match the requirements exactly.

Comment thread src/App.jsx Outdated
{/* And remove commented lines :) */}
<Sum a={3} b={5} />
<Sum a={5} b={0} />
<Sum a={0} b={10} />
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 #3: "In App, render five instances of Sum with the following props: a={2} b={3}, a={-5} b={5}, a={10} only, b={5} only, and no props at all." The current Sum instances do not match the required props or combinations. Please update the props to match the requirements exactly.

Comment thread src/App.jsx Outdated
<Sum a={3} b={5} />
<Sum a={5} b={0} />
<Sum a={0} b={10} />
<Sum a={5} b={5} />
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 #3: "In App, render five instances of Sum with the following props: a={2} b={3}, a={-5} b={5}, a={10} only, b={5} only, and no props at all." The current Sum instances do not match the required props or combinations. Please update the props to match the requirements exactly.

Comment thread src/App.jsx Outdated
<Sum a={5} b={0} />
<Sum a={0} b={10} />
<Sum a={5} b={5} />
<Sum a={0} b={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.

This violates checklist item #3: "In App, render five instances of Sum with the following props: a={2} b={3}, a={-5} b={5}, a={10} only, b={5} only, and no props at all." The current Sum instances do not match the required props or combinations. Please update the props to match the requirements exactly.

Comment thread src/components/Sum/Sum.jsx Outdated
// export const Sum = () => ();
export const Sum = ({ a = 0, b = 0 }) => (
<p>
Sum or {-a + b} and {a} is {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: "The paragraph content must be produced using a single string interpolation, e.g., {Sum of ${a} and ${b} is ${a + b}}, rather than concatenating multiple JSX expressions." Also, the wording and values are incorrect. It should be: {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

Decision: REQUEST_CHANGES — there is a critical blocker in Sum.jsx that violates an explicit checklist requirement and likely breaks tests that check exact output.

Issues to fix (critical):

  1. Incorrect sentence construction (line with the <p> in src/components/Sum/Sum.jsx): The requirement states to use a single string interpolation inside the <p> tag. Currently, it uses separate JSX expressions for a and b, violating checklist item #2. This can cause exact-match tests to fail.
    • Why: Tests and spec require one template literal for the full sentence.
    • How to fix: Replace the <p> content with a single template literal: {Sum of ${a} and ${b} is ${a + b}}.
  2. Typo in the sentence (same line): "Sum oF" should be "Sum of" (lowercase f).
    • Why: Exact text matters for matching the specification and tests.
    • How to fix: Ensure the sentence reads exactly: Sum of ${a} and ${b} is ${a + b}.

What’s good:

  • Props a and b default to 0 correctly, and the component uses a named export. App.jsx renders the five required cases correctly and cleanly.

Make the one-line change in the <p> and correct the casing, and this should fully meet all requirements. You’re very close—nice work on the rest!


✨ 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
// export const Sum = () => ();
export const Sum = ({ a = 0, b = 0 }) => (
<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: "Use string interpolation inside tag content rather than concatenating separate JSX expressions/strings for the sentence inside

." The sentence should be constructed using a single template literal, e.g., {Sum of ${a} and ${b} is ${a + b}}. Also, there is a typo: "Sum oF" should be "Sum of".

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

Educational approval: You’re very close—great job setting up the component, using named exports, defaults for a and b, and rendering all five cases in App.jsx exactly as required.

Critical issue to address (Checklist item #2):

  • Location: src/components/Sum/Sum.jsx, inside the <p> tag
  • What/Why: The sentence is composed with multiple JSX nodes ({a}, {b}, {a + b}) instead of a single template literal. Tests expect one interpolated string for exact matching.
  • How to fix (hint): Replace the paragraph content with a single template string using interpolation, e.g., {Sum of ${a} and ${b} is ${a + b}}.

What you did well:

  • Correct default values: a = 0, b = 0
  • Clean, readable code and proper named export/import
  • App.jsx fully meets the rendering requirements

Minor improvement:

  • Double-check exact output requirements whenever tests do string matching.

You’ve got the hard parts right—apply the one-line fix and you’ll be fully compliant. Keep it up!


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

Footnotes

  1. Rate AI review example

// export const Sum = () => ();
export const Sum = ({ a = 0, b = 0 }) => (
<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: 'Use string interpolation inside the paragraph content to compose the full sentence in one expression, e.g., {Sum of ${a} and ${b} is ${a + b}}, instead of concatenating multiple JSX text and expression nodes.'

Change the content of the

tag to:

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

This ensures the output matches the exact required sentence and passes all tests.

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