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

Add link to rustdoc book search chapter in help popover #112740

Merged
merged 3 commits into from
Jun 23, 2023

Conversation

GuillaumeGomez
Copy link
Member

One thing that was missing in the rustdoc output and its help popover was a link back to the search feature chapter in the rustdoc book.

It looks like this:

image

r? @notriddle

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 17, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jun 17, 2023

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@@ -1068,6 +1068,9 @@ function preLoadCss(cssUrl) {
div_shortcuts.innerHTML = "<h2>Keyboard Shortcuts</h2><dl>" + shortcuts + "</dl></div>";

const infos = [
"For a full list of all search features, take a look <a \
href='https://doc.rust-lang.org/stable/rustdoc/how-to-read-rustdoc.html\
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should be passing DOC_RUST_LANG_ORG_CHANNEL through here instead (as well as line 1051)? Probably use getVar to link to it.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@GuillaumeGomez GuillaumeGomez force-pushed the link-to-search-chapter branch from 06cabcf to 861c2b8 Compare June 23, 2023 14:21
@@ -582,6 +583,8 @@ pub(crate) fn has_doc_flag(tcx: TyCtxt<'_>, did: DefId, flag: Symbol) -> bool {
///
/// Set by `bootstrap::Builder::doc_rust_lang_org_channel` in order to keep tests passing on beta/stable.
pub(crate) const DOC_RUST_LANG_ORG_CHANNEL: &str = env!("DOC_RUST_LANG_ORG_CHANNEL");
pub(crate) static DOC_CHANNEL: Lazy<&'static str> =
Copy link
Member Author

Choose a reason for hiding this comment

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

DOC_RUST_LANG_ORG_CHANNEL contains the full URL to the doc. It's not a problem in itself but since it's stored in all generated pages, better to just keep the channel, hence why I stored it this way.

@GuillaumeGomez
Copy link
Member Author

Applied your suggestion.

src/librustdoc/html/static/js/main.js Outdated Show resolved Hide resolved
src/librustdoc/html/static/js/main.js Outdated Show resolved Hide resolved
@GuillaumeGomez GuillaumeGomez force-pushed the link-to-search-chapter branch from 861c2b8 to 2f1939a Compare June 23, 2023 14:33
@GuillaumeGomez
Copy link
Member Author

Updated!

@notriddle
Copy link
Contributor

r=me when CI passes

@GuillaumeGomez
Copy link
Member Author

@bors r=notriddle rollup

@bors
Copy link
Contributor

bors commented Jun 23, 2023

📌 Commit 2f1939a has been approved by notriddle

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 Jun 23, 2023
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 23, 2023
…ter, r=notriddle

Add link to rustdoc book search chapter in help popover

One thing that was missing in the rustdoc output and its help popover was a link back to the search feature chapter in the rustdoc book.

It looks like this:

![image](https://github.com/rust-lang/rust/assets/3050060/425413e5-e734-4d40-b675-8b2dcef874a2)

r? `@notriddle`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 23, 2023
…ter, r=notriddle

Add link to rustdoc book search chapter in help popover

One thing that was missing in the rustdoc output and its help popover was a link back to the search feature chapter in the rustdoc book.

It looks like this:

![image](https://github.com/rust-lang/rust/assets/3050060/425413e5-e734-4d40-b675-8b2dcef874a2)

r? ``@notriddle``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 23, 2023
…ter, r=notriddle

Add link to rustdoc book search chapter in help popover

One thing that was missing in the rustdoc output and its help popover was a link back to the search feature chapter in the rustdoc book.

It looks like this:

![image](https://github.com/rust-lang/rust/assets/3050060/425413e5-e734-4d40-b675-8b2dcef874a2)

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

@bors r-

#112967 (comment)

@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 Jun 23, 2023
@GuillaumeGomez
Copy link
Member Author

Fixed the GUI test. Since a GUI failure isn't caught in the CI currently, let's r+ it.

@bors r=notriddle rollup

@bors
Copy link
Contributor

bors commented Jun 23, 2023

📌 Commit 3b17012 has been approved by notriddle

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 Jun 23, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 23, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#112616 (Improve tests on targets without unwinding)
 - rust-lang#112643 (Always register sized obligation for argument)
 - rust-lang#112740 (Add link to rustdoc book search chapter in help popover)
 - rust-lang#112810 (Don't ICE on unnormalized struct tail in layout computation)
 - rust-lang#112870 (Migrate `item_bounds` to `ty::Clause`)
 - rust-lang#112925 (Stop hiding const eval limit in external macros)
 - rust-lang#112960 ([tests/rustdoc] Add `@files` command)
 - rust-lang#112962 (Fix rustdoc gui tester)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit afe337d into rust-lang:master Jun 23, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 23, 2023
@GuillaumeGomez GuillaumeGomez deleted the link-to-search-chapter branch June 24, 2023 12:00
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.

5 participants