Skip to content

feat(ui): remove success icon - #1863

Merged
franzheidl merged 6 commits into
mainfrom
franz-remove-success-icon-1669
Aug 5, 2026
Merged

feat(ui): remove success icon#1863
franzheidl merged 6 commits into
mainfrom
franz-remove-success-icon-1669

Conversation

@franzheidl

@franzheidl franzheidl commented Aug 5, 2026

Copy link
Copy Markdown
Member

This PR removes the success icon (for rationale see #1669), and returns check circle instead when calling success, and adds a test and necessary comments for the replacement.

Summary

Changes Made

  • Remove import of success icon
  • Update the Icon component to return check circle when success is called
  • Add test to make sure the replacement works as expected

Related Issues

Closes #1669

Testing Instructions

  1. pnpm i
  2. pnpm run test Icon

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.
  • I have created a changeset for my changes.

PR Manifesto

Review the PR Manifesto for best practises.

Return `check circle` instead. See #1669

Signed-off-by: Franz Heidl <franz.heidl@sap.com>
Copilot AI lite review requested due to automatic review settings August 5, 2026 14:51
@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 686430e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@cloudoperators/juno-ui-components Patch
@cloudoperators/juno-app-carbon Patch
@cloudoperators/juno-app-doop Patch
@cloudoperators/juno-app-example Patch
@cloudoperators/juno-app-greenhouse Patch
@cloudoperators/juno-app-heureka Patch
@cloudoperators/juno-app-supernova Patch
@cloudoperators/juno-app-template Patch
@cloudoperators/juno-messages-provider Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Signed-off-by: Franz Heidl <franz.heidl@sap.com>
@franzheidl
franzheidl marked this pull request as ready for review August 5, 2026 14:53
@franzheidl
franzheidl requested a review from a team as a code owner August 5, 2026 14:53
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-05 16:02 UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ui-components Icon implementation to retire the success icon SVG and make success resolve to the checkCircle icon instead, including Storybook notes and a test update to validate the alias behavior.

Changes:

  • Removed the check_box.svg (success) SVG import and mapped KnownIconsEnum.success to render check_circle.svg (CheckCircle).
  • Added explanatory comments in the Icon implementation and in Storybook for success/checkCircle equivalence.
  • Updated/added tests around success rendering behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
packages/ui-components/src/components/Icon/Icon.component.tsx Removes success SVG import; renders CheckCircle for success with explanatory comment.
packages/ui-components/src/components/Icon/Icon.test.tsx Updates success expectations and adds a test for the alias behavior.
packages/ui-components/src/components/Icon/Icon.stories.ts Adds Storybook notes documenting the successcheckCircle aliasing rationale.

Comment thread packages/ui-components/src/components/Icon/Icon.component.tsx
Comment thread packages/ui-components/src/components/Icon/Icon.test.tsx
Comment thread packages/ui-components/src/components/Icon/Icon.component.tsx Outdated
Comment thread packages/ui-components/src/components/Icon/Icon.stories.ts Outdated
Comment thread packages/ui-components/src/components/Icon/Icon.stories.ts Outdated
Copilot AI review requested due to automatic review settings August 5, 2026 14:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (5)

packages/ui-components/src/components/Icon/Icon.stories.ts:164

  • The comment uses "has been sundown" which is grammatically incorrect in this context; use a past participle like "has been sunset" to keep the note clear and professional.
  // Note: `success` and `checkCircle` return the same icon. `success` (check_box.svg) has been sundown
  // in favour of `checkCircle` to avoid visual inconsistency between two filled checkmark icons.

packages/ui-components/src/components/Icon/Icon.stories.ts:437

  • The comment uses "has been sundown" which is grammatically incorrect in this context; use a past participle like "has been sunset" to keep the note clear and professional.
  // Note: `success` and `checkCircle` return the same icon. `success` (check_box.svg) has been sundown
  // in favour of `checkCircle` to avoid visual inconsistency between two filled checkmark icons.

packages/ui-components/src/components/Icon/Icon.component.tsx:815

  • The comment uses "has been sundown" which is grammatically incorrect in this context; use a past participle like "has been sunset" to make the rationale easier to understand.
      // `success` (check_box.svg) has been sundown in favour of `checkCircle` to avoid visual inconsistency.
      // The `success` name is kept as a valid alias so existing callers continue to work.

packages/ui-components/src/components/Icon/Icon.test.tsx:280

  • These two tests currently assert the same behavior (rendering icon="success" results in alt="checkCircle"), so one of them is redundant and adds maintenance cost without increasing coverage. Consider consolidating into a single alias-focused test.
  test("renders a success icon", () => {
    render(<Icon icon="success" />)
    expect(screen.getByRole("img")).toBeInTheDocument()
    expect(screen.getByRole("img")).toHaveAttribute("alt", "checkCircle")
  })

.changeset/witty-meals-know.md:5

  • This changeset entry has a mismatched backtick ("check circle´") which will break Markdown rendering, and the wording suggests the success icon is removed entirely even though it remains as an alias. Update the text to reflect the alias behavior and use the correct icon name (checkCircle`).
feat(ui): remove `success` icon, return `check circle´ instead when `success` is called

keep alt „success“ when `success` was called, even though we technically return `check circle`

Signed-off-by: Franz Heidl <franz.heidl@sap.com>
Signed-off-by: Franz Heidl <franz.heidl@sap.com>
Signed-off-by: Franz Heidl <franz.heidl@sap.com>
Signed-off-by: Franz Heidl <franz.heidl@sap.com>
Copilot AI review requested due to automatic review settings August 5, 2026 15:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (2)

packages/ui-components/src/components/Icon/Icon.test.tsx:287

  • This test can produce a false positive: if either SVG has no (or the query selector changes), both getAttribute("d") calls return null and the equality assertion still passes. Add explicit assertions that the path elements exist before comparing their d attributes.
    const { container: successContainer } = render(<Icon icon="success" />)
    const { container: checkCircleContainer } = render(<Icon icon="checkCircle" />)
    const successPath = successContainer.querySelector("svg path")?.getAttribute("d")
    const checkCirclePath = checkCircleContainer.querySelector("svg path")?.getAttribute("d")
    expect(successPath).toEqual(checkCirclePath)

.changeset/witty-meals-know.md:5

  • The changeset message has a mismatched backtick and a stray accent in check circle´. It should refer to the actual icon name checkCircle and keep backticks balanced.
feat(ui): remove `success` icon, return `check circle´ instead when `success` is called

@franzheidl
franzheidl merged commit 0a81007 into main Aug 5, 2026
25 checks passed
@franzheidl
franzheidl deleted the franz-remove-success-icon-1669 branch August 5, 2026 16:01
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.

[Task](ui): remove success icon

4 participants