Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide "edit on" when the version is a tag #4851

Merged
merged 4 commits into from
Nov 5, 2018

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Nov 1, 2018

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

@stsewd stsewd changed the title Tests Hide "edit on" when the version is a tag Nov 1, 2018
@codecov
Copy link

codecov bot commented Nov 1, 2018

Codecov Report

Merging #4851 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #4851      +/-   ##
==========================================
+ Coverage   76.41%   76.42%   +<.01%     
==========================================
  Files         158      158              
  Lines        9990     9992       +2     
  Branches     1262     1262              
==========================================
+ Hits         7634     7636       +2     
+ Misses       2016     2015       -1     
- Partials      340      341       +1
Impacted Files Coverage Δ
readthedocs/builds/models.py 75.8% <100%> (+0.19%) ⬆️

@stsewd stsewd requested a review from a team November 1, 2018 21:17
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should think more about how we represent this data in the theme, but that's a larger issue. This is a good fix for now.

@ericholscher ericholscher merged commit 937e8f8 into readthedocs:master Nov 5, 2018
@stsewd stsewd deleted the hide-edit-on-when-tags branch November 5, 2018 17:36
@humitos
Copy link
Member

humitos commented Nov 6, 2018

Nice! This is something that have been bothering me for a while :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants