From c41cf9a2d4d45207d47a7812a8139baca6a6fc4e Mon Sep 17 00:00:00 2001
From: "Eyo O. Eyo" <7893459+eokoneyo@users.noreply.github.com>
Date: Thu, 2 Jan 2025 13:01:17 +0100
Subject: [PATCH] use info notice for color mode change notification toast
(#205364)
## Summary
This PR changes the toast notification for instances when the color mode
changes from a toast that signifies a success operation to one that
denotes the presentation of an information.
### Before
### After
---
.../src/handle_system_colormode_change.test.ts | 2 +-
.../src/handle_system_colormode_change.tsx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/core/chrome/core-chrome-browser-internal/src/handle_system_colormode_change.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/handle_system_colormode_change.test.ts
index 0b190d57d4e1d..ff06ca6b52e5c 100644
--- a/packages/core/chrome/core-chrome-browser-internal/src/handle_system_colormode_change.test.ts
+++ b/packages/core/chrome/core-chrome-browser-internal/src/handle_system_colormode_change.test.ts
@@ -206,7 +206,7 @@ describe('handleSystemColorModeChange', () => {
expect(notifications.toasts.addSuccess).not.toHaveBeenCalled();
expect(type).toBe('change');
cb({ matches: true } as any); // The system changed to dark mode
- expect(notifications.toasts.addSuccess).toHaveBeenCalledWith(
+ expect(notifications.toasts.addInfo).toHaveBeenCalledWith(
expect.objectContaining({
text: expect.any(Function),
title: 'System color mode updated',
diff --git a/packages/core/chrome/core-chrome-browser-internal/src/handle_system_colormode_change.tsx b/packages/core/chrome/core-chrome-browser-internal/src/handle_system_colormode_change.tsx
index 01504fdfb1570..6eee4233d6095 100644
--- a/packages/core/chrome/core-chrome-browser-internal/src/handle_system_colormode_change.tsx
+++ b/packages/core/chrome/core-chrome-browser-internal/src/handle_system_colormode_change.tsx
@@ -103,7 +103,7 @@ export async function handleSystemColorModeChange({
// we actually apply set the dark/light color mode of the page.
currentDarkModeValue = isDarkMode;
} else if (currentDarkModeValue !== isDarkMode) {
- notifications.toasts.addSuccess(
+ notifications.toasts.addInfo(
{
title: i18n.translate('core.ui.chrome.appearanceChange.successNotificationTitle', {
defaultMessage: 'System color mode updated',