Skip to content

Moved all templates that use Release or CrateDetails to Tera #849

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 13 commits into from
Jul 1, 2020

Conversation

Kixiron
Copy link
Member

@Kixiron Kixiron commented Jun 22, 2020

This is unfortunately a really large PR and I apologize, but there wasn't really any other choice since they're all interdependent on how Release and CrateDetails serialize. I didn't delete any handlebars templates since at this stage all the inter-dependence is really fuzzy and hard to discern, so I think it's just not worth the risk of deleting an entire segment of the site. It should only be 2 or three more PRs after this, so it shouldn't be a huge deal to keep them around for a bit
This is best taken by commit, each commit deals with one single template (which can amount to multiple pages in some cases).

Commit 1

Release Feed

Before

Formatted for readability

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Docs.rs</title>
    <subtitle>Recent Rust crates</subtitle>

    <link href="https://docs.rs/releases/feed" rel="self" />
    <link href="https://docs.rs/" />
    <link href="https://pubsubhubbub.appspot.com" rel="hub" />
    <link href="https://pubsubhubbub.superfeedr.com" rel="hub" />

    <id>urn:docs-rs:0.6.0-8b5fb70-2020-06-22</id>
    <updated>2020-06-22T21:37:04.673103+00:00</updated>

    <entry>
        <title>dyn-fmt-0.2.0</title>
        <link href="https://docs.rs/dyn-fmt/0.2.0/dyn_fmt/" />
        <id>urn:docs-rs:dyn-fmt:0.2.0</id>
        <updated>2020-06-22T21:37:04.673103+00:00</updated>
        <summary>Provides dynamic string format.</summary>
        <author>
            <name>docs.rs</name>
        </author>
    </entry>

</feed>

After

Pre-formatted

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Docs.rs</title>
    <subtitle>Recent Rust crates</subtitle>

    <link href="https://docs.rs/releases/feed" rel="self" />
    <link href="https://docs.rs/" />
    <link href="https://pubsubhubbub.appspot.com" rel="hub" />
    <link href="https://pubsubhubbub.superfeedr.com" rel="hub" />

    <id>urn:docs-rs:0.6.0 (ceeb7aa 2020-06-22)</id>
    <updated>2020-05-10T04:01:29.304849+00:00</updated>

        <entry>
            <title>serde-1.0.109</title>

            <link href="&#x2F;crate&#x2F;serde&#x2F;1.0.109" />
            <id>urn:docs-rs:serde:1.0.109</id>
            <updated>2020-05-10T04:01:29.304849+00:00</updated>

            <summary>
                A generic serialization&#x2F;deserialization framework
            </summary>

            <author>
                <name>docs.rs</name>
            </author>
        </entry>
</feed>

Commit 2

Home

Before

image

After

image

Commit 3

Recent Releases

Before

image

After

image

Releases by Stars

Before

image

After

image

Recent Failures

Before

image

After

My machine can't build crates for some reason

Failures by Stars

Before

image

After

My machine can't build crates for some reason

Commit 4

Authors

Before

image

After

image

Commit 5

Search

Before

image

After

image

Commit 6

Failed Search

Before

image

After

image

Failed empty Search

Before

image

After

image

@jyn514 jyn514 added S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed P-medium Medium priority labels Jun 26, 2020
@jyn514 jyn514 self-assigned this Jun 28, 2020
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 didn't get through everything, here are some initial comments.

  • Can you remove the files in templates/ that are no longer used?
  • It looks like the /releases/authors page now shows the date the latest release was built instead of the number of github stars. Was that intentional?

@jyn514
Copy link
Member

jyn514 commented Jun 28, 2020

I didn't delete any handlebars templates since at this stage all the inter-dependence is really fuzzy and hard to discern, so I think it's just not worth the risk of deleting an entire segment of the site. It should only be 2 or three more PRs after this, so it shouldn't be a huge deal to keep them around for a bit

Oops, missed this the first time. It should be pretty clear I think when part of the site is missing since it will give 404s, if we don't catch it in the test suite that's a good opportunity to improve the test suite (we can test by hand since each template only has a few corresponding pages). So I think we should try to remove them as we go.

@Kixiron
Copy link
Member Author

Kixiron commented Jun 28, 2020

The problem is that the current templates have almost no segmentation, everything at this stage is super intertwined. I can still try though, I just doubt it'll be fun
Edit: I did remove all I could

@Kixiron Kixiron force-pushed the robo-release-feed branch from 398b65e to 6df0832 Compare June 28, 2020 23:25
@Kixiron Kixiron force-pushed the robo-release-feed branch from 758efec to 9da4f57 Compare June 29, 2020 18:16
@Kixiron
Copy link
Member Author

Kixiron commented Jun 29, 2020

I addressed all comments and I changed the authors page to have stars again (Note that stars are 0 because I don't have github set up locally)

image

I also added a title to the authors page that shows the relative date to when the crate was published just for fun

image

The failure for the docker build came from #864, I fixed it in my final commit (the docker folder was renamed to dockerfiles but this wasn't reflected in dockerfiles/Dockerfile)

COPY failed: stat /var/lib/docker/tmp/docker-builder032416435/docker/entrypoint.sh: no such file or directory

@jyn514
Copy link
Member

jyn514 commented Jun 30, 2020

The failure for the docker build came from #864, I fixed it in my final commit (the docker folder was renamed to dockerfiles but this wasn't reflected in dockerfiles/Dockerfile)

Can you split that out into a separate PR so we can merge it right away?

@Kixiron
Copy link
Member Author

Kixiron commented Jun 30, 2020

I opened #867 for an independent fix

@Kixiron Kixiron force-pushed the robo-release-feed branch from 9da4f57 to 3f8c999 Compare June 30, 2020 16:47
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.

Looks good once nits are addressed

@Kixiron Kixiron force-pushed the robo-release-feed branch from 2eed0ac to 3fff667 Compare July 1, 2020 03:12
@Kixiron Kixiron force-pushed the robo-release-feed branch from e6e32d7 to bffd520 Compare July 1, 2020 15:42
@Kixiron Kixiron force-pushed the robo-release-feed branch from bffd520 to 5eedd25 Compare July 1, 2020 15:48
@Kixiron Kixiron force-pushed the robo-release-feed branch from ea4f038 to 202457f Compare July 1, 2020 16:57
@jyn514 jyn514 merged commit 2a297ce into rust-lang:master Jul 1, 2020
@Kixiron Kixiron deleted the robo-release-feed branch July 2, 2020 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium Medium priority 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.

4 participants