Skip to content

Improved dark mode and canvas position in the automations editor#27956

Merged
troyciesco merged 3 commits into
mainfrom
improve-automations-dark-mode
May 19, 2026
Merged

Improved dark mode and canvas position in the automations editor#27956
troyciesco merged 3 commits into
mainfrom
improve-automations-dark-mode

Conversation

@troyciesco
Copy link
Copy Markdown
Contributor

@troyciesco troyciesco commented May 18, 2026

no ref

  • makes some quick improvements to dark mode for the automations editor. This included passing the colors into react flow via its provided css variables to make it a little easier.
  • makes the workflow start closer to the top of the screen, there was a weird gap
  • hides the sidebar so the canvas takes up the full screen. this is just with css currently, i think we may need to tweak some of the sidebar setup so things are correct for e.g. screen readers

not perfect or anything yet, just gets things a bit closer
Screenshot 2026-05-18 at 3 52 20 PM

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1d5f12ab-8ead-4997-9199-a7100dd1f76d

📥 Commits

Reviewing files that changed from the base of the PR and between f3e72d1 and fb20c3d.

📒 Files selected for processing (1)
  • apps/posts/src/views/Automations/components/automation-canvas.tsx

Walkthrough

This PR migrates Automations canvas components to system design tokens, centralizes edge stroke into DEFAULT_EDGE_STROKE (var(--xy-edge-stroke)), and applies it to the tail edge. The ReactFlow setup now computes an initial viewport once and passes it as defaultViewport (removing fitView). The editor root becomes a fixed fullscreen overlay and loading/error/empty states use the updated background token.

Possibly related PRs

  • TryGhost/Ghost#27904: Updates to AddStepEdge component rendering logic align with the stroke styling variable change to --xy-edge-stroke in this PR.

Suggested reviewers

  • EvanHahn
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: improving dark mode styling and adjusting canvas position in the automations editor.
Description check ✅ Passed The description clearly relates to the changeset, detailing dark mode improvements, canvas positioning adjustments, and sidebar visibility changes made in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve-automations-dark-mode

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@troyciesco troyciesco force-pushed the improve-automations-dark-mode branch from da9b3cd to 70dcf3c Compare May 18, 2026 19:50
@troyciesco troyciesco changed the title Improved dark mode in the automations editor Improved dark mode and canvas position in the automations editor May 18, 2026
@troyciesco troyciesco force-pushed the NY-1255_add-automation-steps branch 3 times, most recently from be7fe10 to bbb406a Compare May 19, 2026 14:42
Base automatically changed from NY-1255_add-automation-steps to main May 19, 2026 16:00
@troyciesco troyciesco force-pushed the improve-automations-dark-mode branch from 70dcf3c to 2c6eeed Compare May 19, 2026 16:44
Comment thread apps/posts/src/views/Automations/editor.tsx
@troyciesco troyciesco force-pushed the improve-automations-dark-mode branch from 449de28 to d94ddd6 Compare May 19, 2026 19:27
@troyciesco troyciesco force-pushed the improve-automations-dark-mode branch from d94ddd6 to 5e673e2 Compare May 19, 2026 19:28
@troyciesco troyciesco marked this pull request as ready for review May 19, 2026 20:02

type AutomationCanvasProps = {
const getInitialViewport = (canvasWidth: number): {x: number; y: number; zoom: number} => ({
x: Math.round((canvasWidth / 2) - NODE_COLUMN_CENTER_X),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was kind of surprised that i had to do all this and that react flow didn't have an automatic "center horizontally" API that let me just adjust the y position

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I wonder if they have an issue for this somewhere...fine as is.

@troyciesco troyciesco added the ok to merge for me You can merge this on my behalf if you want. label May 19, 2026
@troyciesco troyciesco requested a review from EvanHahn May 19, 2026 20:39
Comment thread apps/posts/src/views/Automations/components/automation-canvas.tsx Outdated
Comment thread apps/posts/src/views/Automations/components/automation-canvas.tsx Outdated
troyciesco and others added 2 commits May 19, 2026 16:59
Co-authored-by: Evan Hahn <evan@ghost.org>
@troyciesco troyciesco merged commit 170f9f0 into main May 19, 2026
41 checks passed
@troyciesco troyciesco deleted the improve-automations-dark-mode branch May 19, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok to merge for me You can merge this on my behalf if you want.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants