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 help popup appears in every new tab when no web local storage #79960

Closed
ijackson opened this issue Dec 12, 2020 · 9 comments · Fixed by #79985
Closed

rustdoc help popup appears in every new tab when no web local storage #79960

ijackson opened this issue Dec 12, 2020 · 9 comments · Fixed by #79985
Labels
A-rustdoc-ui Area: rustdoc UI (generated HTML) E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@ijackson
Copy link
Contributor

ijackson commented Dec 12, 2020

In current Rust nightly, the std docs search function does a very annoying thing for me: every time I open a new tab onto the rust std docs, I get once again the popup with the keybindings which I then have to dismiss.

I conjecture that this is because I am looking at locally built docs via a file:// URL. Presumably the same thing would occur for a user who has sensibly disabled cookies in their web browser, resulting in the same horrible "stupid popup" user experience.

Given that without web local storage it is not possible to make a thing that is shown to each user once, it would be better not to show this popup at all when local storage is not available.

I'm not sure if it is possible to determine easily whether local storage is available. I think there may be browsers which silently discard local storage writes rather than explicitly saying it's not available. Until we know the answer to this question, I suggest that the new popup should be disabled :-(.

@ijackson
Copy link
Contributor Author

@rustbot modify labels +T-rustdoc +A-rustdoc-ui

@rustbot rustbot added A-rustdoc-ui Area: rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Dec 12, 2020
@ijackson
Copy link
Contributor Author

@rustbot modify labels +regression-from-stable-to-nightly

@rustbot rustbot added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Dec 12, 2020
@camelid
Copy link
Member

camelid commented Dec 12, 2020

I've been having a different version of this happen on https://doc.rust-lang.org/nightly/std (and /nightly-rustc) too. Whenever I press Enter after typing in the search field, the Help popup momentarily appears. I don't think mine is a cookies issue; I think rustdoc is handling events wrong.

@camelid camelid added P-high High priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Dec 12, 2020
@camelid
Copy link
Member

camelid commented Dec 12, 2020

cc @rust-lang/rustdoc – this is a pretty severe usability bug, and we should fix it as soon as possible

@jyn514 jyn514 added the E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc label Dec 12, 2020
@jyn514
Copy link
Member

jyn514 commented Dec 12, 2020

Might be related to #78921 or #78876 ?

@camelid
Copy link
Member

camelid commented Dec 12, 2020

I'll try to bisect.

@GuillaumeGomez
Copy link
Member

I'll send a fix shortly.

@Qwaz
Copy link
Contributor

Qwaz commented Dec 12, 2020

Will the affected documentations on docs.rs be rebuilt?

@GuillaumeGomez
Copy link
Member

Unfortunately no. It'll require to rebuild the impacted crates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: rustdoc UI (generated HTML) E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants