Automation UX improvements#28337
Conversation
ref https://linear.app/tryghost/issue/NY-1318 The automation editor canvas needed direct zoom affordances for navigation. This adds a compact Shade-styled control with animated React Flow viewport actions and preset zoom options.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThis PR refactors the automations canvas editor: adds React Flow zoom controls (presets + fit), node context menus (edit/preview/delete), and NodeShell rendering; introduces EmailContentModal optional initialMode with preview-on-mount; replaces wait-step days input with an InputGroup (increment/decrement); separates edge/label hover zones for insertion buttons; decouples email modal state from selection; and extends unit tests to cover zoom, context menus, double-click email editing, wait-day controls, insertions, and hover behavior. Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ref https://linear.app/tryghost/issue/NY-1318 The automation editor add-step affordances needed to feel less loud and closer to the surrounding canvas UI. This keeps connector lines neutral, aligns the inline add button with the tail add button style, and softens the step picker hover state.
ref https://linear.app/tryghost/issue/NY-1318 The add-step picker needed to feel more deliberate when opened from the canvas. This keeps the inline plus visible while hovering the edge, opens the picker above the trigger, and gives the menu more separation from the automation nodes.
ref https://linear.app/tryghost/issue/NY-1318 Newly inserted automation steps should feel connected to the action that created them. This adds a short pop animation and selects the new node immediately so users can continue editing without an extra click.
ref https://linear.app/tryghost/issue/NY-1318 The automation connector lines should meet the node edges cleanly. Collapsing the hidden React Flow handles removes the small visual gap without changing interaction behavior.
The wait step sidebar now uses a compact input group with day steppers, making small wait-time adjustments quicker while keeping manual entry and validation intact.
Automation nodes now expose contextual actions from the canvas itself, making common editing and deletion flows reachable without first opening the sidebar.
Email automation nodes can now open the email modal directly in preview mode from the context menu, avoiding an extra sidebar step for previewing message content.
Double-clicking an email automation node now opens the email editor directly, while disabling the canvas double-click zoom that made this interaction feel unpredictable.
The automation step settings sidebar now uses a medium-weight title to better match the surrounding sidebar hierarchy.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/posts/src/views/Automations/components/automation-canvas.tsx`:
- Around line 19-20: The node entrance animation timing is mismatched: CSS uses
the class duration-300 but the JS constant NODE_ENTER_ANIMATION_DURATION is 250
and the timeout that clears newStepId removes animation classes early; fix by
aligning these timings—either update NODE_ENTER_ANIMATION_DURATION to 300 or
change the CSS class from duration-300 to duration-250, and ensure the code that
clears newStepId uses NODE_ENTER_ANIMATION_DURATION (or the chosen 300ms) so the
new node's animation classes are removed only after the animation completes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c302dca3-db4f-46f9-9d7d-15a942bf2268
📒 Files selected for processing (5)
apps/posts/src/views/Automations/components/add-step-edge.tsxapps/posts/src/views/Automations/components/automation-canvas.tsxapps/posts/src/views/Automations/components/email-modal/email-content-modal.tsxapps/posts/src/views/Automations/components/step-picker.tsxapps/posts/test/unit/views/automations/automation-editor.test.tsx
- keeps sidebar controls using explicit field labels now that the wait input contains inline action buttons - clears stale context-menu click suppression when menus are dismissed
ref https://linear.app/ghost/issue/NY-1318/small-automation-ui-delights
This PR collects a set of small UX improvements for the Automations editor canvas and step settings experience. The changes are intentionally scoped to the React automation editor UI in
apps/postsand focus on making canvas navigation, step insertion, node actions, and email-step editing feel more direct and polished.What changed
Canvas zoom controls
Fit to view.Add-step connectors and picker behavior
+button only when the pointer is over the connector hit area.+button, with wider menu sizing and stronger shadow.New-step feedback
Wait-step settings control
InputGroup.dayslabel on the left, with compact-and+steppers on the right.1and30days and respect invalid manual input.Node context menus
ContextMenucomponents frommain.Edit settingsonly.Edit settingsandDelete.Edit email bodyandPreview, separated fromDeletewith a menu separator.Edit settingsopens the existing right settings sidebar.Deleteuses the existing action deletion path, preserving chain reconnection behavior.Edit email bodyopens the email editor modal directly without opening or flashing the sidebar.Previewopens the same email editor modal with the Preview tab active by default.Email node shortcuts
Sidebar typography
Implementation notes for reviewers
apps/posts/src/views/Automations/components/automation-canvas.tsx.add-step-edge.tsxandstep-picker.tsx.initialMode?: 'edit' | 'preview'so callers can open directly into Preview without duplicating modal behavior.Files touched
apps/posts/src/views/Automations/components/automation-canvas.tsxapps/posts/src/views/Automations/components/add-step-edge.tsxapps/posts/src/views/Automations/components/step-picker.tsxapps/posts/src/views/Automations/components/email-modal/email-content-modal.tsxapps/posts/test/unit/views/automations/automation-editor.test.tsxValidation
pnpm --filter @tryghost/posts test:unit -- test/unit/views/automations/automation-editor.test.tsxpnpm --filter @tryghost/posts lintapps/posts/src/hooks/use-post-success-modal.tsaboutsite?.iconin auseMemodependency array.Out of scope
ContextMenucomponent that was merged intomain.