docs: keep Solid cart visibility reactive in shared-state recipe - #14505
docs: keep Solid cart visibility reactive in shared-state recipe#14505mehuljariwala wants to merge 1 commit into
Conversation
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
|
Hello! Thank you for opening your first PR to Astro’s Docs! 🎉 Here’s what will happen next:
|
Description (required)
The two Solid
CartFlyoutexamples in the shared-state recipe read$isCartOpen()in a top-level ternary. Solid executes the component once, so toggling the Nano Store afterward does not open or close the cart. Wrap each cart in<Show when={$isCartOpen()}>and add theShowimport so visibility stays reactive.I extracted both snippets directly from this page and mounted them with Solid,
@nanostores/solid, and Vitest/jsdom. Four checks exercise opening and closing from both initial states: all four fail before the change and pass afterward. Only the English page is changed; translations should receive the code fix.The full docs build could not be run locally because the dependency policy rejects the existing
@lunariajs/corelockfile entry, which lacks tarball integrity. I have not changed the lockfile or relaxed that policy. The snippet checks pass independently. Prepared with AI assistance.References