mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-21 12:07:31 +00:00

This change is based on some discussion on [lolbinarycat's idea], but with a more "traditional" design. Specifically, this is the closest thing I could find to a consensus across many systems I looked at for inspiration: - In Jira, resizable sidebars have a stack of four dots. - In The GIMP, resizable sidebars have a stack of three dots. - In [old Windows], "panes" are defined to have the same border style as a window, which has a raised appearance. - 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" - In [old Mac], drag handles for things usually had a "grip track" of parallel lines. - [OSX] kept that, but the "Source List" part of the Finder still had the circle grip for a time the same way Workspace did [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
29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
// Checks sidebar resizing
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
|
assert-property: (".sidebar", {"clientWidth": "199"})
|
|
show-text: true
|
|
// normal resizing
|
|
drag-and-drop: ((205, 100), (185, 100))
|
|
assert-property: (".sidebar", {"clientWidth": "181"})
|
|
// resize past maximum (don't grow past 500)
|
|
drag-and-drop: ((185, 100), (600, 100))
|
|
assert-property: (".sidebar", {"clientWidth": "499"})
|
|
// resize past minimum (hide sidebar)
|
|
drag-and-drop: ((501, 100), (5, 100))
|
|
assert-property: (".sidebar", {"clientWidth": "0"})
|
|
assert-css: (".sidebar", {"display": "none"})
|
|
assert-local-storage: {"rustdoc-hide-sidebar": "true"}
|
|
set-local-storage: {"rustdoc-hide-sidebar": "false"}
|
|
|
|
// Now same thing, but for source code
|
|
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
|
assert-property: (".sidebar", {"clientWidth": "49"})
|
|
drag-and-drop: ((52, 100), (185, 100))
|
|
assert-property: (".sidebar", {"clientWidth": "181"})
|
|
drag-and-drop: ((185, 100), (600, 100))
|
|
assert-property: (".sidebar", {"clientWidth": "499"})
|
|
drag-and-drop: ((500, 100), (5, 100))
|
|
// instead of hiding the sidebar entirely, this
|
|
// will switch to the toggle mode
|
|
assert-property: (".sidebar", {"clientWidth": "49"})
|