Skip to content

Enabled pintura image editing in welcome email editor#26695

Merged
EvanHahn merged 16 commits intomainfrom
enable-pintura-welcome-email
Mar 4, 2026
Merged

Enabled pintura image editing in welcome email editor#26695
EvanHahn merged 16 commits intomainfrom
enable-pintura-welcome-email

Conversation

@9larsons
Copy link
Copy Markdown
Contributor

@9larsons 9larsons commented Mar 4, 2026

closes https://linear.app/ghost/issue/NY-1125

  • added new usePinturaConfig hook to admin

@9larsons 9larsons added the deploy-to-staging Optionally deploy PR to staging label Mar 4, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 4, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

A new hook usePinturaConfig was added to the framework. The hook reads Pintura host settings and browse settings, resolves relative URLs to absolute using getGhostPaths(), and returns { jsUrl, cssUrl } or null. The hook is exported from apps/admin-x-framework/src/hooks.ts. The member email editor imports usePinturaConfig, passes the resulting pinturaConfig into its cardConfig, and includes it in the memoization dependency array.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: enabling Pintura image editing in the welcome email editor, which aligns with the PR's core purpose of adding the usePinturaConfig hook.
Description check ✅ Passed The description is related to the changeset, referencing the issue it closes and mentioning the addition of the usePinturaConfig hook that implements the feature.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch enable-pintura-welcome-email

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/admin-x-framework/src/hooks/use-pintura-config.ts`:
- Line 24: The hostPintura value is read from the wrong path; change the access
from config?.pintura to config?.hostSettings?.pintura so host-provided Pintura
URLs are picked up. Update the assignment in use-pintura-config (the hostPintura
declaration) to use the nested hostSettings property and keep the same type
assertion ({ js?: string; css?: string } | undefined) to match the Config type.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 681c67ec-2c31-443f-868a-d397a1722b56

📥 Commits

Reviewing files that changed from the base of the PR and between a72f92a and c73622f.

📒 Files selected for processing (3)
  • apps/admin-x-framework/src/hooks.ts
  • apps/admin-x-framework/src/hooks/use-pintura-config.ts
  • apps/admin-x-settings/src/components/settings/membership/member-emails/member-email-editor.tsx

@9larsons 9larsons requested a review from EvanHahn March 4, 2026 14:58
@9larsons 9larsons added the ok to merge for me You can merge this on my behalf if you want. label Mar 4, 2026
@EvanHahn
Copy link
Copy Markdown
Contributor

EvanHahn commented Mar 4, 2026

I'm going to take over this PR and get it merged.

@EvanHahn EvanHahn enabled auto-merge (squash) March 4, 2026 16:57
@ErisDS

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@ErisDS

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

1 similar comment
@github-actions

This comment was marked as outdated.

@EvanHahn EvanHahn disabled auto-merge March 4, 2026 20:58
@EvanHahn EvanHahn enabled auto-merge (squash) March 4, 2026 20:59
@github-actions

This comment was marked as outdated.

@EvanHahn EvanHahn merged commit aed859f into main Mar 4, 2026
29 of 30 checks passed
@EvanHahn EvanHahn deleted the enable-pintura-welcome-email branch March 4, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy-to-staging Optionally deploy PR to staging 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.

3 participants