Skip to content

fix#7484

Open
adityamukherjee339 wants to merge 1 commit into
refinedev:mainfrom
adityamukherjee339:bug-notification
Open

fix#7484
adityamukherjee339 wants to merge 1 commit into
refinedev:mainfrom
adityamukherjee339:bug-notification

Conversation

@adityamukherjee339

Copy link
Copy Markdown

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

  • @refinedev/core: OpenNotificationParams.type is strictly required and restricted to "success" | "error" | "progress". This prevents developers from showing a plain/neutral notification without resorting to @ts-expect-error hacks.
  • @refinedev/antd: The notification provider passes type into notification.open(). Ant Design's open() API has no type option, so it is silently dropped. As a result, non-progress notifications render without any icon or color, regardless of their actual type.
  • @refinedev/mantine: The notification provider strictly checks type === "success". All other non-success types (including "error", or any custom usages) incorrectly collapse into a unified red aesthetic with an error icon.

What is the new behavior?

  • @refinedev/core: Widened OpenNotificationParams.type to be optional and to include "info" and "warning", unlocking native support for more statuses and plain notifications.
  • @refinedev/antd: Updated the notification provider to use Ant Design's native shortcut methods (notification.success, notification.error, notification.info, notification.warning) for styled notifications, while gracefully falling back to notification.open() if the type is undefined (providing a plain notification). Updated relevant unit tests.
  • @refinedev/mantine: Introduced a comprehensive mapping for icons (IconCheck, IconX, IconInfoCircle, IconAlertCircle) and colors (primary, red, blue, orange) depending on the type. It now properly supports all defined statuses and correctly renders a neutral aesthetic if the type is undefined.

fixes #(issue-number-here)

Notes for reviewers

The widening of OpenNotificationParams.type is backwards-compatible and naturally integrates well with downstream implementations like @refinedev/mui and @refinedev/chakra-ui since their underlying libraries already safely accept undefined, "info", and "warning" statuses.

@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cce8823

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

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.

1 participant