Skip to content

Conversation

@liigo
Copy link
Contributor

@liigo liigo commented Nov 4, 2025

  • Support = shortcut (alongside +) to expand all sections. Already support s and S, Shift or not.
  • Fix search-input's placeholder. The input is auto focused, any key press will be accepted as input not shortcut, current placeholder is missleading.

@rustbot
Copy link
Collaborator

rustbot commented Nov 4, 2025

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha, @lolbinarycat

@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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Nov 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 4, 2025

r? @notriddle

rustbot has assigned @notriddle.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

autocomplete="off"
spellcheck="false"
placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…"
placeholder="Search API docs"
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer to keep it as is until we come up with a solution on how to tell people that this shortcut exists.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already told to people by help button.

Copy link
Contributor

@notriddle notriddle Nov 5, 2025

Choose a reason for hiding this comment

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

I don't think the current placeholder is a good idea at all.

  • It's shown auto-focused, which is confusing just like liigo says.
  • It's telling you how to open search mode after search mode is already open, which is too late to be useful.

In other words, I agree with the change in this PR.

Copy link
Member

Choose a reason for hiding this comment

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

Discovering a shortcut while using a feature is better than hiding it all the time. The help menu is not a good place to discover shortcuts sadly. Also, when the input is focused, as long as it's empty, the placeholder is displayed (at least on firefox).

["← / →", "Switch result tab (when results focused)"],
["⏎", "Go to active search result"],
["+", "Expand all sections"],
["+ / =", "Expand all sections"],
Copy link
Member

Choose a reason for hiding this comment

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

We generally avoid adding new shortcuts to not overwrite existing browser/user's shortcuts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the current + shortcut is not just only +, it's really shift+=.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

User press - (no shift needed), it works. But if he press + (without shift), it not works, this is a bit weird, or not convenient.

Copy link
Member

Choose a reason for hiding this comment

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

It works with just + for me without shift.

Copy link
Contributor

@lolbinarycat lolbinarycat Nov 5, 2025

Choose a reason for hiding this comment

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

That's not the case for me on firefox, what browser and keyboard layout are you using?

Copy link
Member

Choose a reason for hiding this comment

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

qwerty and firefox

Copy link
Contributor

Choose a reason for hiding this comment

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

Very strange, that's the same here, you don't happen to have any extensions or userscripts that could be changing that behavior, do you?

What's your exact browser version?

Copy link
Member

Choose a reason for hiding this comment

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

Only adblock. Version 143.0.3.

Copy link
Member

Choose a reason for hiding this comment

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

Ah ok, I understand the issue now. It's because I use the numpad. Well I guess = is fine then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants