Skip to content

feat(ui): notification manager#1689

Merged
vlad-schur-external-sap merged 21 commits into
mainfrom
vlad-notification-manager-second-iteration
Jun 10, 2026
Merged

feat(ui): notification manager#1689
vlad-schur-external-sap merged 21 commits into
mainfrom
vlad-notification-manager-second-iteration

Conversation

@vlad-schur-external-sap

@vlad-schur-external-sap vlad-schur-external-sap commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Create a first version of a NotificationManager component using Sonner. The first iteration should handle these topics (everything else will be researched later in Aurora):

  1. the story has interfaces for props
  2. the auto-dismiss-logic is removed fromToast
  3. onDismiss or similar handler can be passed for an individual notification from Notification Manager and is working (story would be nice, too)
  4. we have an duration=Infinity story

Changes Made

  • Moving lifecycle logic from Toast.component into NotificationManager.component leaving Toast as purely representational
  • Added NotificationManager which handles notifications with
    • lifecycle callbacks onDismiss / onAutoClose
    • uses juno semantics variants "info" | "warning" | "danger" | "error" | "success"
    • customization of timing and dismissal behavior
  • Added corresponding stories (infinity/dismiss) with customization from the storybook controls

Related Issues

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.

Signed-off-by: Vladislav Schur <u.shchur@sap.com>
Copilot AI review requested due to automatic review settings May 13, 2026 11:28
@changeset-bot

changeset-bot Bot commented May 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f59da03

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 Major
@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

@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-10 13:32 UTC

@vlad-schur-external-sap vlad-schur-external-sap linked an issue May 13, 2026 that may be closed by this pull request
2 tasks

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

Adds a new NotificationManager component to ui-components that wraps the Sonner toast system and exposes a Juno-flavored toast API, alongside initial Storybook stories and Vitest coverage.

Changes:

  • Introduces NotificationManager (Sonner <Toaster /> wrapper) and an exported toast API with semantic helpers (info/success/warning/error/danger).
  • Adds Storybook stories demonstrating basic usage, modal overlay behavior, and ShadowRoot caveats.
  • Adds tests covering basic rendering, semantic toast rendering, dismissal by id, and multi-manager scenarios; updates dependencies/lockfile to include sonner.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pnpm-lock.yaml Adds the sonner dependency resolution to the workspace lockfile.
packages/ui-components/package.json Adds sonner@2.0.7 to ui-components dependencies.
packages/ui-components/src/components/NotificationManager/NotificationManager.types.tsx Defines the public toast/option types and a customToast helper.
packages/ui-components/src/components/NotificationManager/NotificationManager.component.tsx Implements NotificationManager and the semantic toast wrapper over Sonner.
packages/ui-components/src/components/NotificationManager/NotificationManager.test.tsx Adds Vitest tests for toaster rendering, semantic toast content, dismissal, and scoping.
packages/ui-components/src/components/NotificationManager/NotificationManager.stories.tsx Adds Storybook stories for common integration patterns and known Sonner limitations.
packages/ui-components/src/components/NotificationManager/index.ts Exports NotificationManager and toast from the component module.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

packages/ui-components/src/components/NotificationManager/NotificationManager.component.tsx:173

  • The dismissible prop (and per-toast closeButton option) isn’t actually enforced for semantic toasts because the rendered Toast component always shows a close icon and can hide itself on click. To honor the API contract, the close control should be hidden/disabled when dismissal is not allowed (and ideally dismissal should always go through Sonner’s dismiss).
    return customToast(
      ({ dismiss }) => (
        <Toast variant={variant} onDismiss={dismiss}>
          <div className="jn:flex jn:flex-col jn:gap-1">
            <div>{title}</div>
            {description ? <div className="jn:text-theme-medium">{description}</div> : null}
          </div>
        </Toast>

Signed-off-by: Vladislav Schur <u.shchur@sap.com>
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
@vlad-schur-external-sap vlad-schur-external-sap marked this pull request as ready for review June 5, 2026 10:15
…asts, add changeset

Signed-off-by: Vladislav Schur <u.shchur@sap.com>
@vlad-schur-external-sap vlad-schur-external-sap force-pushed the vlad-notification-manager-second-iteration branch from f9f8f56 to b16b25e Compare June 5, 2026 10:16

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 11 out of 12 changed files in this pull request and generated 5 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread packages/ui-components/src/components/Toast/Toast.component.tsx Outdated
Comment thread packages/ui-components/src/components/Toast/Toast.component.tsx Outdated
Comment thread .changeset/hip-parts-show.md Outdated
Signed-off-by: Vladislav Schur <u.shchur@sap.com>

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 11 out of 12 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread .changeset/hip-parts-show.md Outdated

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 12 out of 13 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Signed-off-by: Vladislav Schur <u.shchur@sap.com>
@TilmanHaupt TilmanHaupt added the greenhouse-pr-build Set this label to create a preview image which will automatically set the `greenhouse-pr-preview` label Jun 8, 2026
TilmanHaupt
TilmanHaupt previously approved these changes Jun 8, 2026
@github-actions github-actions Bot added the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label Jun 8, 2026
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 9, 2026
Comment thread packages/ui-components/package.json Outdated
Comment thread .changeset/hip-parts-show.md Outdated
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 10, 2026
franzheidl
franzheidl previously approved these changes Jun 10, 2026

@franzheidl franzheidl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread packages/ui-components/package.json Outdated
Signed-off-by: Vladislav Schur <u.shchur@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 10, 2026

@franzheidl franzheidl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@edda edda 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.

Looks really good!

@vlad-schur-external-sap vlad-schur-external-sap merged commit d09aeff into main Jun 10, 2026
25 checks passed
@vlad-schur-external-sap vlad-schur-external-sap deleted the vlad-notification-manager-second-iteration branch June 10, 2026 13:32
@github-actions github-actions Bot removed the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

greenhouse-pr-build Set this label to create a preview image which will automatically set the `greenhouse-pr-preview`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task](ui): create a first version of NotificationManager

5 participants