Skip to content

Transform "documentation" tab into button #1032

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 5 commits into from
Sep 10, 2020

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Sep 3, 2020

Same as before but with a fix for the 404 pages and a test to avoid regressions.

EDIT: Back to tab style but the "documentation" tab is now a button:

mobile:

Screenshot from 2020-09-08 17-50-40

"normal":

Screenshot from 2020-09-08 17-50-37

@GuillaumeGomez GuillaumeGomez force-pushed the unify-crate-pages branch 5 times, most recently from cc367b9 to 061c983 Compare September 3, 2020 19:27
@jyn514 jyn514 added S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed A-frontend Area: Web frontend labels Sep 3, 2020
@jyn514
Copy link
Member

jyn514 commented Sep 3, 2020

Now that I think about this more, I'm not sure about this change ... it makes the /crate page very inconsistent with respect to the release pages, e.g. https://docs.rs/releases/stars.

@GuillaumeGomez
Copy link
Member Author

It's voluntary and I proposed to discussed about it. Discussion is still open. :)

@pietroalbini
Copy link
Member

Yeah, I think chasing the rustdoc styling for docs.rs is not the best choice, especially if we want to eventually make docs.rs in line with the website styling.

@GuillaumeGomez
Copy link
Member Author

Agreed, that's why when we're still in "crate focus", we have a sidebar simply because the tab system is just not adapted. However, for the release pages, it totally makes sense (in my opinion).

@pietroalbini
Copy link
Member

I'd keep everything that's not rustdoc with the same, consistent styling.

@GuillaumeGomez
Copy link
Member Author

Except that the current tab style is not appropriate for the crate pages because the behavior of the tabs isn't consistent.

@GuillaumeGomez GuillaumeGomez force-pushed the unify-crate-pages branch 2 times, most recently from 3c9ae12 to 3176fdd Compare September 4, 2020 18:47
@pietroalbini
Copy link
Member

I think having the button be more visible should help:

2020-09-07--13-09-40

@pietroalbini
Copy link
Member

Looks good! Two notes:

  • Let's add some margin between the description and the button, to avoid having the ellipsis so close to the button itself.
  • I'd add a bit more padding to the button (dunno, 10px 15px?).

@pietroalbini
Copy link
Member

Also, it seems a bit off-centered.

@GuillaumeGomez
Copy link
Member Author

Also, it seems a bit off-centered.

A bit more of precision on this one please. 😆 (I'll implement the other remarks in the meantime)

@GuillaumeGomez GuillaumeGomez changed the title Unify crate pages Transform "documentation" tab into button Sep 7, 2020
@pietroalbini
Copy link
Member

2020-09-07--15-35-35

I think the best solution to fix this is to put everything in a flexbox (not just the description) and have all the contents of the header on the left and the button on the right-

@pietroalbini
Copy link
Member

Mostly looks good now! The only two changes I'd make:

  • There are merge conflicts :)
  • There should be some padding-bottom on mobile below the crate name, ideally the same as the padding-top. Currently it's too close to the tabs.

@GuillaumeGomez
Copy link
Member Author

Done!

@jyn514
Copy link
Member

jyn514 commented Sep 8, 2020

I'm unsure about this change too :P I like making 'Documentation' a separate button, because it takes you to a whole new page. I don't like though that it's over on the right side of the screen - it's harder to find if you're looking in the old place and it's also away from the main focus, which is the crate title.

Maybe we could put it in the center instead (literally front and center ;)? Then it would be easier to find.

@GuillaumeGomez
Copy link
Member Author

It's quite difficult to miss it though. But just by curiosity, where would you put it? (screenshot done with gimp please!)

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.

This changed the 'about' page to look rather strange, I think I prefered it before:
image

@GuillaumeGomez
Copy link
Member Author

This changed the 'about' page to look rather strange, I think I prefered it before:

Then it's a bug! I'll fix it.

@jyn514
Copy link
Member

jyn514 commented Sep 10, 2020

About is fixed:
image
But releases are still broken:
image

We should really think about #996 :/

I'll review the rest in the meantime so you can fix bugs in parallel ;)

@jyn514 jyn514 added S-waiting-on-author Status: This PR is incomplete or needs to address review comments and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Sep 10, 2020
@GuillaumeGomez
Copy link
Member Author

Fixed release page as well and fixed the nits.

We should really think about #996 :/

Yep but it's a tricky thing to do... We can use the same system we use in rustdoc but we still have the issue with getting the screenshot differences. But in here, I think this problem would be very limited considering that the build is quite small in comparison.

@jyn514 jyn514 merged commit 8a51d60 into rust-lang:master Sep 10, 2020
@jyn514
Copy link
Member

jyn514 commented Sep 10, 2020

Thanks for working on this!

@GuillaumeGomez GuillaumeGomez deleted the unify-crate-pages branch September 10, 2020 18:08
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-author Status: This PR is incomplete or needs to address review comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants