| Age | Commit message (Collapse) | Author | Lines |
|
|
|
this is because the mobile sidebar cannot be resized,
unlike on desktop.
|
|
|
|
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
|
|
Unify sidebar buttons to use the same image
Part of https://github.com/rust-lang/rust/issues/139832.
The source sidebar looks like this with the new image:

You can test it [here](https://rustdoc.crud.net/imperio/sidebar-images/src/foo/foo.rs.html).
r? `@notriddle`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This continues two ongoing projects:
- Replacing ascii art with real icons that don't look like
syntax, are understandable to people who're familiar with
desktop computers and smart devices, and aren't ugly.
- Using labels and tooltips to clarify these icons, when the
limits of popular iconography hit us. In this case, I've added
tooltips, because, unfortunately, there's not room for
always-visible labels.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
documentation
|
|
|
|
fixes https://github.com/rust-lang/rust/issues/133484
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix code HTML items making big blocks if too long
Encountered this bug randomly where `code` item in docblocks would look like this:

With this fix it looks like this:

r? ``@notriddle``
|
|
|
|
rustdoc: adjust spacing and typography in header
Fixes #131589
Preview: https://notriddle.com/rustdoc-html-demo-12/spacing/std/index.html
| Before | After |
|--|--|
|  | 
|  | 
|  | 
|  | 
First of all, we put 4px additional margin below the search box, and 4px margin below the header to balance it out.
The bigger problem we have to solve is making the lines look logically spaced. This is troublesome, because Fira Sans (the typeface we use here) wants to look good on average, and to avoid breaking, with text that uses [ascenders and descenders](https://www.w3.org/TR/css-inline-3/images/text-edge.png). If the text we're putting in happens to not have any, things look weird (strictly speaking, there’s hand-tuning here, because the Copy Path button messes with stuff, but the overall point is that there is no true, one perfect layout).
In order to play nicely with the font, I've tweaked the text to use that space. The word "Source" for the link is now capitalized, and the Since version number now uses oldstyle nums with descenders.
|
|
|
|
|
|
ismailarilik:fix/rustdoc/add-space-between-struct-fields-and-their-descriptions, r=GuillaumeGomez
fix(rustdoc): add space between struct fields and their descriptions
Stolen from #128541.
Fixes #128260.
<table>
<thead>
<tr>
<th scope="col">Before</th>
<th scope="col">After</th>
</tr>
</thead>
<tbody>
<tr>
<td scope="row">
<img
src="https://github.com/user-attachments/assets/b1d3cb47-77c9-4897-a5d2-2192b11cb8a3"
/>
</td>
<td>
<img
src="https://github.com/user-attachments/assets/0b104672-d2be-49f4-ac9b-3506526fe2f1"
/>
</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th scope="col">Before</th>
<th scope="col">After</th>
</tr>
</thead>
<tbody>
<tr>
<td scope="row">
<img
src="https://github.com/user-attachments/assets/650c3e74-a067-492a-9ba3-557f9214f875"
/>
</td>
<td>
<img
src="https://github.com/user-attachments/assets/413ef9b0-8fca-4e16-978a-7b88d05299dc"
/>
</td>
</tr>
</tbody>
</table>
Unlike original PR, I didn't add space between field headers; I put it between headers and descriptions. So if there are only headers, the space is not changed. Otherwise, I put a space like the space between paragraphs (.75em) which makes sense for me but feel free to adjust it or ask me to do so.
r? `@GuillaumeGomez`
|
|
|
|
|
|
|
|
rustdoc: lists items that contain multiple paragraphs are more clear
fixes https://github.com/rust-lang/rust/issues/130622
before: 
after:

|
|
|
|
fixes https://github.com/rust-lang/rust/issues/130622
|
|
|
|
This accessibility improvement gates the target flashing and tooltip fade-out
behind an inverted prefers-reduced-motion media query.
|
|
rustdoc: redesign toolbar and disclosure widgets
Fixes #77899
Fixes #90310
## Preview
| before | after
| ------ | -----
|  | 
|  | 
|  | 
|  | 
|  | 
| N/A | 
|  | 
|  | 
https://notriddle.com/rustdoc-html-demo-12/toolbar-v2/std/index.html
## Description
This adds labels to the icons and moves them away from the search box.
These changes are made together, because they work together, but are based on several complaints:
* The [+/-] thing are a Reddit-ism. They don't look like buttons, but look like syntax <https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/More.20visual.20difference.20for.20the.20.2B.2F-.20.20Icons>, <https://github.com/rust-lang/rust/issues/59851> (some of these are laundry lists with more suggestions, but they all mention [+/-] looking wrong)
* The settings, help, and summary buttons are also too hard to recognize <https://lwn.net/Articles/987070/>, <https://github.com/rust-lang/rust/issues/90310>, <https://github.com/rust-lang/rust/issues/14475#issuecomment-274241997>, <https://internals.rust-lang.org/t/improve-rustdoc-design/12758> ("Not all functionality is self-explanatory, for example the [+] button in the top right corner, the theme picker or the settings button.")
The toggle-all and toggle-individual buttons both need done at once, since we want them to look like they go together. This changes them from both being [+/-] to both being arrows.
CC <https://github.com/rust-lang/rust/pull/113074#issuecomment-1677469680> and ``@jsha`` regarding the use of triangles for disclosure, which is what everyone wanted, but was pending a good toggle-all button. This PR adds a toggle-all button that should work.
Settings and Help are also migrated, so that the whole group can benefit from being described using actual words.
The breadcrumbs also get redesigned, so that they use less space, by shrinking the parent module path parts. This is done at the same time as the toolbar redesign because it's, effectively, moving space from the toolbar to the breadcrumbs.
This is aimed at avoiding any line wrapping at desktop sizes.
## Prior art
This style of toolbar, with explicit labels on the buttons, used to be more popular. It's not very common in web browsers nowadays, and for truly universal icons like :arrow_left: I can understand why, but words are great when icons fail.

|
|
|
|
|
|
|