"Source" tab is shown even when no source is present
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 232
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 60
Description
https://github.com/rust-lang/docs.rs/pull/519 fixed a panic happening when visiting a crate's source page when no source was available (due to a build failure), by showing a 404 page instead.
Still, the link to the source tab is unconditionally present in the navbar, even when we know it will lead to a 404 page. We should fix this by hiding the link in those cases.
Contributor guide
No contributing guide indexed for this repository
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
Review pull request #519 and trace how the crate source page and navbar decide whether source is available. Update the navbar behavior so the Source tab is absent when it would lead to a 404, while remaining present when source exists; verify both cases against the existing source-page behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100