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

[🐞] Route is broken with deep nesting #6300

Closed
mhuretski opened this issue May 12, 2024 · 4 comments
Closed

[🐞] Route is broken with deep nesting #6300

mhuretski opened this issue May 12, 2024 · 4 comments
Assignees
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@mhuretski
Copy link
Contributor

Which component is affected?

Qwik City (routing)

Describe the bug

Hi,

When using [...lang] catchall route at the root of the routing, deeply nested routes are broken if lang is not provided.

src/routes/[...lang]/
    β”‚
    β”œβ”€β”€ (app)/
    β”‚   β”œβ”€β”€ index.tsx
    β”‚   └── layout.tsx
    β”‚
    β”œβ”€β”€ some/
    β”‚   └── deep/
    β”‚       └── nested/
    β”‚           β”œβ”€β”€ [id]/
    β”‚           β”‚   └── index.tsx (broken without "lang")
    β”‚           └── index.tsx
    β”‚
    └── working/
        └── nesting/
            └── [id]/
                └── index.tsx

/some/deep/nested/some_id - broken
/some_lang/some/deep/nested/some_id - OK
/some/deep/nested - OK
/some_lang/some/deep/nested - OK
/working/nesting/some_id - OK
/some_lang/working/nesting/some_id - OK

Catchall route doesn't seem to be a great fit as an optional route, perhaps adding something like [?lang] could simplify routing logic with deep nesting to avoid this issue?

Reproduction

https://stackblitz.com/edit/qwik-starter-q65fv9?file=src%2Froutes%2F%5B...lang%5D%2F(app)%2Findex.tsx

Steps to reproduce

No response

System Info

"@builder.io/qwik": "^1.5.4",
"@builder.io/qwik-city": "^1.5.4",

Additional Information

No response

@mhuretski mhuretski added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels May 12, 2024
@JerryWu1234
Copy link
Contributor

may I pick this up ?

@gioboa
Copy link
Member

gioboa commented May 13, 2024

may I pick this up ?

Go for it πŸ‘ Thanks

@JerryWu1234
Copy link
Contributor

maybe it can directly close this Issue?

@PatrickJS
Copy link
Member

oh yeah this was fixed in 1.5.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants