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

Rename "stability" CSS class to "item-info" and combine document_stability with document_short #79340

Merged
merged 2 commits into from
Nov 29, 2020

Conversation

GuillaumeGomez
Copy link
Member

Follow-up of #79300

The point of this PR is to make the CSS class more accurate since it's not only about stability anymore.

r? @jyn514

@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS themes.

cc @GuillaumeGomez

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

A change occurred in the Ayu theme.

cc @Cldfire

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 23, 2020
@camelid camelid added A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 23, 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.

Seems reasonable to me - not sure 'item info' is the best possible name but it seems more clear than 'stability' at least.

src/librustdoc/html/render/mod.rs Show resolved Hide resolved
Comment on lines +1847 to 1848
document_item_info(w, cx, item, false, parent);
document_full(w, item, cx, "", false);
Copy link
Member

Choose a reason for hiding this comment

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

Why are these separate? Are there cases when you want one but not the other?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, there isn't. Let's call document_item_info inside document full. Great catch!

Copy link
Member Author

Choose a reason for hiding this comment

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

Hum actually we can't really do that in a straightforward way because in some cases, we add the information on the parent. For example:

document_item_info(w, cx, item, is_hidden, Some(parent));
if show_def_docs {
    document_full(w, item, cx, "", is_hidden);
}

And it's in multiple places. document_short has the same "problem".

Copy link
Member

Choose a reason for hiding this comment

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

Could you pass in show_def_docs as a parameter? Then it would have the same behavior, but make it hard to forget about document_item_info.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fine by me!

@jyn514 jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 24, 2020
@GuillaumeGomez
Copy link
Member Author

So, in one case, document_full's item is different than the one provided to document_item_info. So either we give two items as arguments, or keep the code "as is" (I moved document_item_info inside document_short).

@jyn514 jyn514 changed the title Rename "stability" CSS class to "item-info" Rename "stability" CSS class to "item-info" and combine document_stability with document_short Nov 28, 2020
@jyn514
Copy link
Member

jyn514 commented Nov 28, 2020

Let's keep it as-is.

@bors r+

@bors
Copy link
Contributor

bors commented Nov 28, 2020

📌 Commit be0484b has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 28, 2020
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 28, 2020
…jyn514

Rename "stability" CSS class to "item-info" and combine `document_stability` with `document_short`

Follow-up of rust-lang#79300

The point of this PR is to make the CSS class more accurate since it's not only about stability anymore.

r? `@jyn514`
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 29, 2020
Rollup of 11 pull requests

Successful merges:

 - rust-lang#79327 (Require allocator to be static for boxed `Pin`-API)
 - rust-lang#79340 (Rename "stability" CSS class to "item-info" and combine `document_stability` with `document_short`)
 - rust-lang#79363 (BTreeMap: try to enhance various comments)
 - rust-lang#79395 (Move ui if tests from top-level into `expr/if`)
 - rust-lang#79443 (Improve rustdoc JS tests error output)
 - rust-lang#79464 (Extend doc keyword feature by allowing any ident)
 - rust-lang#79484 (add enable-full-tools to freebsd builds to prevent occasional link er…)
 - rust-lang#79505 (Cleanup: shorter and faster code)
 - rust-lang#79514 (Add test for issue rust-lang#54121: order dependent trait bounds)
 - rust-lang#79516 (Remove unnecessary `mut` binding)
 - rust-lang#79528 (Fix a bootstrap comment)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 858b44a into rust-lang:master Nov 29, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 29, 2020
@GuillaumeGomez GuillaumeGomez deleted the rename-stability branch November 29, 2020 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-cleanup Category: PRs that clean code up or issues documenting cleanup. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants