Skip to content

feat(ipa): Add <Example.Reason> explanation component#59

Merged
andmatei merged 3 commits into
mainfrom
andmatei/ipa-ui-merge-reason
Jun 12, 2026
Merged

feat(ipa): Add <Example.Reason> explanation component#59
andmatei merged 3 commits into
mainfrom
andmatei/ipa-ui-merge-reason

Conversation

@andmatei

@andmatei andmatei commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Ticket: CLOUDP-399873

image

Adds <Example.Reason> to the <Example> family - the short explanation of why an example is correct or incorrect, authored inside <Example.Correct> / <Example.Incorrect>.

andmatei added 2 commits June 12, 2026 11:21
Renders the why-explanation inside <Example.Correct>/<Example.Incorrect>
blocks: beneath the code block, separated by the example's tinted hairline,
with an inline bold "Why:" lead-in in the verdict color. Falls back to
neutral tokens when rendered outside an example.

CLOUDP-399873
Examples are authored as <Example.Correct>/<Example.Incorrect>, so the
explanation inside them joins the same compound family (matching the
Workflow.Step convention). The component moves into the Example folder
and the top-level Reason export is removed — one way to author it.
Rendering is unchanged.

CLOUDP-399873
Example.Reason is only reachable through the Example namespace, so the
outside-an-Example fallback tokens defended a case the API no longer
invites. The position test now asserts the reason follows the code block
instead of only checking presence.

@yelizhenden-mdb yelizhenden-mdb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@andmatei andmatei merged commit e3381c3 into main Jun 12, 2026
11 checks passed
@andmatei andmatei deleted the andmatei/ipa-ui-merge-reason branch June 12, 2026 16:33
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