Repository navigation
fix(admin): show OG image picker for any SEO-enabled collection - #957
Conversation
The OG image control was rendered inline next to a content field whose slug was literally `featured_image`. Collections without that exact field (e.g. typical Pages) had no way to set a social preview image even with SEO enabled. Move the picker into SeoPanel so it appears in the sidebar alongside the other SEO fields, decoupled from the schema.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | 4b76e5e | May 08 2026, 07:24 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-perf-coordinator | 4b76e5e | May 08 2026, 07:23 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-i18n | 4b76e5e | May 08 2026, 07:23 PM |
🦋 Changeset detectedLatest commit: 4b76e5e The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 4b76e5e | May 08 2026, 07:24 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 4b76e5e | May 08 2026, 07:25 PM |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
There was a problem hiding this comment.
Pull request overview
This PR fixes a limitation in the admin content editor where the OG image picker was only available when a collection had an image field literally named featured_image. It relocates the OG image control into the SeoPanel sidebar so any SEO-enabled collection can set a social preview image.
Changes:
- Render
SeoImageFieldinsideSeoPanelso the OG image picker appears alongside other SEO fields. - Remove the special-case OG image rendering logic tied to the
featured_imagefield inContentEditor. - Update
SeoPanelcomponent tests to include react-query context and add coverage for the OG image control/preview.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/admin/tests/components/SeoPanel.test.tsx | Adds a QueryClient wrapper for tests and new assertions ensuring OG image UI renders in the panel. |
| packages/admin/src/components/SeoPanel.tsx | Mounts SeoImageField in the SEO sidebar panel. |
| packages/admin/src/components/ContentEditor.tsx | Removes the inline OG image picker that depended on a featured_image field. |
| .changeset/seo-og-image-in-panel.md | Adds a patch changeset documenting the bug fix and new behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
What does this PR do?
The OG image control was rendered inline next to a content field whose slug had to be literally
featured_image. Collections without that exact field (e.g. typical Pages) had no way to set a social preview image even with SEO enabled in the schema -- theSeoPanelsidebar only shows Title / Description / Canonical / NoIndex.This PR moves the OG image picker into
SeoPanelitself so it appears in the sidebar alongside the other SEO fields, decoupled from the schema. Any collection withseo: truein supports now gets the picker, regardless of which fields it has.The picker is the same
SeoImageFieldcomponent as before; only its mount point changed. Server-side handling is unchanged --SeoImageFieldstill emits a partial{ image: url }, and the existingSeoRepository.upsertcorrectly preserves other columns whenimageis the only key.Closes #
Type of change
Checklist
pnpm typecheckpassespnpm lintpasses (warning count unchanged from main baseline)pnpm testpasses (admin: 863/863, including 2 new SeoPanel tests)pnpm formathas been runmessages.pochanges except in translation PRs -- a workflow extracts catalogs on merge tomain. (No new strings; existingOG Image/Select OG imagealready localized inSeoImageField.)AI-generated code disclosure
Screenshots / test output
Visual check confirmed by maintainer locally.
Test output: