close
Skip to content

docs: update Svelte recommendation#4085

Merged
leaanthony merged 5 commits into
wailsapp:masterfrom
benmccann:patch-1
Mar 1, 2025
Merged

docs: update Svelte recommendation#4085
leaanthony merged 5 commits into
wailsapp:masterfrom
benmccann:patch-1

Conversation

@benmccann

@benmccann benmccann commented Feb 17, 2025

Copy link
Copy Markdown
Contributor

Description

Hi, I'm a Svelte maintainer and a community member just shared with me a link to the Svelte page. Our official recommendation would be to always use SvelteKit as your router in Svelte as it's backed by the core team and actively developed and most tutorials and content will reference it. I don't know much about svelte-spa-router, but it doesn't look like it's really been updated in a year and it feels like users will be sent down a less trodden path that way.

It looks like your docs are versioned and I'm just updating one version, so let me know if there's more I need to do on that front.

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.

Test Configuration

Please paste the output of wails doctor. If you are unable to run this command, please describe your environment in as much detail as possible.

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Documentation
    • Updated the routing guide to reflect the new recommended approach using a configuration-based setup.
    • Revised instructions to adopt SvelteKit’s static adapter configured for a single-page application.
    • Removed outdated component-based routing details.
    • Included a reference guide for further information.
    • Added a note in the changelog regarding the updated recommendation for the Svelte router.

@coderabbitai

coderabbitai Bot commented Feb 17, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

The documentation update revises the recommended routing method for Svelte-based projects. It replaces the previous guidance to use svelte-spa-router with instructions for configuring SvelteKit using adapter-static geared for SPA mode. The changes remove the older routing example and component, and instead introduce configuration exports defining prerendering and disabling server-side rendering, along with a reference link for further details. Additionally, the changelog has been updated to reflect this change in recommendation.

Changes

File Change Summary
website/versioned_docs/.../guides/routing.mdx Removed svelte-spa-router import and <Router> example; added configuration exports (export const prerender = true; and export const ssr = false;); updated guide.
website/src/pages/changelog.mdx Added a new line in the changelog under "Changed" section to note the update of the Svelte router recommendation related to pull request #4085.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant SK as SvelteKit
    participant A as Adapter-Static
    U->>SK: Request page load
    SK->>A: Check routing config (prerender=true, ssr=false)
    A-->>SK: Serve static SPA asset
    SK->>U: Return pre-rendered page
Loading

Poem

I'm a hopping rabbit with code in my paw,
Celebrating routing changes without a flaw.
Old paths retired, new exports in place,
SvelteKit now leads the static race.
With a joyful hop and a clever tweak,
Our apps get smoother—hip hooray, geek!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between afc44db and c7da6b9.

📒 Files selected for processing (1)
  • website/src/pages/changelog.mdx (1 hunks)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
website/versioned_docs/version-v2.10/guides/routing.mdx (1)

54-55: Clear Code Snippet for SPA Configuration
The snippet exporting prerender = true; and ssr = false; succinctly demonstrates the required configuration for a static SPA in SvelteKit. If possible, consider a brief inline comment in the snippet to explain that disabling SSR while enabling prerendering is intended for SPA scenarios.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f6aba68 and 66e1bb6.

📒 Files selected for processing (1)
  • website/versioned_docs/version-v2.10/guides/routing.mdx (1 hunks)
🔇 Additional comments (2)
website/versioned_docs/version-v2.10/guides/routing.mdx (2)

51-52: Update to Svelte Routing Recommendation
The updated text clearly advocates for SvelteKit’s adapter‑static SPA configuration, which is a more future‑proof choice given the active development of SvelteKit. Ensure that this recommendation aligns with other parts of the docs if legacy Svelte projects exist.


58-59: Verify and Clarify Documentation Link
The line “See the guide for full details.” uses a relative link that might be clear in the context of your docs system. However, please verify that the link resolves correctly for all users. Optionally, consider providing a more descriptive link text or URL if the docs platform supports it.

@leaanthony

Copy link
Copy Markdown
Member

Thanks 🙏 Please could you add an entry to the changelog located at website/src/pages/changelog.mdx?

@IanVS

IanVS commented Feb 19, 2025

Copy link
Copy Markdown
Contributor

Hi Ben, fun to see you here! 👋

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
website/src/pages/changelog.mdx (1)

19-19: Clarify the changelog entry details.

The new changelog entry clearly notes the updated Svelte router recommendation per PR #4085. To make it even more informative for users, consider adding a brief mention of the new recommendation (e.g. “using SvelteKit’s adapter‑static with SPA configuration” instead of svelte-spa-router). This extra detail would help readers immediately understand the change without needing to refer to the PR discussion.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 66e1bb6 and 31e1f81.

📒 Files selected for processing (1)
  • website/src/pages/changelog.mdx (1 hunks)

@leaanthony
leaanthony enabled auto-merge (squash) February 20, 2025 20:59
@leaanthony

Copy link
Copy Markdown
Member

Cheers Ben! Appreciate your time doing this 🙏 Good to see you here! 👍

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.

3 participants