solidjs / solidjs/solid-router

calling navigate with relative path url "../newpath" appends to current url

Open
#502 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
1.3k
Forks
180
Avg merge
1d 13h
Merged PRs (30d)
19

Description

Describe the bug

Given I'm on a page
/show/home/fiction/333

and I call
const navigate = useNavigate();
navigate("../similar/333")

It redirects to /show/home/fiction/333/../similar/333

Your Example Website or App

None

Steps to Reproduce the Bug or Issue

Described above

Expected behavior

Expecting Router to support relative paths
It should redirect to /show/home/similar/333

Screenshots or Videos

No response

Platform

Mac + Chrome

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the useNavigate() entry point and reproduce the relative navigation from /show/home/fiction/333 to ../similar/333. Verify how the router resolves the path and confirm that completion produces /show/home/similar/333 instead of appending ../ to the current URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.