Routing Forms Improvements - Rename routing_forms to routing-forms (#4546)

* Animate fields list and routes list

* Rename routing_forms slug to routing-forms

* Add comments

* Fixtypo

* Add dropdown separator for consistency

* Fix missing occurences of routing_forms and improve types for webhooks

* Fix weird error about title child is an array

* Fix webhook issues

* Fix webhook tests and issues found during fixing them

* Fix lint errors and warnings

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Hariom Balharaandkodiakhq[bot] authored and GitHub committed 2022-09-22 22:53:43 +05:30
1 parent 81aba55710
commit ce41397517
54 files changed
+296 -235

No files matched your search

+5 -5
View File
@@ -427,7 +427,7 @@ const navigation: NavigationItemType[] = [
const path = router.asPath.split("?")[0];
// During Server rendering path is /v2/apps but on client it becomes /apps(weird..)
return (
(path.startsWith(item.href) || path.startsWith("/v2" + item.href)) && !path.includes("routing_forms/")
(path.startsWith(item.href) || path.startsWith("/v2" + item.href)) && !path.includes("routing-forms/")
);
},
child: [
@@ -439,7 +439,7 @@ const navigation: NavigationItemType[] = [
// During Server rendering path is /v2/apps but on client it becomes /apps(weird..)
return (
(path.startsWith(item.href) || path.startsWith("/v2" + item.href)) &&
!path.includes("routing_forms/") &&
!path.includes("routing-forms/") &&
!path.includes("/installed")
);
},
@@ -461,10 +461,10 @@ const navigation: NavigationItemType[] = [
},
{
name: "Routing Forms",
href: "/apps/routing_forms/forms",
href: "/apps/routing-forms/forms",
icon: Icon.FiFileText,
isCurrent: ({ router }) => {
return router.asPath.startsWith("/apps/routing_forms/");
return router.asPath.startsWith("/apps/routing-forms/");
},
},
{
@@ -511,7 +511,7 @@ const Navigation = () => {
function useShouldDisplayNavigationItem(item: NavigationItemType) {
const { status } = useSession();
const { data: routingForms } = trpc.useQuery(["viewer.appById", { appId: "routing_forms" }], {
const { data: routingForms } = trpc.useQuery(["viewer.appById", { appId: "routing-forms" }], {
enabled: status === "authenticated" && requiredCredentialNavigationItems.includes(item.name),
});
return !requiredCredentialNavigationItems.includes(item.name) || !!routingForms;
+5 -1
View File
@@ -187,7 +187,11 @@ const InputField = forwardRef<HTMLInputElement, InputFieldProps>(function InputF
...passThrough
} = props;
const translatedPlaceholder = isLocaleReady ? placeholder : "";
const translatedPlaceholder = isLocaleReady
? !placeholder?.endsWith("_placeholder")
? placeholder
: ""
: "";
return (
<div className={classNames(containerClassName)}>