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

Update build list and detail page UX #5916

Merged
merged 6 commits into from Jul 15, 2019

Conversation

@saadmk11
Copy link
Member

@saadmk11 saadmk11 commented Jul 11, 2019

TODO:

  • Add Tests
@saadmk11 saadmk11 requested a review from ericholscher Jul 11, 2019
@saadmk11 saadmk11 added this to In progress in Pull Request Builder via automation Jul 11, 2019
readthedocs/builds/models.py Outdated Show resolved Hide resolved
readthedocs/templates/builds/build_detail.html Outdated Show resolved Hide resolved
readthedocs/templates/core/build_list_detailed.html Outdated Show resolved Hide resolved
<a href="{{ build.version.get_external_version_url }}">{{ build.version.verbose_name }}</a>
{% else %}
{{ build.version.slug }}
{% endif %}
{% endif %}
</span>
<span class="build-commit"
Copy link
Member

@ericholscher ericholscher Jul 11, 2019

I'd also love to link the commit as well, using the same pattern.

Copy link
Member

@ericholscher ericholscher left a comment

Looks good other than this small bit.

readthedocs/projects/constants.py Outdated Show resolved Hide resolved
Copy link
Member

@ericholscher ericholscher left a comment

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.

readthedocs/builds/models.py Outdated Show resolved Hide resolved
readthedocs/builds/models.py Outdated Show resolved Hide resolved
readthedocs/builds/models.py Outdated Show resolved Hide resolved
try:
if self.project.remote_repository.account.provider == 'github':
return GITHUB_EXTERNAL_VERSION_NAME
except Exception:
Copy link
Member

@ericholscher ericholscher Jul 12, 2019

We should log this exception, otherwise it will hide real issues. What exception are we really trying to catch?

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/.
Copy link
Member

@ericholscher ericholscher Jul 12, 2019

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.

@saadmk11 saadmk11 requested a review from ericholscher Jul 12, 2019
Copy link
Member

@ericholscher ericholscher left a comment

This looks great to me. I think we can merge it.

commit=self.commit
)

return ''
Copy link
Member

@ericholscher ericholscher Jul 15, 2019

I do wonder if we should return None here, instead of ''. I don't think it matters too much though.

Copy link
Member Author

@saadmk11 saadmk11 Jul 15, 2019

for URL's I think its better to return empty string. as it will show href='' not href=None in the template.

Copy link
Member

@ericholscher ericholscher Jul 15, 2019

We should not output the link if we don't have an href attribute.

Copy link
Member

@ericholscher ericholscher Jul 15, 2019

Merging this, but we should fix it ^^

Copy link
Member Author

@saadmk11 saadmk11 Jul 16, 2019

@ericholscher Updated please see this 763b857

@ericholscher ericholscher merged commit 9f593f2 into readthedocs:gsoc-19-pr-builder Jul 15, 2019
Pull Request Builder automation moved this from In progress to Done Jul 15, 2019
@saadmk11 saadmk11 deleted the fix-build-ux branch Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants