fix#7484
Open
adityamukherjee339 wants to merge 1 commit into
Open
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
Bugs / Features
What is the current behavior?
@refinedev/core:OpenNotificationParams.typeis strictly required and restricted to"success" | "error" | "progress". This prevents developers from showing a plain/neutral notification without resorting to@ts-expect-errorhacks.@refinedev/antd: The notification provider passestypeintonotification.open(). Ant Design'sopen()API has notypeoption, 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 checkstype === "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: WidenedOpenNotificationParams.typeto 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 tonotification.open()if thetypeis 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 thetype. It now properly supports all defined statuses and correctly renders a neutral aesthetic if thetypeis undefined.fixes #(issue-number-here)
Notes for reviewers
The widening of
OpenNotificationParams.typeis backwards-compatible and naturally integrates well with downstream implementations like@refinedev/muiand@refinedev/chakra-uisince their underlying libraries already safely acceptundefined,"info", and"warning"statuses.