From 0c0bd6f16ce7b993d3249f5a0d70c681819a65ac Mon Sep 17 00:00:00 2001 From: dcshzj <27919917+dcshzj@users.noreply.github.com> Date: Thu, 11 Jul 2024 10:11:38 +0800 Subject: [PATCH] chore: rename uri to link to differentiate --- .../renderers/controls/JsonFormsLinkControl.tsx | 2 +- packages/components/src/interfaces/complex/Button.ts | 2 +- packages/components/src/interfaces/complex/Hero.ts | 8 ++++---- packages/components/src/interfaces/complex/InfoCols.ts | 2 +- packages/components/src/interfaces/complex/Infobar.ts | 4 ++-- packages/components/src/interfaces/complex/Infopic.ts | 2 +- .../src/interfaces/internal/ContentPageHeader.ts | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/studio/src/features/editing-experience/components/form-builder/renderers/controls/JsonFormsLinkControl.tsx b/apps/studio/src/features/editing-experience/components/form-builder/renderers/controls/JsonFormsLinkControl.tsx index 87f5b2089f..6ae7a47748 100644 --- a/apps/studio/src/features/editing-experience/components/form-builder/renderers/controls/JsonFormsLinkControl.tsx +++ b/apps/studio/src/features/editing-experience/components/form-builder/renderers/controls/JsonFormsLinkControl.tsx @@ -21,7 +21,7 @@ export const jsonFormsLinkControlTester: RankedTester = rankWith( JSON_FORMS_RANKING.LinkControl, and( isStringControl, - schemaMatches((schema) => schema.format === "uri"), + schemaMatches((schema) => schema.format === "link"), ), ) diff --git a/packages/components/src/interfaces/complex/Button.ts b/packages/components/src/interfaces/complex/Button.ts index d40dea2e81..3f90487889 100644 --- a/packages/components/src/interfaces/complex/Button.ts +++ b/packages/components/src/interfaces/complex/Button.ts @@ -18,7 +18,7 @@ export const ButtonSchema = Type.Object( href: Type.String({ title: "Button URL", description: "The URL to navigate to when the button is clicked", - format: "uri", + format: "link", }), colorScheme: Type.Optional( Type.Union( diff --git a/packages/components/src/interfaces/complex/Hero.ts b/packages/components/src/interfaces/complex/Hero.ts index 9afac62376..e918f6f264 100644 --- a/packages/components/src/interfaces/complex/Hero.ts +++ b/packages/components/src/interfaces/complex/Hero.ts @@ -26,7 +26,7 @@ const HeroButtonsSchema = Type.Object({ Type.String({ title: "Button destination", description: "When this is clicked, open:", - format: "uri", + format: "link", }), ), secondaryButtonLabel: Type.Optional( @@ -40,7 +40,7 @@ const HeroButtonsSchema = Type.Object({ Type.String({ title: "Button destination", description: "When this is clicked, open:", - format: "uri", + format: "link", }), ), }) @@ -61,7 +61,7 @@ const HeroKeyHighlightSchema = Type.Object({ title: "Key highlight URL", description: "The URL to navigate to when the key highlight is clicked", - format: "uri", + format: "link", }), }), { @@ -88,7 +88,7 @@ const HeroDropdownSchema = Type.Object({ title: "Dropdown option URL", description: "The URL to navigate to when the dropdown option is clicked", - format: "uri", + format: "link", }), }), { diff --git a/packages/components/src/interfaces/complex/InfoCols.ts b/packages/components/src/interfaces/complex/InfoCols.ts index e7933b8d2a..e749f9f087 100644 --- a/packages/components/src/interfaces/complex/InfoCols.ts +++ b/packages/components/src/interfaces/complex/InfoCols.ts @@ -33,7 +33,7 @@ export const InfoBoxSchema = Type.Object({ Type.String({ title: "Button URL", description: "The URL the button should navigate to", - format: "uri", + format: "link", }), ), }) diff --git a/packages/components/src/interfaces/complex/Infobar.ts b/packages/components/src/interfaces/complex/Infobar.ts index 99402a408b..12d341c471 100644 --- a/packages/components/src/interfaces/complex/Infobar.ts +++ b/packages/components/src/interfaces/complex/Infobar.ts @@ -32,7 +32,7 @@ export const InfobarSchema = Type.Object( Type.String({ title: "Button URL", description: "The URL for the primary button", - format: "uri", + format: "link", }), ), secondaryButtonLabel: Type.Optional( @@ -45,7 +45,7 @@ export const InfobarSchema = Type.Object( Type.String({ title: "Secondary button URL", description: "The URL for the secondary button", - format: "uri", + format: "link", }), ), }, diff --git a/packages/components/src/interfaces/complex/Infopic.ts b/packages/components/src/interfaces/complex/Infopic.ts index 4eaf73c24e..97b0b11eee 100644 --- a/packages/components/src/interfaces/complex/Infopic.ts +++ b/packages/components/src/interfaces/complex/Infopic.ts @@ -42,7 +42,7 @@ export const InfopicSchema = Type.Object( Type.String({ title: "Infopic button URL", description: "The URL the button should navigate to", - format: "uri", + format: "link", }), ), isTextOnRight: Type.Optional( diff --git a/packages/components/src/interfaces/internal/ContentPageHeader.ts b/packages/components/src/interfaces/internal/ContentPageHeader.ts index e04978b314..fd8b089008 100644 --- a/packages/components/src/interfaces/internal/ContentPageHeader.ts +++ b/packages/components/src/interfaces/internal/ContentPageHeader.ts @@ -19,7 +19,7 @@ export const ContentPageHeaderSchema = Type.Object( Type.String({ title: "Button URL", description: "The URL the button should link to", - format: "uri", + format: "link", }), ), },