-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Switch settings menu to full js #93097
Conversation
Some changes occurred in HTML/CSS/JS. |
Some early feedback from testing: This should generate a page navigation event, like searching does, so that when you hit the "back" button in your browser you go back to the page you were on. The page navigation event should make the URL |
This comment has been minimized.
This comment has been minimized.
That'd mean that we'd need to have a |
47262e1
to
38cca7e
Compare
No, I'm proposing to have one settings.html per documentation instance, just like we have today - and in exactly the same place. |
I'm not a big fan of the idea: it means duplicating where the settings are set and generated... I think it's extra work for not much gain. |
I think you misunderstand me. I'm not proposing that we should generate the settings into HTML. I'm proposing that we have HTML that is an empty shell, and just calls |
This comment has been minimized.
This comment has been minimized.
Oh indeed. Great idea! |
☔ The latest upstream changes (presumably #93085) made this pull request unmergeable. Please resolve the merge conflicts. |
38cca7e
to
6f6e078
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #93220) made this pull request unmergeable. Please resolve the merge conflicts. |
6f6e078
to
9630fe7
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
780d3e8
to
cb02def
Compare
This needs another merge deconflict. |
Thanks for the review! I'll update it tomorrow. |
fe99791
to
2ac2fbb
Compare
Updated! |
☔ The latest upstream changes (presumably #96566) made this pull request unmergeable. Please resolve the merge conflicts. |
0d2c340
to
2f074de
Compare
Fixed merge conflicts. :) |
This still has "Preferred dark theme" above "Preferred light theme." It should be the other way around, to match the current UI. |
* Improve code. * Fix some documentation argument types. * Make settings order the same as before this PR. * Change timeout to 0 so that browser will render it as fast as possible.
Updated and uploaded updated version. :) |
@bors r+ rollup |
📌 Commit 73688e4 has been approved by |
🎉 |
Switch settings menu to full js Since the settings can only be set when the JS is enabled, it's not really a problem. It also fixes a debate we had around the themes not being accessible easily before. ![Screenshot from 2022-01-19 23-06-59](https://user-images.githubusercontent.com/3050060/150221936-fd1a1e76-06b6-4416-a653-dbae111979ed.png) You can test it [here](https://rustdoc.crud.net/imperio/settings-js/doc/foo/index.html). r? `@jsha`
Rollup of 8 pull requests Successful merges: - rust-lang#93097 (Switch settings menu to full js) - rust-lang#96587 (Refactor the WriteBackendMethods and ExtraBackendMethods traits) - rust-lang#96589 (Use source callsite in check_argument_types suggestion) - rust-lang#96599 (Update `RValue::Discriminant` documentation) - rust-lang#96614 (Add a regression test for rust-lang#92305) - rust-lang#96629 (Fix invalid keyword order for function declarations) - rust-lang#96641 (Use a yes/no enum instead of a bool.) - rust-lang#96646 (Mitigate impact of subtle invalid call suggestion logic) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Since the settings can only be set when the JS is enabled, it's not really a problem. It also fixes a debate we had around the themes not being accessible easily before.
You can test it here.
r? @jsha