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

rustdoc: make the help button a link to a page #103060

Merged
merged 4 commits into from
Oct 16, 2022

Conversation

notriddle
Copy link
Contributor

This allows you to open the help section in a new browser tab, which is a pretty reasonable thing to want for a documentation page.

Preview: http://notriddle.com/notriddle-rustdoc-demos/help-page/std/index.html

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 14, 2022
@rustbot
Copy link
Collaborator

rustbot commented Oct 14, 2022

Some changes occurred in HTML/CSS themes.

cc @GuillaumeGomez

A change occurred in the Ayu theme.

cc @Cldfire

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 14, 2022
@GuillaumeGomez
Copy link
Member

I'm not really convinced by this approach but I'll let it up to @jsha. I'm really curious to know what they think about it.

Also: if we agree with this, it'll require two new GUI tests:

  • testing when JS is enabled (I think there is one already so maybe not useful)
  • testing when JS is disabled to ensure it goes to a new page.

@jsha
Copy link
Contributor

jsha commented Oct 14, 2022

I haven't looked at the implementation but the idea is good!

This allows you to open the help section in a new browser tab, which is a
pretty reasonable thing to want for a documentation page.
@GuillaumeGomez
Copy link
Member

Apart from the lint, looks all good to me. Can you regen the online version so we can confirm the help page is rendered correctly too please?

@notriddle
Copy link
Contributor Author

@GuillaumeGomez I've changed the appearance of the help page to match the tweaks you made to the settings page.

image

I've also made a change to both the settings and help event listeners so that holding a modifier key will trigger the browser's default behavior (this way, Ctrl-Click opens a new tab like it should).

@GuillaumeGomez
Copy link
Member

I've also made a change to both the settings and help event listeners so that holding a modifier key will trigger the browser's default behavior (this way, Ctrl-Click opens a new tab like it should).

Oh nice!

@GuillaumeGomez
Copy link
Member

Looks good to me, thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 15, 2022

📌 Commit 65f501e has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Oct 15, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 15, 2022
…GuillaumeGomez

rustdoc: make the help button a link to a page

This allows you to open the help section in a new browser tab, which is a pretty reasonable thing to want for a documentation page.

Preview: http://notriddle.com/notriddle-rustdoc-demos/help-page/std/index.html
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 15, 2022
…r=notriddle

Fix settings page

Thanks to rust-lang#103060, I discovered that the settings page was badly rendered. This PR fixes it.

Before:
![Screenshot from 2022-10-15 16-02-41](https://user-images.githubusercontent.com/3050060/195990668-42e0b16b-3146-4864-b822-6f6a80fb77a5.png)

After:
![Screenshot from 2022-10-15 16-02-31](https://user-images.githubusercontent.com/3050060/195990664-20f967df-8989-4336-bca9-be52baab8e81.png)

r? `@notriddle`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 15, 2022
…GuillaumeGomez

rustdoc: make the help button a link to a page

This allows you to open the help section in a new browser tab, which is a pretty reasonable thing to want for a documentation page.

Preview: http://notriddle.com/notriddle-rustdoc-demos/help-page/std/index.html
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 15, 2022
…r=notriddle

Fix settings page

Thanks to rust-lang#103060, I discovered that the settings page was badly rendered. This PR fixes it.

Before:
![Screenshot from 2022-10-15 16-02-41](https://user-images.githubusercontent.com/3050060/195990668-42e0b16b-3146-4864-b822-6f6a80fb77a5.png)

After:
![Screenshot from 2022-10-15 16-02-31](https://user-images.githubusercontent.com/3050060/195990664-20f967df-8989-4336-bca9-be52baab8e81.png)

r? ``@notriddle``
@JohnTitor
Copy link
Member

Failed in rollup: #103099 (comment)
@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 16, 2022
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 16, 2022
…r=notriddle

Fix settings page

Thanks to rust-lang#103060, I discovered that the settings page was badly rendered. This PR fixes it.

Before:
![Screenshot from 2022-10-15 16-02-41](https://user-images.githubusercontent.com/3050060/195990668-42e0b16b-3146-4864-b822-6f6a80fb77a5.png)

After:
![Screenshot from 2022-10-15 16-02-31](https://user-images.githubusercontent.com/3050060/195990664-20f967df-8989-4336-bca9-be52baab8e81.png)

r? ```@notriddle```
@notriddle
Copy link
Contributor Author

Pretty sure I fixed it now with 8344481

@GuillaumeGomez
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 16, 2022

📌 Commit 8344481 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Oct 16, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 16, 2022
…GuillaumeGomez

rustdoc: make the help button a link to a page

This allows you to open the help section in a new browser tab, which is a pretty reasonable thing to want for a documentation page.

Preview: http://notriddle.com/notriddle-rustdoc-demos/help-page/std/index.html
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 16, 2022
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#102857 (Add a regression test for rust-lang#39137)
 - rust-lang#102953 (Improve docs for `struct_lint_level` function.)
 - rust-lang#103060 (rustdoc: make the help button a link to a page)
 - rust-lang#103115 (Clean up anchors.goml rustdoc GUI test)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0bd24c5 into rust-lang:master Oct 16, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 16, 2022
@notriddle notriddle deleted the notridddle/help-page branch October 16, 2022 22:18
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. 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.

7 participants