Skip to content

[rustdoc] Remove query component from URL by pressing ESC #81330

@tesuji

Description

@tesuji
Contributor

mdbook v4.6+ has a feature that pressing ESC removes query components from URLs (for example ?highlight=...).
The feature was implemented in rust-lang/mdBook#1427.

It would be nice if rustdoc offers the same kind of that feature.

This is, for example, an URL that contains query components in rustdoc: https://doc.rust-lang.org/nightly/std/time/struct.Duration.html?search=asdfasdf.

What's the benefit of this feature?

When users share URLs to an API, they don't have to remove the query manually.

Activity

added
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
on Jan 24, 2021
tesuji

tesuji commented on Jan 24, 2021

@tesuji
ContributorAuthor

@GuillaumeGomez, could you share some thoughts about this feature request?
If possible, could you mentor contributors how to implement this ?

GuillaumeGomez

GuillaumeGomez commented on Jan 24, 2021

@GuillaumeGomez
Member

I think it's a good idea. Gonna take a look at how to do it.

added a commit that references this issue on Jan 28, 2021
0b1870e
tesuji

tesuji commented on Jan 29, 2021

@tesuji
ContributorAuthor

Can we reopen this issue ?
I think #81379 only removes the query component when we remove keywords in search bar.
This issue is about adding a keyboard shortcut.

GuillaumeGomez

GuillaumeGomez commented on Jan 29, 2021

@GuillaumeGomez
Member

Oh I see, my bad. Reopening!

added a commit that references this issue on Feb 22, 2021
399431c
added 2 commits that reference this issue on Feb 23, 2021
aa9585e
8541435
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @GuillaumeGomez@tesuji@jyn514@rustbot

      Issue actions

        [rustdoc] Remove query component from URL by pressing ESC · Issue #81330 · rust-lang/rust