Skip to content

Commit

Permalink
chore(dashboard): batch of small fixes (#6977)
Browse files Browse the repository at this point in the history
  • Loading branch information
LetItRock authored Nov 13, 2024
1 parent 9fedf50 commit 899d78a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const MenuItem = ({
<span className="text-xs">{children}</span>
{disabled && (
<Badge kind="pill" variant="soft" className="ml-auto opacity-40">
<BadgeContent variant="neutral">soon</BadgeContent>
<BadgeContent variant="neutral">coming soon</BadgeContent>
</Badge>
)}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export function ConfigureWorkflow() {
<FormField
control={control}
name="name"
defaultValue=""
render={({ field }) => (
<FormItem>
<FormLabel>Workflow Name</FormLabel>
Expand All @@ -82,6 +83,7 @@ export function ConfigureWorkflow() {
<FormField
control={control}
name="workflowId"
defaultValue=""
render={({ field }) => (
<FormItem>
<FormLabel>Workflow Identifier</FormLabel>
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/workflow-editor/nodes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export const AddNode = (_props: NodeProps<NodeType>) => {
}

return (
<div className="flex w-[300px] justify-center">
<div className="flex w-[300px] cursor-pointer justify-center">
<Handle isConnectable={false} className={handleClassName} type="target" position={Position.Top} id="a" />
<AddStepMenu
visible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { StepEditor } from '@/components/workflow-editor/steps/step-editor';
import { useFetchStep } from '@/hooks/use-fetch-step';
import { VisuallyHidden } from '@/components/primitives/visually-hidden';
import { PageMeta } from '@/components/page-meta';
import { getStepBase62Id } from '@/utils/step';

const transitionSetting = { ease: [0.29, 0.83, 0.57, 0.99], duration: 0.4 };

Expand All @@ -27,7 +28,10 @@ export const EditStepSidebar = () => {
});

const { step } = useFetchStep({ workflowSlug, stepSlug });
const stepType = useMemo(() => workflow?.steps.find((el) => el.slug === stepSlug)?.type, [stepSlug, workflow]);
const stepType = useMemo(
() => workflow?.steps.find((el) => getStepBase62Id(el.slug) === getStepBase62Id(stepSlug))?.type,
[stepSlug, workflow]
);

const handleCloseSidebar = () => {
navigate('../', { relative: 'path' });
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/workflow-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const WorkflowList = () => {
) : (
<>
{workflowsQuery.data.workflows.map((workflow) => (
<WorkflowRow workflow={workflow} />
<WorkflowRow key={workflow._id} workflow={workflow} />
))}
</>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/src/components/workflow-steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export const WorkflowSteps = (props: WorkflowStepsProps) => {
return (
<div className="flex items-center">
<>
{firstSteps.map((step) => (
<WorkflowStep key={step} step={step} className="-ml-2 first-of-type:ml-0" />
{firstSteps.map((step, idx) => (
<WorkflowStep key={`${step}_${idx}`} step={step} className="-ml-2 first-of-type:ml-0" />
))}
{restSteps.length > 1 && <Step className="-ml-2">+{restSteps.length}</Step>}
</>
Expand Down

0 comments on commit 899d78a

Please sign in to comment.