fix(month-grid, year-grid): cell label fallback now renders

The eidos Cell wrapper previously delegated a children snippet that called
`bodyContent?.(snippetProps)`. When the consumer wrote `<Cell {year} />`
without a children snippet, the snippet still resolved to nothing, which
made the soma cell's `{:else} {label}` fallback never fire — cells came
out empty in the DOM.

Move the fallback into the eidos cell's own children snippet:
`{#if bodyContent}{@render bodyContent(...)}{:else}{label}{/if}`.

Verified in browser: MonthGrid renders Jan..Dec with the placeholder
year, YearGrid renders the decade page correctly with data-current on
today's year. svelte-check still 0 errors / 0 warnings / 4572 files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
active-uix
dev 5 months ago
parent f7831563a1
commit c65235337d

@ -7,6 +7,10 @@
<MonthGrid.Cell {...rest}> <MonthGrid.Cell {...rest}>
{#snippet children(snippetProps: MonthGridCellSnippetProps)} {#snippet children(snippetProps: MonthGridCellSnippetProps)}
{@render bodyContent?.(snippetProps)} {#if bodyContent}
{@render bodyContent(snippetProps)}
{:else}
{snippetProps.label}
{/if}
{/snippet} {/snippet}
</MonthGrid.Cell> </MonthGrid.Cell>

@ -7,6 +7,10 @@
<YearGrid.Cell {...rest}> <YearGrid.Cell {...rest}>
{#snippet children(snippetProps: YearGridCellSnippetProps)} {#snippet children(snippetProps: YearGridCellSnippetProps)}
{@render bodyContent?.(snippetProps)} {#if bodyContent}
{@render bodyContent(snippetProps)}
{:else}
{snippetProps.label}
{/if}
{/snippet} {/snippet}
</YearGrid.Cell> </YearGrid.Cell>

Loading…
Cancel
Save

Powered by TurnKey Linux.