You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SEO panel gives no indication that its fields are optional overrides, so an empty panel reads as "this page has no SEO".
getSeoMeta already derives sensible values when the panel is empty:
// Title: SEO panel title > caller default > content titleseo.title||defaultTitle||(typeofcontent.data.title==="string" ? content.data.title : null)// Description: SEO panel description > caller default > excerptseo.description||defaultDescription||(typeofcontent.data.excerpt==="string" ? content.data.excerpt : null)
Nothing in the admin surfaces that. On a site I maintain, all 21 pages have a completely blank SEO panel and every one of them emits a correct, page-specific title, description and canonical. The editor had no way to know that, and the reasonable reading of four empty boxes is that something is unset or broken. The two ways that goes wrong are retyping the page title into the SEO title, which duplicates content for no benefit and then silently goes stale when the page title changes, or assuming the site has no SEO at all.
Proposal
Show the value that will actually be used as placeholder text on SEO Title and Meta Description.
SeoPanel takes two optional props, defaultTitle and defaultDescription, matching the vocabulary getSeoMeta already uses for the same concept, and renders them as placeholders. ContentSettingsPanel passes data.title and data.excerpt, so the placeholder shows what will really be emitted rather than a generic hint. When there is nothing to derive from, no placeholder is rendered.
No change to generated meta, and no new translatable strings.
Notes
I have this implemented and passing typecheck, lint and the full admin suite locally, with two tests covering the placeholder appearing and being omitted. Happy to open the PR if this seems like a direction you would take.
One thing worth flagging: it will change the admin visual regression baselines, since the panel renders placeholder text where it previously rendered empty inputs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
The problem
The SEO panel gives no indication that its fields are optional overrides, so an empty panel reads as "this page has no SEO".
getSeoMetaalready derives sensible values when the panel is empty:Nothing in the admin surfaces that. On a site I maintain, all 21 pages have a completely blank SEO panel and every one of them emits a correct, page-specific title, description and canonical. The editor had no way to know that, and the reasonable reading of four empty boxes is that something is unset or broken. The two ways that goes wrong are retyping the page title into the SEO title, which duplicates content for no benefit and then silently goes stale when the page title changes, or assuming the site has no SEO at all.
Proposal
Show the value that will actually be used as placeholder text on SEO Title and Meta Description.
SeoPaneltakes two optional props,defaultTitleanddefaultDescription, matching the vocabularygetSeoMetaalready uses for the same concept, and renders them as placeholders.ContentSettingsPanelpassesdata.titleanddata.excerpt, so the placeholder shows what will really be emitted rather than a generic hint. When there is nothing to derive from, no placeholder is rendered.No change to generated meta, and no new translatable strings.
Notes
I have this implemented and passing typecheck, lint and the full admin suite locally, with two tests covering the placeholder appearing and being omitted. Happy to open the PR if this seems like a direction you would take.
One thing worth flagging: it will change the admin visual regression baselines, since the panel renders placeholder text where it previously rendered empty inputs.
All reactions