diff --git a/.changeset/modern-pianos-sneeze.md b/.changeset/modern-pianos-sneeze.md new file mode 100644 index 00000000000..ea335564856 --- /dev/null +++ b/.changeset/modern-pianos-sneeze.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +"Apps" link in sidebar now shows an alert if one or more apps have failed or pending webhook deliveries. This means you can see if there are issues with your apps without having to enter app details. diff --git a/.featureFlags/app_alerts.md b/.featureFlags/app_alerts.md new file mode 100644 index 00000000000..1c24f71ecb5 --- /dev/null +++ b/.featureFlags/app_alerts.md @@ -0,0 +1,11 @@ +--- +name: app_alerts +displayName: App alerts +enabled: false +payload: "default" +visible: false +--- + + +Experience new notifications displaying alerts for apps in the Dashboard. +Get meaningful information when Saleor detects issues with an app. \ No newline at end of file diff --git a/.featureFlags/generated.tsx b/.featureFlags/generated.tsx index d4eca57a7a6..f8d09f4ac7c 100644 --- a/.featureFlags/generated.tsx +++ b/.featureFlags/generated.tsx @@ -1,13 +1,18 @@ // @ts-nocheck -import A54222 from "./images/discounts-list.png" -import M51879 from "./images/improved_refunds.png" +import X82432 from "./images/app-alerts.jpg" +import J50320 from "./images/discounts-list.png" +import K65771 from "./images/improved_refunds.png" -const discounts_rules = () => (<>
+Experience new notifications displaying alerts for apps in the Dashboard.
+Get meaningful information when Saleor detects issues with an app.
Apply the new discounts rules to narrow your promotions audience. Set up conditions and channels that must be fulfilled to apply defined reward.
>) -const improved_refunds = () => (<>• Choose between automatic calculations based on selected items or enter refund amounts directly for overcharges and custom adjustments.
@@ -33,6 +38,15 @@ New filters have been added to the following pages: >) export const AVAILABLE_FLAGS = [{ + name: "app_alerts", + displayName: "App alerts", + component: app_alerts, + visible: false, + content: { + enabled: false, + payload: "default", + } +},{ name: "discounts_rules", displayName: "Discounts rules", component: discounts_rules, diff --git a/.featureFlags/images/app-alerts.jpg b/.featureFlags/images/app-alerts.jpg new file mode 100644 index 00000000000..6f35af097b4 Binary files /dev/null and b/.featureFlags/images/app-alerts.jpg differ diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index d44e748fa3e..fb14270e911 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -1013,6 +1013,9 @@ "4LRapg": { "string": "Discount removed" }, + "4MIO2H": { + "string": "Issues found.{break}Review app alerts." + }, "4PlW0w": { "context": "tracking number", "string": "Tracking Number: {trackingNumber}" diff --git a/src/apps/components/AppAlerts/SidebarAppAlert.tsx b/src/apps/components/AppAlerts/SidebarAppAlert.tsx new file mode 100644 index 00000000000..157e1d2366c --- /dev/null +++ b/src/apps/components/AppAlerts/SidebarAppAlert.tsx @@ -0,0 +1,56 @@ +import { AppSections } from "@dashboard/apps/urls"; +import { WARNING_ICON_COLOR, WARNING_ICON_COLOR_LIGHTER } from "@dashboard/colors"; +import { ExclamationIcon } from "@dashboard/icons/ExclamationIcon"; +import { ExclamationIconFilled } from "@dashboard/icons/ExclamationIconFilled"; +import { Box, Text, Tooltip } from "@saleor/macaw-ui-next"; +import React, { useState } from "react"; +import { FormattedMessage } from "react-intl"; +import { Link } from "react-router-dom"; + +import { useAppsAlert } from "./useAppsAlert"; + +const ExclamationIconComponent = () => { + const [isHovered, setIsHovered] = useState(false); + + return ( +