From e2258fba27908ed3c43a702f12309b11d25c7270 Mon Sep 17 00:00:00 2001 From: Nafees Nazik <84864519+G3root@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:32:20 +0530 Subject: [PATCH] Feat: webhook form UX improvement (#6448) * feat: add type and required attribute * feat: disable ping button when subscriberUrl is not present Co-authored-by: Leo Giovanetti --- packages/features/webhooks/components/WebhookForm.tsx | 2 ++ packages/features/webhooks/components/WebhookTestDisclosure.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/features/webhooks/components/WebhookForm.tsx b/packages/features/webhooks/components/WebhookForm.tsx index 5bcda67e8e..f3d1c79f98 100644 --- a/packages/features/webhooks/components/WebhookForm.tsx +++ b/packages/features/webhooks/components/WebhookForm.tsx @@ -96,6 +96,8 @@ const WebhookForm = (props: { label={t("subscriber_url")} labelClassName="font-medium text-gray-900 font-sm" value={value} + required + type="url" onChange={(e) => { formMethods.setValue("subscriberUrl", e?.target.value); if (hasTemplateIntegration({ url: e.target.value })) { diff --git a/packages/features/webhooks/components/WebhookTestDisclosure.tsx b/packages/features/webhooks/components/WebhookTestDisclosure.tsx index 6a268dd705..57907ee0df 100644 --- a/packages/features/webhooks/components/WebhookTestDisclosure.tsx +++ b/packages/features/webhooks/components/WebhookTestDisclosure.tsx @@ -28,7 +28,7 @@ export default function WebhookTestDisclosure() {