[pull] main from TryGhost:main - #1528
Merged
Merged
Conversation
Refines the React editor preview so the controls stay centered and the content uses the available space. Fixes [PLA-459 — Preview refinements](https://linear.app/ghost/issue/PLA-459/preview-refinements). - Centers pill-shaped format/device controls and ghost audience selectors with dropdown chevrons when space allows. Controls shift toward the title as space narrows; device controls hide below 800px, and the title and audience selectors hide below 640px, keeping format tabs and actions on one row. - Makes desktop Web previews fill the area below the header without gutters. - Groups Copy preview link and Open in new tab in an icon-only Share menu; Close uses ghost styling. - Limits desktop Email previews to 720px on a light grey canvas, using the sidebar corner radius and mobile preview shadow. Both Web and Email mobile previews use the same light grey canvas. - Keeps long newsletter and tier labels clear of the actions, and the top of mobile previews accessible on small screens. - Preserves centered loading and error states while mobile frames align to the top. - Refines Shade Select spacing globally: removes the extra chevron left margin and reduces right padding from 12px to 8px when a chevron is visible. - Makes the desktop email subject editable, saving through the editor session on blur or Enter with title fallback and a 300-character limit. Sender and subject controls align in shared columns at a local 28px height, with the subject outline always visible. Test sending waits for saved edits; failed saves preserve the entered subject. If an invalid subject blocks reopening preview, the failure screen keeps it editable so it can be corrected without losing other edits. Validation: 43 preview browser tests, 64 editor header/history browser tests, 15 preview URL unit tests, 531 editor session/tracker/field unit tests, Admin typecheck, focused lint, and commit hooks passed. Visually checked Web/Email previews and Share controls at desktop widths, 640px, and 390px mobile. Shade typecheck, lint, and all 284 unit tests also pass; Select spacing was checked in Storybook and the editor preview. Existing role permissions, audience links, and save-before-preview behavior remain covered. - [x] I've read and followed the [Contributor Guide](https://github.com/TryGhost/Ghost/blob/main/.github/CONTRIBUTING.md) - [x] I've explained my change - [x] I've written an automated test to prove my change works
closes https://linear.app/ghost/issue/NY-1622 towards https://linear.app/ghost/issue/NY-1621 This adds a new `description` column to automations. It is required (but can be blank). In addition to automated tests, I manually checked that this worked by running the migrations in a few situations and verifying that the description field was correct.
no ref The v6.66.0 npm publish failed with `E415 Symbolic link is not allowed`. The bundled Casper and Source themes ship `CLAUDE.md -> AGENTS.md` symlinks. pnpm 12.4.2's `pnpm pack` silently dropped symlinks, but 12.7.0 (bumped in #31005) keeps any that point inside the package (pnpm/pnpm#8208), and the npm registry rejects tarballs containing them. pack.mjs now removes every symlink from the extracted build tree before tarring, restoring the pre-12.7 output. Doing it generically rather than excluding the two CLAUDE.md files in `files` keeps a future symlink from breaking the release again.
no ref The public embed renderer only allows https frame ancestors, so Admin on http://localhost:2368 can't frame it and embed previews time out. Local development now keeps same-origin previews; set `embedPreviewUrl` in config.local.json to test against a renderer.
closes [NY-1617](https://linear.app/ghost/issue/NY-1617) New migration that: - creates `automations.trigger_tier_scope` column with backfill. This column is _nullable_ because it won't always be required once we add new trigger types. - creates the `automation_trigger_tiers` table I considered adding a `trigger_type` column, but all automations are still something like "member signed up", so I don't think it's worth adding that column now. Easy to add in the future. Also requires us to insert this new data for new automations created with the legacy automated emails endpoint.
closes https://linear.app/ghost/issue/NY-1636 towards https://linear.app/ghost/issue/NY-1637 This change should have no user impact. Admins will [soon][0] be able to add automations. Let's give them the permission to do this. As part of this change, I added a skeleton of this endpoint to test the permissions. [0]: https://linear.app/ghost/issue/NY-1637
towards https://linear.app/ghost/issue/NY-1618 This is a types-only change that should have no user impact.
#31108) no ref The preview workflow waits for the Docker build of the PR head SHA, then resolved the mutable pr-N tag. A push during the (up to 30 minute) wait moves pr-N, so the preview could run code other than the verified build. Resolving the per-commit sha-<short> tag closes that gap, but on pull_request events metadata-action derives it from the synthetic merge commit, which the CI run API never exposes. DOCKER_METADATA_PR_HEAD_SHA makes PR builds tag (and label) with the head SHA instead, so the preview can resolve sha-${HEAD_SHA:0:7} directly. No extra manifest is pushed, and push-event builds (which the image size report reads as its baseline) are unaffected. A missing tag fails the deploy loudly; there is deliberately no pr-N fallback.
no ref This is a test-only change that fills in some untested behavior.
towards https://linear.app/ghost/issue/NY-1618 This is a test-only change. I think it's useful on its own but it'll also make an upcoming change a little easier.
Previews always seeded the same dataset. A `preview:<profile>` label alongside `preview` now chooses how much data the preview starts with, so a change can be reviewed against an empty site, an ordinary one, or one at the scale of the largest Pro archives. The profile names are not repeated here. They are defined and validated in TryGhost/Ghost-Moya's preview/profiles.json, and this workflow passes the label suffix straight through, so adding a profile there is the only edit needed. Sending nothing keeps the old behaviour: Ghost-Moya applies its own default. Adding a profile label to an already-labelled PR redeploys, because otherwise the label would name a profile the running preview is not on. Ghost-Moya compares the requested profile against the one recorded on the Cloud Run service and reseeds when they differ. `preview` stays the switch and a profile label only modifies it, so a profile label on its own is not a request for a preview. It says that rather than reporting the label as removed, which is the likeliest first mistake and the least helpful thing to be told about it.
towards https://linear.app/ghost/issue/NY-1642 A simple increase to the limit. A frontend change will follow. (It needs to be deployed after the server changes, otherwise some requests could fail.)
towards https://linear.app/ghost/issue/NY-1621 This change should have no user impact today, but automations' "real" descriptions now render in the UI. In addition to automated tests, I manually verified this in the UI by changing the value in the database and making sure the new descriptions appear: 
no ref This change should have no user impact.
no ref This change should have no user impact. The scheduler's `schedule()` call may return a promise. If it does, we should `await` it. (If it doesn't, `await`ing does nothing.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )