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

TRPL - print button not working in beta or nightly #45552

Closed
carols10cents opened this issue Oct 26, 2017 · 2 comments
Closed

TRPL - print button not working in beta or nightly #45552

carols10cents opened this issue Oct 26, 2017 · 2 comments
Assignees
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug.

Comments

@carols10cents
Copy link
Member

carols10cents commented Oct 26, 2017

Possibly related to #44704, not sure yet. Mdbook related, not rustdoc. Possibly due to customizations we've made, not sure if mdbook bug or not yet.

If I visit https://doc.rust-lang.org/beta/book/second-edition/ or https://doc.rust-lang.org/nightly/book/second-edition/ and click the print button, nothing happens. Same non-behavior in firefox nightly and chrome.

What I expect to happen does happen on https://doc.rust-lang.org/stable/book/second-edition/, which is that I am taken to https://doc.rust-lang.org/stable/book/second-edition/print.html and a print dialog comes up.

cc @steveklabnik

Poking at this slowly, not super high priority but we should figure it out before the next release

I am able to reproduce locally with mdbook 0.0.26
I am not able to reproduce locally with mdbook 0.0.25
I am able to reproduce locally with mdbook cd711bfb

@carols10cents carols10cents added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Oct 26, 2017
@carols10cents carols10cents self-assigned this Oct 26, 2017
@carols10cents carols10cents added the C-bug Category: This is a bug. label Oct 26, 2017
@kennytm
Copy link
Member

kennytm commented Oct 26, 2017

azerupi/mdBook@0.0.25...0.0.26

Probably caused by azerupi/mdBook#439. Note that the PR introduced the diff:

diff --git a/src/theme/index.hbs b/src/theme/index.hbs
index 9f735e6cd..3b4dbd12c 100644
--- a/src/theme/index.hbs
+++ b/src/theme/index.hbs
@@ -88,7 +88,9 @@
                     <h1 class="menu-title">{{ book_title }}</h1>
 
                     <div class="right-buttons">
-                        <i id="print-button" class="fa fa-print" title="Print this book"></i>
+                        <a href="print.html">
+                            <i id="print-button" class="fa fa-print" title="Print this book"></i>
+                        </a>
                     </div>
                 </div>

But I can't see that <a> tag in the beta/nightly book.

@carols10cents
Copy link
Member Author

AHA!! Nice catch @kennytm !!! We indeed customize index.hbs in the book, so that's probably the issue.

bors added a commit that referenced this issue Oct 27, 2017
Update the book on beta to fix the print button

Connects to #45552.

This does bring in changes to the text that we've made since beta branched, since we usually update the book just before beta goes to stable anyway, I didn't think this was a problem. If it is, I will happily make a branch of the book with just the print button fix and send in that instead!

r? @steveklabnik
bors added a commit that referenced this issue Oct 29, 2017
Update the book for a fix to the print button

Fixes #45552.

Brings in recent improvements in the text that we've made recently as well.

r? @steveklabnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants