Hide "edit on" when the version is a tag #4851
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the version is a tag, user's can't edit that version, only branches can be edited.
Currently, on the rtd theme we only generate the view link (the text says edit, but it's a view link).
As mention here #1820 (comment), there is some code that was never used https://github.com/rtfd/readthedocs.org/blob/0f5d979c221da7140138359fc06660ebec6fff9b/readthedocs/doc_builder/backends/sphinx.py#L127-L132
As we don't use that on the theme, I think it can be removed (or maybe make it available to the theme?). IMO, we are fine deleting that code, the theme does a good job showing only the view link (users can figure out how to edit on each platform).
Close #1820