rust-lang / rust-lang/docs.rs

"Source" tab is shown even when no source is present

Open
#520 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-frontend C-bug E-easy P-low
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

  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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.