rust/src/librustdoc
Matthias Krüger 2bce1ad86a
Rollup merge of #139562 - notriddle:notriddle/ew-resize, r=GuillaumeGomez
rustdoc: add a handle that makes sidebar resizing more obvious

This aims to make the resizable sidebars more obvious

Preview: <https://notriddle.com/rustdoc-html-demo-12/sidebar-resize-handle/std/index.html>

![image](https://github.com/user-attachments/assets/d4d70982-8045-4fed-818a-982108b0d3b3)

![image](https://github.com/user-attachments/assets/4aaa3663-19f3-4e04-89c6-53db0ddb72ed)

![image](https://github.com/user-attachments/assets/3f612c5b-6be1-4383-801a-067c87425eb9)

This change is based on some discussion on [lolbinarycat's idea], but with a more "traditional" design. Specifically, while very few systems use exactly this design, most of them use [a skeumorph](https://ux.stackexchange.com/questions/80463/what-do-the-3-close-horizontal-bars-not-hamburger-menu-represent-and-what-is-t/80591#80591) of a grip texture:

- This design is similar to the one used in the Rust Playground, and almost identical to UX StackExchange:

  <details><img src="https://github.com/user-attachments/assets/39a6bb69-4895-4fd0-87da-b87913bc7309"></details>

  <details><img src="https://github.com/user-attachments/assets/a41942e1-651b-410b-b855-2aafe8fe54f4"></details>

- In Jira, resizable sidebars have a stack of four dots, but only in one row.

  <details><img src="https://github.com/user-attachments/assets/13047998-02bf-47e6-b796-16f393f870b0"></details>

- In The GIMP, resizable sidebars have a stack of three dots.

  <details><img src="https://github.com/user-attachments/assets/138f5c21-3069-4bbe-b306-0bb9a4bf0318"></details>

- In [old Windows], "panes" are defined to have the same border style as a window, which has a raised appearance. To evoke this, the PR adds a lightweight "shadow" border, darker than the sidebar itself

  <details><img src="https://github.com/user-attachments/assets/301da4b8-6c48-4131-b741-1689af84670a"></details>

- In [NeXT], a drag point usually had an innie, whether the line in a slider or the circle in a scroller; I can also hide and show the favorites bar in Workspace by dragging on a circular "grip spot"

  <details><img src="https://github.com/user-attachments/assets/b13c2d30-a3a8-4672-90fa-58c1fdf19f42"></details>

- In [old Mac], drag handles for things usually had a "grip track" of parallel lines.

  <details><img src="https://github.com/user-attachments/assets/1fbecc67-ffbc-4ed6-a8c5-a9ff085638db"></details>

  *This design is far closer to old Mac than anything else*, though they've put it in the bottom corner instead of the middle.

- [OSX] kept that, but the "Source List" part of the Finder still had the circle grip for a time the same way Workspace did (resulting in an odd mishmash, if you compare the source list sidebar with the other grip tracks embedded in the scrollbars).

  <details><img src="https://github.com/user-attachments/assets/551b8f9d-2dd8-4291-917f-dc88741a2b97"></details>

[lolbinarycat's idea]: https://github.com/rust-lang/rust/pull/139420
[old Windows]: https://archive.org/details/windowsinterface00micr/page/n9/mode/2up
[old Mac]: https://archive.org/details/apple-hig/1996_Human_Interface_Guidelines_for_Mac_OS_8_%28WWDC_Release%29/page/16/mode/2up
[NeXT]: https://archive.org/details/apple-hig/1993%20NeXTSTEP%20User%20Interface%20Guidelines%20-%20Release%203/page/145/mode/2up
[OSX]: https://dn721903.ca.archive.org/0/items/apple-hig/MacOSX_HIG_2005_09_08.pdf#page=267
2025-05-10 16:26:01 +02:00
..
clean Remove Ident::empty. 2025-05-09 13:57:49 +10:00
doctest Rollup merge of #139863 - fmease:simp-doctest-build-arg-passing, r=GuillaumeGomez 2025-05-09 21:50:06 +02:00
formats librustdoc: remove IndexItem::new, use previous fields constructor 2025-04-09 20:51:52 +08:00
html rustdoc: use a different style of grip track 2025-05-09 12:56:38 -07:00
json Make rustdoc JSON Span column 1-based, just like line numbers 2025-04-18 20:32:40 +02:00
passes Remove Ident::empty. 2025-05-09 13:57:49 +10:00
theme rustdoc: merge theme css into rustdoc.css 2023-09-15 07:40:17 -07:00
askama.toml Update to new rinja version (askama) 2025-04-03 15:38:08 +02:00
build.rs Auto merge of #136253 - notriddle:notriddle/aot-minify, r=GuillaumeGomez 2025-02-05 18:28:16 +00:00
Cargo.toml rustdoc: remove unportable markdown lint and old parser 2025-05-06 10:33:04 -07:00
config.rs Rollup merge of #139863 - fmease:simp-doctest-build-arg-passing, r=GuillaumeGomez 2025-05-09 21:50:06 +02:00
core.rs Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann 2025-04-18 05:16:29 +02:00
display.rs x clippy src/librustdoc --fix 2025-03-06 16:06:41 +00:00
docfs.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
doctest.rs Rollup merge of #139863 - fmease:simp-doctest-build-arg-passing, r=GuillaumeGomez 2025-05-09 21:50:06 +02:00
error.rs Fix clippy lints 2024-08-29 12:14:41 +02:00
externalfiles.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
fold.rs Rename TyMethodItem -> RequiredMethodItem 2024-12-19 10:48:51 -08:00
lib.rs Rollup merge of #140815 - yaahc:rustdoc-metrics, r=GuillaumeGomez 2025-05-09 21:50:06 +02:00
lint.rs rustdoc: remove unportable markdown lint and old parser 2025-05-06 10:33:04 -07:00
markdown.rs rustdoc: Document markdown module. 2024-10-19 13:37:40 +00:00
README.md rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.org 2020-03-10 17:08:18 -03:00
scrape_examples.rs Move methods from Map to TyCtxt, part 5. 2025-04-02 10:00:46 +11:00
theme.rs Fix new clippy lints 2024-11-28 03:05:43 +01:00
visit.rs Rename TyMethodItem -> RequiredMethodItem 2024-12-19 10:48:51 -08:00
visit_ast.rs Move hir::Item::ident into hir::ItemKind. 2025-03-18 06:29:50 +11:00
visit_lib.rs librustdoc: flatten nested ifs 2025-03-06 08:16:28 +00:00

For more information about how librustdoc works, see the rustc dev guide.