Concrete
Rulesrender

concrete/render/missing-slot-marker

An editable slot, row or row field is never rendered as a selectable marker the editor can reach.

An editable slot, row or row field is never rendered as a selectable marker the editor can reach.

Graded by the render stage of concrete check, in the render venue. A violation reports this id and the file it failed at — see every rule and concrete check.

Reason

A slot nobody can select is a slot nobody can fill. The editor resolves a click to a slot through the marker in the DOM, and the fill writes to what the editor can address. The marker contract puts that marker on the element the primitive rendered, so a slot that renders no primitive — or renders one only when it already has a value, or only behind selectable={false} — is unreachable in exactly the state where someone needs to reach it: the empty one, on a brand-new page.

Fix

Render the marked element unconditionally and branch inside it: Slot.Text on an empty slot renders its element with nothing in it, which is what the editor needs to find. Keep at least one copy selectable, and render every declared item field through its binding — or declare the field locked: true if it is genuinely not editable.

Before and after

import { fact, fill, Section, section, Slot, text } from "@homepages/concrete";

export const Hero = section(
  {
    key: "hero",
    label: "Hero",
    slots: {
      headline: text.medium({
        label: "Headline",
        cap: 60,
        source: fill.write({ reads: [fact.property.description], brief: "One confident sentence on the property." }),
      }),
      kicker: text.short({
        label: "Kicker",
        cap: 30,
        source: fill.write({ reads: [fact.property.description], brief: "Two or three words above the headline." }),
      }),
    },
  },
  ({ slot }) => (
    <Section>
      <Slot.Text slot={slot.headline} as="h1" />
      {/* Nothing to click on an empty page, so the kicker can never be filled. */}
      {slot.kicker.present ? <Slot.Text slot={slot.kicker} as="p" /> : null}
    </Section>
  ),
);
import { fact, fill, Section, section, Slot, text } from "@homepages/concrete";

export const Hero = section(
  {
    key: "hero",
    label: "Hero",
    slots: {
      headline: text.medium({
        label: "Headline",
        cap: 60,
        source: fill.write({ reads: [fact.property.description], brief: "One confident sentence on the property." }),
      }),
      kicker: text.short({
        label: "Kicker",
        cap: 30,
        source: fill.write({ reads: [fact.property.description], brief: "Two or three words above the headline." }),
      }),
    },
  },
  ({ slot }) => (
    <Section>
      <Slot.Text slot={slot.headline} as="h1" />
      <Slot.Text slot={slot.kicker} as="p" className={slot.kicker.present ? "" : "opacity-60"} />
    </Section>
  ),
);

On this page