Skip to content

Conversation

@Kixiron
Copy link
Contributor

@Kixiron Kixiron commented Jul 4, 2020

This PR is split into commits, that's by far the best way to review it

Commit 1: Builds

Before

image

After

image

Commit 2: Errors

This commit looks larger than it actually is since I had to update the call site of every ctry! and cexpect! invocation

Before

image

After

Error message is now the page description

image

Commit 3: Crate Details

Before

image

After

The builds page is now always displayed

image

Commit 4: Source

Before

image

After

Now there's a few more icons used

image

Commit 5: Rustdoc

Before

image

After

image

Commit 6: Release Activity

Before

image

After

image

Commit 7: Build Queue

Before

image

After

image

cc @antifuchs
Closes #777, #740 and #786

@Kixiron Kixiron added A-frontend Area: Web frontend S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Jul 4, 2020
Copy link
Member

Choose a reason for hiding this comment

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

Why does this use a new base instead of reusing base.html?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

base.html injects a lot of extra style stuff for rustdoc pages, this was the simplest solution

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

Please add a screenshot of viewing sources for rust files, not just for directories.

@Kixiron Kixiron force-pushed the the-rest-of-tera branch from adf18bc to d837b48 Compare July 5, 2020 00:49
@Kixiron
Copy link
Contributor Author

Kixiron commented Jul 5, 2020

image

Comment on lines +31 to +32
{# If the crate has a homepage, show it #}
{%- if details.homepage_url -%}
Copy link
Member

Choose a reason for hiding this comment

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

Can you give a screenshot of what the details page looks like when details is None?

Copy link
Contributor Author

@Kixiron Kixiron Jul 7, 2020

Choose a reason for hiding this comment

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

The homepage link just isn't displayed, Tera treats None/null as a falsy value

Copy link
Member

Choose a reason for hiding this comment

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

This is what it looks like without the link. I'm not sure what it looks like without details altogether.

image

@Kixiron Kixiron requested a review from jyn514 July 7, 2020 15:59
@Kixiron
Copy link
Contributor Author

Kixiron commented Jul 7, 2020

I looked into trying to unify the details dropdown of crate/details.html and rustdoc/navigation.html but I'm nervous to try since navigation.html has lots of extra CSS classes, and I think that's a bit out of scope for this PR. I'd be happy to open an issue after this PR lands and do it as a follow-up, but it's quite a lot to do for one PR

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

I think that's a bit out of scope for this PR

I missed that this code was already currently duplicated. Yes, in that case this is all fine.

Comment on lines +31 to +32
{# If the crate has a homepage, show it #}
{%- if details.homepage_url -%}
Copy link
Member

Choose a reason for hiding this comment

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

This is what it looks like without the link. I'm not sure what it looks like without details altogether.

image

.set_true("javascript_highlightjs")
.set_true("package_navigation_crate_tab")
.to_resp("crate_details")
CrateDetailsPage { details }.into_response(req)
Copy link
Member

Choose a reason for hiding this comment

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

The more I look at this, the more I think this Option is not correct. If it's None, that means that no crate exists for the (name, version) pair:

return None;

So we should either unwrap() because we've guaranteed that this crate exists, or return a 404. I'm ok with making this a follow-up PR. The good news is this means the templates never have to handle the case when details is None.

@jyn514 jyn514 merged commit 5c3e6ed into rust-lang:master Jul 7, 2020
@Kixiron Kixiron deleted the the-rest-of-tera branch July 7, 2020 21:11
@jyn514 jyn514 mentioned this pull request Jul 7, 2020
@Kixiron Kixiron restored the the-rest-of-tera branch July 7, 2020 21:46
@Kixiron Kixiron mentioned this pull request Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-frontend Area: Web frontend S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No link to builds tab on crate page

2 participants