feat: add data-step-id anchor to StepList for validation scroll-to
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -161,7 +161,7 @@ export function StepList({ onStepContextMenu }: StepListProps) {
|
||||
return (
|
||||
<SortableStepWrapper key={step.id} id={step.id} disabled>
|
||||
{() => (
|
||||
<div ref={scrollTargetRef}>
|
||||
<div ref={scrollTargetRef} data-step-id={step.id}>
|
||||
<StepEditor
|
||||
step={step}
|
||||
stepNumber={0}
|
||||
@@ -178,7 +178,7 @@ export function StepList({ onStepContextMenu }: StepListProps) {
|
||||
return (
|
||||
<SortableStepWrapper key={step.id} id={step.id}>
|
||||
{({ dragHandleProps }) => (
|
||||
<div className="group flex items-center gap-2 border-b border-border pb-1 pt-3">
|
||||
<div className="group flex items-center gap-2 border-b border-border pb-1 pt-3" data-step-id={step.id}>
|
||||
<button
|
||||
type="button"
|
||||
className="shrink-0 cursor-grab touch-none text-muted-foreground active:cursor-grabbing"
|
||||
@@ -218,7 +218,7 @@ export function StepList({ onStepContextMenu }: StepListProps) {
|
||||
return (
|
||||
<SortableStepWrapper key={step.id} id={step.id} disabled>
|
||||
{() => (
|
||||
<div ref={scrollTargetRef}>
|
||||
<div ref={scrollTargetRef} data-step-id={step.id}>
|
||||
<StepEditor
|
||||
step={step}
|
||||
stepNumber={stepNumber}
|
||||
@@ -241,6 +241,7 @@ export function StepList({ onStepContextMenu }: StepListProps) {
|
||||
'hover:border-primary/30 hover:bg-accent/50',
|
||||
isGhost && 'border-l-2 border-dashed border-l-primary/40! opacity-60'
|
||||
)}
|
||||
data-step-id={step.id}
|
||||
onContextMenu={(e) => onStepContextMenu?.(e, step.id)}
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user