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

Change rustdoc style so fully qualified name does not overlap src link #53060

Merged
merged 1 commit into from
Aug 7, 2018

Conversation

iliekturtles
Copy link
Contributor

A type's fully qualified name will now wrap once it gets to the
[-][src] link aligned against the right edge of the content area.
Previously the two would overlap and the name would only wrap when
hitting the edge of the content area.

Before:
image

After:
image

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 5, 2018
@kennytm
Copy link
Member

kennytm commented Aug 5, 2018

Thanks for the PR! We’ll periodically check in on it to make sure that @GuillaumeGomez or someone else from the team reviews it soon.

@GuillaumeGomez
Copy link
Member

I'd prefer still having the [-] [src] part on the first line. You can do it by using a <table>. Take a look on functions to see how I did.

@iliekturtles
Copy link
Contributor Author

I just maintained the current functionality where the [-][src] dropped beneath the type name when wrapping. I can fix it to stay at the top by changing the order of .in-band and .out-of-band and keeping the float or using a table like you mentioned. Let me know your preference and I'll update my PR at some point today.

A type's fully qualified name will now wrap once it gets to the
`[-][src]` link aligned against the right edge of the content area.
Previously the two would overlap and the name would only wrap when
hitting the edge of the content area. The `[-][src]` link will main at
the top of the header.
@iliekturtles
Copy link
Contributor Author

Pushed changes to re-order .in-band and .out-of-band spans. I decided not to use a <table> element since we're not displaying a table of data.

@GuillaumeGomez
Copy link
Member

Please add a screenshot too.

@iliekturtles
Copy link
Contributor Author

iliekturtles commented Aug 5, 2018

image

(fixed screenshot)

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Aug 5, 2018

📌 Commit 3f92ff3 has been approved by GuillaumeGomez

@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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 5, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Aug 7, 2018
…aumeGomez

Change rustdoc style so fully qualified name does not overlap src link

A type's fully qualified name will now wrap once it gets to the
`[-][src]` link aligned against the right edge of the content area.
Previously the two would overlap and the name would only wrap when
hitting the edge of the content area.

Before:
![image](https://user-images.githubusercontent.com/5081378/43676506-cf548758-97c0-11e8-80a0-a812d8ea0eef.png)

After:
![image](https://user-images.githubusercontent.com/5081378/43676509-e78810a6-97c0-11e8-8cd4-b90bd5858a5f.png)
bors added a commit that referenced this pull request Aug 7, 2018
Rollup of 10 pull requests

Successful merges:

 - #52885 (Remove some unused method arguments from typeck)
 - #52886 (cleanup: Remove `Def::GlobalAsm`)
 - #53028 (Building librustc_codegen_llvm in a separate directory)
 - #53052 (fixed broken links to char)
 - #53060 (Change rustdoc style so fully qualified name does not overlap src link)
 - #53068 (Rename Executor trait to Spawn)
 - #53093 (Enable macros to pass $:literal to another macro)
 - #53107 (Remove references to `StaticMutex` which got removed a while ago)
 - #53135 (Rust 2018: Disable catch_expr, not targeted for 2018 edition)
 - #53139 (set emit_debug_gdb_scripts: false for riscv32imac-unknown-none target)
@bors bors merged commit 3f92ff3 into rust-lang:master Aug 7, 2018
@iliekturtles iliekturtles deleted the rustdoc-style branch August 7, 2018 13:17
@iliekturtles iliekturtles restored the rustdoc-style branch May 5, 2019 14:34
@iliekturtles iliekturtles deleted the rustdoc-style branch May 5, 2019 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants