Skip to content

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

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 added the PR: work in progress Pull request is not ready for full review label Jul 11, 2019
@saadmk11 saadmk11 requested a review from ericholscher July 11, 2019 20:06
<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

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.

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.

Looks good other than this small bit.

@saadmk11 saadmk11 removed the PR: work in progress Pull request is not ready for full review label Jul 12, 2019
@saadmk11 saadmk11 requested review from ericholscher and a team July 12, 2019 15:24
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.

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:
Copy link
Member

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?

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

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.

@saadmk11 saadmk11 requested a review from ericholscher July 12, 2019 17:20
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.

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

commit=self.commit
)

return ''
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member

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 ^^

Copy link
Member Author

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

@ericholscher ericholscher merged commit 9f593f2 into readthedocs:gsoc-19-pr-builder Jul 15, 2019
@saadmk11 saadmk11 deleted the fix-build-ux branch July 16, 2019 09:13
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.

2 participants