-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Update build list and detail page UX #5916
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
Update build list and detail page UX #5916
Conversation
<a href="{{ build.version.get_external_version_url }}">{{ build.version.verbose_name }}</a> | ||
{% else %} | ||
{{ build.version.slug }} | ||
{% endif %} | ||
{% endif %} | ||
</span> | ||
<span class="build-commit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also love to link the commit as well, using the same pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than this small bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just thought more about this and I think we're changing the meaning of vcs_url
here. We want to to mean the same thing for both Internal and External versions, so we shouldn't be changing it to point at a commit, but instead still to the PR I think.
try: | ||
if self.project.remote_repository.account.provider == 'github': | ||
return GITHUB_EXTERNAL_VERSION_NAME | ||
except Exception: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should log this exception, otherwise it will hide real issues. What exception are we really trying to catch?
readthedocs/builds/models.py
Outdated
Branch/Tag Example: https://github.com/rtfd/readthedocs.org/tree/3.4.2/. | ||
Pull/merge Request Example: https://github.com/rtfd/readthedocs.org/pull/9999/. | ||
Example: https://github.com/rtfd/readthedocs.org/tree/3.4.2/. | ||
External Version Example: https://github.com/rtfd/readthedocs.org/pull/99/commits/b630b630/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want this URL to point to the PR still? Otherwise we are changing the meaning of this function based on whether the version is external or internal.
We only want specific commits to link to a commit, not the version itself. We need another function to add a specific URL to the commit I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me. I think we can merge it.
commit=self.commit | ||
) | ||
|
||
return '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do wonder if we should return None
here, instead of ''
. I don't think it matters too much though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for URL's I think its better to return empty string. as it will show href=''
not href=None
in the template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not output the link if we don't have an href
attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging this, but we should fix it ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericholscher Updated please see this 763b857
TODO: