Skip to content

docs: keep Solid cart visibility reactive in shared-state recipe - #14505

Open
mehuljariwala wants to merge 1 commit into
withastro:mainfrom
mehuljariwala:docs/solid-cart-reactivity
Open

docs: keep Solid cart visibility reactive in shared-state recipe#14505
mehuljariwala wants to merge 1 commit into
withastro:mainfrom
mehuljariwala:docs/solid-cart-reactivity

Conversation

@mehuljariwala

Copy link
Copy Markdown

Description (required)

The two Solid CartFlyout examples 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 the Show import 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/core lockfile 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

@astrobot-houston

Copy link
Copy Markdown
Contributor

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/recipes/sharing-state-islands.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@astrobot-houston

Copy link
Copy Markdown
Contributor

Hello! Thank you for opening your first PR to Astro’s Docs! 🎉

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any broken links you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Netlify 🥳.

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants