Skip to content

Show slot outlets and filled components in a fallback that <c-fill fallback=...> shows #429

Open

Description

@JuroOravec

In a component that uses Vue, <c-fill fallback="..."> lets a caller's fill show the receiving component's slot fallback. Citry compiles that fallback into the caller's template. The first change for #351 (PR #430) records the component calls in that fallback in the caller's data, so a fallback can now hold components. Two kinds of content in that fallback still raise an error, because they need something only the receiving component has.

Given this caller:

<c-Receiver>
  <c-fill name="body" fallback="fallback">{{ fallback }}</c-fill>
</c-Receiver>

each of these in Receiver's <c-slot name="body"> fallback raises "so that fallback cannot hold ...":

  1. A <c-slot> outlet, such as <c-slot name="inner"><i>inner</i></c-slot>. It chooses its content from Receiver's slots, but that choice (the selectedSlots and slotKeys records) would still be recorded in Receiver's data, which the caller's template does not read. Let a fallback shown through <c-fill fallback=...> hold a component or a <c-slot> #351 asked for these records to move with the calls. A captured Slot that the fallback renders, such as {{ icon }} with icon = slots["icon"] filled by the caller, is refused the same way, as "a '' outlet", although the author wrote no <c-slot> there.
  2. A component given fill content, such as <c-Child>child fill</c-Child>. Citry passes that fill on through a <slot> in the caller's template, and the caller's own call does not supply it.

Vue bindings that read Vue data, and @c- event handlers, in that fallback also raise an error, on elements and components alike. That is the intended behavior and is not part of this issue: the caller's template cannot reach Receiver's Vue data or handlers.

Two forwarding chains fail with an internal message

Both fail with "direct slot result moved across unrelated receivers: current='citryOccurrence...'", which does not tell the author what to change. They fail even when the fallback holds only plain HTML, such as <i>x</i>:

  • Receiver puts its <c-slot name="body"> inside a fill it gives to another component, Mid, and the caller shows that fallback through fallback=.
  • A middle component forwards its own <c-slot name="mid"> into Receiver's fill that uses fallback=, and the page fills mid with fallback= as well.

They fail the same way before the first change for #351.

Activity

  1. added
    next-sprint
    on Oct 28, 2026
  2. JuroOravec commented on Oct 28, 2026

    @JuroOravec
    MemberAuthor

    Decision for 0.7.0: option B. Content inside a fallback shown through <c-fill fallback=...> that needs the receiving component (a <c-slot> outlet, a component given fill content, a captured Slot) keeps being refused, with the clear messages from #468. Making it work (option A: record the receiver's slot choices in the caller's data and write every branch into the caller's template) is planned after 0.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    next-sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions