From a54fc0396b0ec574f37a842c34760f3dc54ea67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dro=C5=84?= Date: Thu, 7 Jul 2022 10:29:33 +0200 Subject: [PATCH] Deprecate secret key in webhooks (#2119) * Add deprecated message * Extract messages * Add deprecated pill to webhook secret key * Update snapshots * Move extra info to pill toolbar * Extract messages * Update snapshots * Remove preventDefault * Open link in a new tab * Update snapshots * Fix linter issue * Make webhooks active by default when creating new ones * Update snapshots --- locale/defaultMessages.json | 11 ++ src/intl.ts | 4 + .../__snapshots__/Stories.test.ts.snap | 149 +++++++++++++----- .../WebhookDetailsPage/WebhookDetailsPage.tsx | 2 +- .../components/WebhookInfo/WebhookInfo.tsx | 51 +++++- .../components/WebhookInfo/messages.ts | 10 ++ src/webhooks/components/WebhookInfo/styles.ts | 13 ++ 7 files changed, 201 insertions(+), 39 deletions(-) create mode 100644 src/webhooks/components/WebhookInfo/styles.ts diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 345c9468b..9c4b4ab7f 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -324,6 +324,10 @@ "context": "field is optional", "string": "(Optional)" }, + "0kPdlb": { + "context": "deprecated secret key toolbar label", + "string": "Use RS256 signature instead." + }, "0krqBj": { "context": "page header", "string": "Order no. {orderNumber} - Refund" @@ -5710,6 +5714,10 @@ "context": "copied to clipboard alert title", "string": "Copied to clipboard" }, + "hnRRUe": { + "context": "docs link label", + "string": "Learn more..." + }, "ho75Lr": { "context": "status label deactivated", "string": "Deactivated" @@ -7832,6 +7840,9 @@ "context": "button", "string": "View products" }, + "z9c6/C": { + "string": "Deprecated" + }, "z9wQ/U": { "context": "no variant stock in warehouse", "string": "No Stock" diff --git a/src/intl.ts b/src/intl.ts index d8a1dec2d..63c6a0384 100644 --- a/src/intl.ts +++ b/src/intl.ts @@ -178,6 +178,10 @@ export const commonMessages = defineMessages({ defaultMessage: "Can’t fulfill until payment is captured", description: "disabled option description", }, + deprecated: { + id: "z9c6/C", + defaultMessage: "Deprecated", + }, }); export const errorMessages = defineMessages({ diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index aeab3c1e0..730926308 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -26396,15 +26396,26 @@ exports[`Storyshots Views / Apps / Webhooks / Webhook details default 1`] = ` Secret Key
+
+
+ + Deprecated + +
+