Added confirmation before deleting automation emails#28309
Conversation
ref https://linear.app/tryghost/issue/NY-1301/ Deleting an email step was immediate, which made accidental removals too easy while editing an automation draft. This adds a confirmation step for email deletion while preserving the existing draft-save flow.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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-1301/ Creating a new email step left the user on the canvas, so the next edit required an extra click and the browser could scroll the canvas while focusing the sidebar. This selects the inserted email immediately and focuses its subject field without scrolling.
ref https://linear.app/tryghost/issue/NY-1301/ Email steps can now start with an empty subject, so save and publish need clear validation feedback when a subject is required. This adds a toast plus inline card errors that only appear after validation and clear as users fix the affected email steps.
ref https://linear.app/tryghost/issue/NY-1301/ Opening an email step should put the user straight into the subject field, whether the email is newly created or selected later. This moves focus ownership into the email sidebar itself and keeps the existing no-scroll behavior.
ref https://linear.app/tryghost/issue/NY-1301/ This gives editors lightweight feedback when an automation email has no body while keeping blocking save errors visually prioritized.
ref https://linear.app/tryghost/issue/NY-1301/ This prevents editors from accidentally publishing automations that contain emails without body content while keeping empty bodies as warnings instead of blocking validation errors.
ref https://linear.app/tryghost/issue/NY-1301/ This replaces the disabled tail add-step affordance with a clearer non-interactive limit indicator and clarifies the email content editing action.
ref https://linear.app/tryghost/issue/NY-1301/ This avoids showing a wait-step validation error while the user is still editing the days field and waits until focus leaves the input.
ref https://linear.app/tryghost/issue/NY-1301/ This clarifies the save failure toast and delay input error so editors get more direct recovery guidance.
ref https://linear.app/tryghost/issue/NY-1301/ This tightens the maximum-step indicator copy and keeps the background stripe treatment balanced.
|
Small drive-by note: I'd make sure we don't merge this with the "🎨" emoji (or any emoji) because this feature is not available to users yet. |
closes [NY-1301](https://linear.app/ghost/issue/NY-1301/design-onsave-warning-error) ### What changed - Added a confirmation dialog before deleting send email steps from the Automations canvas. - Kept the existing immediate deletion behavior for non-email steps. - allows saving automations with send_email steps that have an empty body/subject, but does not allow publishing the automation until those fields are filled in. - Added unit coverage for cancelling and confirming email deletion. This replaces #28309 but has a few extra pieces of cleanup and fixes merge conflicts from other automations changes --------- Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
|
closed in favor of #28364 |
What changed
Why
Deleting an email step was immediate, which made accidental removals too easy while editing an automation draft. The confirmation keeps the draft-save/publish flow intact while adding a safer interaction for email cards.
Validation
pnpm --filter @tryghost/posts test -- automations/automation-editor.test.tsx