Routing unavailable with HashRouter
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
There are unfortunately situations in which we have to use HashRouter, and I would ideally like the ability to be able to link to certain parts of the spec. So while @kaitmore's solution solves the url overwrite problem, the ability to route to a particular part of the spec from somewhere else on your site is unavailable as a result.
I don't think use BrowserRouter or disabling location updates altogether is a viable solution here. I think @TranquilMarmot's answer using URL parameters is a great idea. Thanks for the help!
Originally posted by @kbourque in https://github.com/Redocly/redoc/issues/655#issuecomment-1710392140
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the HashRouter routing entry point and trace how location updates currently affect links to parts of the spec. Investigate the URL-parameter approach mentioned in the issue, with the goal of allowing direct links to a particular spec section without the URL being overwritten.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100