Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upOverhaul visual design #246
Comments
budziq
added
presentation
discussion
labels
Jul 14, 2017
This comment has been minimized.
This comment has been minimized.
|
You mean static site from the server side or from the client site (no javascript required/preferred)? |
This comment has been minimized.
This comment has been minimized.
|
The site is generated via mdbook into a set of static html/js/css files served via github gh-pages without any backend (probably not requiring a backend would be the nicest aspect of the project to maintain). And 99% of the styling and js comes directly from mdbook (with some additional features and fixes around the corner with upcoming mdbook 0.1.0) Most likely we will be sticking with mdbook for now unless a better alternative comes into view. Some ideas might be implemented directly in mdbook as we are on good terms with that project (I'm comaintainig it) and rest would be easily implemented in cookbook. For instance in mdbook we were thinking about utilizing https://lunrjs.com for search. |
This comment has been minimized.
This comment has been minimized.
|
One step towards Ctrl+F compatability of crate names could be to use |
This comment has been minimized.
This comment has been minimized.
|
nice idea. on the other hand shields.io and our cache supports json output which contains the version number so js might process it in one go |
This comment has been minimized.
This comment has been minimized.
|
which cache? the browser cache? |
This comment has been minimized.
This comment has been minimized.
https://badge-cache.kominick.com we use caching proxy for shields.io due to its historic bad performance |
This was referenced Aug 1, 2017
aturon
self-assigned this
Aug 4, 2017
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Sep 20, 2017
|
I think we could split those long files into smaller ones with one example per file. If mdbooks supports subcategories with folders it would be easily maintainable (one folder one category, multiple files per category) I haven't worked with mdbooks but if we could do that we could make expendable menu, when clicking on category, with some js magic. Maybe not best solution but better than endless scrolling we have now. Something like rust book menu but expanding and hiding when clicking on category. |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Sep 20, 2017
|
copypasted from chat discussion: current ui/ux could be little more polished. personally i dont like the grey table header. also I think homepage could be little smaller ( show only titles and expand/move to category page on click) so we can see all the categories when we start a page. I would also move an contribution part to the bottom, and write very simple and short explanation what is the cookbook. https://repl.it/languages <- this looks much cleaner. I would also suggest go with something like bulma which is lightweight enough but helps with styling a lot. I could make an example UI if you are interested and we could vote/discuss it. |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Sep 20, 2017
•
|
Brainstorming design, playing with different ideas. Ignore weird cyan color, it would be replaced with rusty color. Edit: How about changing from mdbook to static site generator? |
This comment has been minimized.
This comment has been minimized.
|
First of all, thanks for taking this up @jaroslaw-weber ! Looks really nice! I wonder how this scheme would look on mobile browser (currently we try to support both phones and tablets)
I also think that one example per page might be a more natural fit. Currently dumping all of the example names into main page and grouping examples is a crutch for the lack of search #167 (ideally we would have a full tech search with category/tag support)
Rust book is implemented in mdBook so it is perfectly doable. mdBook sidebar supports nested chapters, making these collapsible would require some implementation (there is a stale issue about it in mdbook)
It's one stylus/css edit away ;) we have never really had anyone with ui/ux background on board so most of the work is done on our best effort basis. Any suggestions welcome!
I'm game for any suggestions, I just wonder how bulma would integrate with mdbook and it's selectable colors-chemes
For now mdbook is somewhat a community standard for rust documentation (RBE, Rust Book, unstable book, rustnomicon, and few others.) making these uniform and giving a hint of coherence. Also we get playground and pdf export for free. So I would be hesitant to change it at the moment. But The cookbook would be quite unique in its purpose so trying to conform to the styling of other docs is most likely a bad idea so I'm game to any suggestions! |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Sep 21, 2017
|
@budziq
Bulma is resposive so should look nice. I will send screenshots/html files later (tommorow maybe?).
Ctrl+f is not an obvious idea for search, we could do table of content for this (as a different/last page), but I would not use it as a main page (cause its ugly hack).
Looks like mdbook is using one template for all pages. It may be a problem if we want to change main page. We could go with some hack.
Well it would be nice to have everything uniform. Although I thought of refreshing current style with something new, I could think about few ideas for improving the current experience as a compromise.
Actually I changed my mind with expanding I am planning to provide some layout, but would appreciate help with matching it with mdbooks/page generator. |
This comment has been minimized.
This comment has been minimized.
I also think that the biggest problem in cookbook ux is the main page and reliance on ctrl+f. I'd love to add lunr.js based search |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Sep 21, 2017
|
Initial design is it possible to make it with mdbook? maybe partially. |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Sep 21, 2017
|
the design would be of course responsive, and left menu would be hidden by default (similar to current solution) |
This comment has been minimized.
This comment has been minimized.
I would say that I would be very hesitant to add rely on any 3'rd party search engine. Stealing the rustdoc's search code (both rust and js parts into mdbook) might be a good idea
To some extent, but it might require some customization on mdBook part (both styling and hooking to its parsing/generation without need for separate scripts). In regard to the design itself, I find it and the single page per example little distracting / unfocused compared to current one (but I might be more than a little biased. I would need more opinions). On the other hand I really like the style of rocket's landing page and guide |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Sep 24, 2017
•
|
Hey, thanks for feedback! We definitely need more people here! Well the rocket guide has shorter examples so it is easier to put everything on one page (not so much scrolling). cookbook examples are longer. If you think one example per page is not a good idea we could leave it as it is (about 10 examples per page) or I could try to make fast prototype so you could test it. i will check the styling in rocket page in more detail later maybe it will give me some ideas. I will aslo try to start with polishish current style and make it work with mdbooks so we don"t have to change infra too much. PS: Experimented a little with generating pages only with handlebars, as an alternative to mdbook. It is more flexible but would need implementing printing pdf, playgroud and code styling. You can check it out here: |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Sep 29, 2017
|
Hey again. I created site generator which uses json and text files to generate website only with handlebars. You can check it out with link from the previous post. |
This comment has been minimized.
This comment has been minimized.
aturon
commented
Sep 29, 2017
|
@jaroslaw-weber Thanks so much for the work you've put into this so far -- I think there are a lot of very promising ideas here! Here are some of my immediate thoughts.
I have some more specific thoughts about the details of the visual design -- not sure if we're to the point where you'd want that feedback yet, though? |
This comment has been minimized.
This comment has been minimized.
aturon
commented
Sep 29, 2017
•
|
Oh, and I should say that I think search is critical and ideally would be done purely within the site. I imagine we could ship down a json blob with all of the recipe titles, for example, and just search that client-side (much like how rustdoc search works today). EDIT: I see now this is tracked under a separate issue. |
This comment has been minimized.
This comment has been minimized.
|
@jaroslaw-weber Thanks for all the hard work! The design certainly looks more approachable than the current one.
I'm not sure if I'd drop mdBook just yet. At its core it is just a static site generator which can be heavily customized. For instance, having separate template file for a landing page could certainly be implemented. But if we decide to switch the static site generator I would certainly would not like to write something like that from scratch ;) Anyhow I might be more than biased here as I've became mdbook co-maintainer due to regular contributions related to cookbook requirements ;)
Yep, that's the idea. Although Steve has mentioned that homegrown search implementation in current rustdoc is hacky not reusable and not a viable way forward (shame) |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Sep 30, 2017
|
thanks for comments! it is much easier to work with feedback. @aturon we can use markdown for code blocks with custom generator. ill try to implement it later. if you look at the repo, i use [code][/code] and [snippet] as custom tags. i think its cleaner than markdown but we could alsot try markdown. @budziq well, i implemented most of the current functionality so i think i will be able to do the rest. but i understand your concern. local search with static website will be always little hacky. |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Sep 30, 2017
|
im not giving up on mdbook yet, but its not trivial so need to think about it more |
This comment has been minimized.
This comment has been minimized.
|
Hey @jaroslaw-weber and the others. After reading this thread and looking at md book I want to give some thoughts.
|
This comment has been minimized.
This comment has been minimized.
|
@Phaiax Thanks a lot for the input. You raise very important points! During this week we have had some discussions with @steveklabnik @aturon and @KodrAus (big thanks for the help and support!). One thing is certain that we need to catalog all the bits and pieces of the rust documentation story and come up with a strong vision so these will fall into place and reinforce each other. I agree that I would like to be able to balance the usability and searchability of the cookbook with it being a resource that one can explore and shop for ideas. In regard to search, the problem is actually twofold.
And I would be super excited for you to contribute in either of these tasks! Please note that even if we'll not decide to stick with mdbook in cookbook, it would still be used in all the other places rust-lang-nursery/mdBook#51 (RBE, nomicon. rust-book, etc) so it would be super desirable! |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Oct 2, 2017
•
|
Hey, small update (new screenshots). Made crates and tags little smaller, using crates.io tags as categories, also added code buttons (not working yet, just trying to decide on desing). Feel free to comment. I also noticed that comparing to rocket.rs the design is little boring - there are only three colors (rusty, white and black). I will try some different colors later. I am leaving old screenshots just in case. https://github.com/jaroslaw-weber/cookbook-new-design
Also I think compile/copy buttons are too small on mobile. To summarize, maybe we need tutorial page? Also search script is transferable so I think it is worth to start implementing it for the current version. |
This comment has been minimized.
This comment has been minimized.
KodrAus
commented
Oct 4, 2017
|
This is a fantastic effort @jaroslaw-weber! I'm really excited to see the cookbook getting a good UI/UX overhaul. I only want to leave a little bit of feedback so you've got a chance to work through your own vision. Right now I think it's a bit tricky to get context as you navigate through the home page and collections of examples. I think this is mostly because we don't have a search bar and the sections aren't populated with a lot of examples. So I suspect this isn't really useful feedback right now, but wanted to put it out there. Thanks for taking this on! I appreciate it's a lot of effort |
budziq
added this to the impl period milestone
Oct 4, 2017
This comment has been minimized.
This comment has been minimized.
dumindu
commented
Oct 8, 2017
•
|
Hi Guys, 01. Two column layoutI don't know you already selected a final design for Rust Cookbook, but I would like to suggest to use a 2 column layout like on GitBook API Theme About a year ago I suggested the same on Reddit Suggestion: Rust by practice/ Practicing Rust and on Github rust-by-example-Suggestion to use GitBook API Theme but that was not the right time. However I don't know we have any plugin system on mdbook like on Gitbook and the constrains on UX on mobile. A sample I created about a year ago 02. Make more newcomer friendlyPlease make the cookbook more newcomers friendly instead targeting experienced systems programmers like on Rust doc 01. And please give basic to advanced examples to cover more. ex. instead using only this example for std read line, how if we use a list like on this with the recommendations when we have to use each. we should have one page like this for a single topic on each std lib crate Thanks and Keep up the great work! |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Oct 8, 2017
|
I should probably post it in navigation thread
I also added few features since last time:
https://jaroslaw-weber.github.io/cookbook-new-design/generated/index.html |
This comment has been minimized.
This comment has been minimized.
|
Transcription from gitter:
It is highly experimental work in progress @Phaiax has made a POC https://phaiax.github.io/mdBook/cli/init.html?search=init If anyone is willing to lend a hand there especially in rust index generation code by @olivernn https://github.com/olivernn/lunr.rs feel free to jump in (it might require some NLP domain knowledge, but refactoring work is also available)!
We have discussed with @aturon about it. The current consensus is that the beast approach would be to follow crates.io categories (possibly keywords too) and secondarily the used crates names. We are thinking on making the cookbook something along the lines of "extended standard library companion book" |
This comment has been minimized.
This comment has been minimized.
|
@dumindu thanks for the suggestions. Please feel free to join in on the ux discussion anytime. We certainly need more eyes on the matter (I for one have no knowledge about UX design except for some opinionated gut feelings And no. The UX/UI design is still very much under discussion and we might go with few more discussions before anything is decided (cookbook has a long way before it is matured on the level of RBE)
This is a really tricky one indeed! Because in terms of std, we have both TRPL, RBE and the official docs. TRPL and RBE are providing a narrative that by definition cannot be put into the rustdoc, and these try to cover std. Cookbook was originally meant as a "crate cookbook" but general problem/solution approach need not be limited. |
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Oct 8, 2017
|
copied from gitter
|
This comment has been minimized.
This comment has been minimized.
jaroslaw-weber
commented
Oct 8, 2017
|
also, if we want to get people to get casually hooked from google search we may need to consider make snippets standalone as person entering from direct link didnt see previous recipies |
This comment has been minimized.
This comment has been minimized.
|
As discussed on reddit we might be interested in:
|
budziq
removed this from the impl period milestone
May 16, 2018
This comment has been minimized.
This comment has been minimized.
madkeen
commented
Jun 13, 2018
•
|
Hey guys, I would like to contribute my research/design skills to improving the the website. Is this a suitable place for this conversation? I have a growing interest in open-source - keen to see how the design world can benefit from it's awesomeness. But also very keen to see what Rust is capable of in the next 'internet wave', and how it can make peoples experience of technology better: more accessible and more delightful. |
This comment has been minimized.
This comment has been minimized.
|
Hi @madkeen,
Sure it is! |
This comment has been minimized.
This comment has been minimized.
renahlee
commented
Sep 4, 2018
|
Is this still being worked on? I'm looking for open source opportunities to contribute to and would love to learn about the visual design needs for the cookbook. |
This comment has been minimized.
This comment has been minimized.
|
@renahlee I'd love to hear some ideas. This particular issue appears to have stalled, but it is definately an open item. |

brson commentedJul 14, 2017
The current design is basically the result of a single pass back when there were only a few examples, and clearly isn't scalable. It needs a complete rethink. Some requirements
Also see this issue about search and navigation for more thoughts about that subject.