Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: create experimental template embed page for dynamic params#17999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jaaydenh merged 10 commits intomainfromjaaydenh/template-embed-page
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionssite/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,6 +64,7 @@
"@radix-ui/react-radio-group": "1.2.3",
"@radix-ui/react-scroll-area": "1.2.3",
"@radix-ui/react-select": "2.1.4",
"@radix-ui/react-separator": "1.1.7",
"@radix-ui/react-slider": "1.2.2",
"@radix-ui/react-slot": "1.1.1",
"@radix-ui/react-switch": "1.1.1",
Expand Down
78 changes: 78 additions & 0 deletionssite/pnpm-lock.yaml
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

30 changes: 30 additions & 0 deletionssite/src/components/Separator/Separator.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
import * as SeparatorPrimitive from "@radix-ui/react-separator";
/**
* Copied from shadc/ui on 06/20/2025
* @see {@link https://ui.shadcn.com/docs/components/separator}
*/
import type * as React from "react";

import { cn } from "utils/cn";

function Separator({
className,
orientation = "horizontal",
decorative = true,
...props
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
return (
<SeparatorPrimitive.Root
data-slot="separator"
decorative={decorative}
orientation={orientation}
className={cn(
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
className,
)}
{...props}
/>
);
}

export { Separator };
17 changes: 17 additions & 0 deletionssite/src/components/Skeleton/Skeleton.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
/**
* Copied from shadc/ui on 06/20/2025
* @see {@link https://ui.shadcn.com/docs/components/skeleton}
*/
import { cn } from "utils/cn";

function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="skeleton"
className={cn("bg-surface-tertiary animate-pulse rounded-md", className)}
{...props}
/>
);
}

export { Skeleton };
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,7 @@ interface DynamicParameterProps {
onChange: (value: string) => void;
disabled?: boolean;
isPreset?: boolean;
autofill: boolean;
autofill?: boolean;
}

export const DynamicParameter: FC<DynamicParameterProps> = ({
Expand DownExpand Up@@ -873,7 +873,6 @@ interface DiagnosticsProps {
diagnostics: PreviewParameter["diagnostics"];
}

// Displays a diagnostic with a border, icon and background color
export const Diagnostics: FC<DiagnosticsProps> = ({ diagnostics }) => {
return (
<div className="flex flex-col gap-4">
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,8 +29,8 @@ import { type FormikContextType, useFormik } from "formik";
import type { ExternalAuthPollingState } from "hooks/useExternalAuth";
import { ArrowLeft, CircleHelp } from "lucide-react";
import { useSyncFormParameters } from "modules/hooks/useSyncFormParameters";
import { Diagnostics } from "modules/workspaces/DynamicParameter/DynamicParameter";
import {
Diagnostics,
DynamicParameter,
getInitialParameterValues,
useValidationSchemaForDynamicParameters,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
import { templateByName } from "api/queries/templates";
import { ErrorAlert } from "components/Alert/ErrorAlert";
import { Loader } from "components/Loader/Loader";
import type { FC } from "react";
import { useQuery } from "react-query";
import { useParams } from "react-router-dom";
import TemplateEmbedPage from "./TemplateEmbedPage";
import TemplateEmbedPageExperimental from "./TemplateEmbedPageExperimental";

const TemplateEmbedExperimentRouter: FC = () => {
const { organization: organizationName = "default", template: templateName } =
useParams() as { organization?: string; template: string };
const templateQuery = useQuery(
templateByName(organizationName, templateName),
);

if (templateQuery.isError) {
return <ErrorAlert error={templateQuery.error} />;
}
if (!templateQuery.data) {
return <Loader />;
}

return (
<>
{templateQuery.data?.use_classic_parameter_flow ? (
<TemplateEmbedPage />
) : (
<TemplateEmbedPageExperimental />
)}
</>
);
};

export default TemplateEmbedExperimentRouter;
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -97,8 +97,8 @@ export const TemplateEmbedPageView: FC<TemplateEmbedPageViewProps> = ({
{!buttonValues || !templateParameters ? (
<Loader />
) : (
<divcss={{ display:"flex", alignItems: "flex-start", gap: 48 }}>
<divcss={{ flex: 1, maxWidth: 400 }}>
<divclassName="flex items-start gap-12">
<divclassName="max-w-3xl">
<VerticalForm>
<FormSection
title="Creation mode"
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp