Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel routes #1537

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Parallel routes #1537

wants to merge 13 commits into from

Conversation

Brendonovich
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • infrastructure changes
  • Other... Please describe:

What is the current behavior?

Start's FS Routing doesn't support parallel routes

What is the new behavior?

Putting @ at the start of a filesystem route segment turns it into a slot for a parallel route, as detailed in solidjs/solid-router#426.

Implementing the example config from solidjs/solid-router#426 would look something like this with FS routing (and flat routing from #1482 for conciseness):

routes/
  (app).tsx - {props.slots.breadcrumbs} <main>{props.children}</main>
  (app)/
    o.[orgSlug]/
        index.tsx - "Org Information"
        t.[tenantSlug].tsx - "Tenant Information"
    @breadcrumbs.tsx - <header>{props.children}</header>
    @breadcrumbs/
      o.[orgSlug].tsx - <span>Org Breadcrumb</span> {props.children}
      o.[orgSlug]/
        [...rest].tsx - ensures breadcrumb is matched on all org routes
        t.[tenantSlug].tsx - <span>Tenant Breadcrumb</span>
        t.[tenantSlug]/
          [...rest].tsx - ensures breadcrumb is matched on all tenant routes

Other information

Copy link

changeset-bot bot commented Jun 11, 2024

🦋 Changeset detected

Latest commit: 8cc9d21

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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