Conversation
|
Some changes occurred in HTML/CSS/JS. |
|
I found that some entries are not visible for some reason, but I can select them if I go down with the arrow keys and press enter, for example: MyWs::fn send_to_client(&mut self, msg: ClientCommand, ctx: &mut WebsocketContext<Self>)https://data.estada.ch/rustdoc-nightly_4e3e6db01_2021-05-18/multiplayer_snake/index.html?search=send Update: link to the correct search term |
|
Ok, I found the issue. That was a tricky one: it lacks a div when there is no short documentation. The items are there, just not in the right place. Talk about tricky case. Great catch! |
|
Ah yes, and with the |
|
I made an error in one of my comments in the other thread: it should have been |
|
@dns2utf8 No problem, I'll update the char at the same time as the rest. :) |
src/librustdoc/html/static/search.js
Outdated
There was a problem hiding this comment.
| var description = document.createElement("div"); | |
| var description = document.createElement("div"); | |
| description.className = "result-description"; |
Adding this would simplify the CSS in the mobile variant
There was a problem hiding this comment.
Let's do it in another PR, this one is big enough, I prefer style changes to be put on their own.
|
☔ The latest upstream changes (presumably #85560) made this pull request unmergeable. Please resolve the merge conflicts. |
|
#85551 slightly changed the DOM generation by moving the |
77cc3c9 to
0fae87a
Compare
|
Updated! I also realized that some CSS rules weren't updated so I did and I added a test for them. |
|
ping @jsha |
|
@bors r+ We should figure out a better long-term plan for generating HTML in JS - like |
|
📌 Commit 0fae87a has been approved by |
|
I like the templates idea. (Btw. the scroll-margin bug I found is now documented) |
|
☀️ Test successful - checks-actions |
…Gomez rustdoc: staggered layout for module contents on mobile This PR adds the container `<item-table>` with its two children `<item-left>` and `<item-right>`. It uses grid-layout on desktop and flexbox on mobile to make better use of the available space. Additionally it allows to share parts of the CSS with the search function. * Demo: https://data.estada.ch/rustdoc-nightly_126561cb3_2021-05-25/generic_array/index.html * Related: rust-lang#85540 ## Desktop  ## Mobile  r? `@GuillaumeGomez` `@jsha`

First commit is from #85506.
We realized in #85506 (comment) thanks to @dns2utf8 that in some cases, the generated search result DOM was invalid. This was not strict enough and the DOM was inserted as a big string, which wasn't great.
r? @jsha