Reimplement docs site main page in css grid#225
Conversation
There was a problem hiding this comment.
Kudos for this PR! I'm glad you're getting some experience with Tachyons CSS and this PR generally does a great job of addressing the underlying issue we're having with our landing page, plus you are fixing or improving several other things.
One request before I test this PR more thoroughly, related to these changes:
I changed the search's type to
overlay
I had to remove the search box from the landing
Can we put the search box on the landing page back to where it was, please? This also entails staying away from overlay, for good reason.
I'll explain:
-
Good, easy search is a big deal: We should aim for the front page to become more functional over time, not less, and that includes giving people the easiest access to our search possible, with the fewest clicks. I'd argue the searchbox is one of the most important features on this page — I use it myself all the time, for example ("I wonder what our docs say about x?" --> docs.validmind.ai --> type into search box). The workaround of telling people how to search from the front page isn't really a solution because you're replacing functionality with an explanation for how our docs UI works — there's an important clue right there.
(In contrast, including more context in the search results via this PR is a positive change, very much in the right direction.)
-
Let's avoid adding complexity (phrased positively: add simplicity): The only reason you've had to remove the search box is because of
overlay, but I think there's a usability trap hidden in that option that prioritizes aesthetics over usability. As much as I like the look ofoverlayand tested it with our docs site before, you now need to click before you can see the searchbox, on every docs page, for every search. Every. single. time. An extra click every time you want to see the searchbox is a small usability anti-pattern with a big impact over time, and it's completely unnecessary since a better option is readily available and already in use on our docs site. That search box should always be visible to entice people to use it.(Wherever possible, we should simplify the experience, similar to how getting to our recommended QuickStart now takes two clicks instead of five.)
EDIT: Rewrote this to focus on the visibility of the search box, as technically it's one click to put the search box into focus vs one click to click the icon and bring up the search box. That said, I still prefer that the search box always be visible — maybe related to having worked for a search company for quite a few years — and losing the search box from the home page is not an acceptable cost to switching to overlay.
I wonder if we can use non-html buttons so we can use the good links everywhere, but so far I haven't figured it out.
Simplified HTML buttons for sure, non-HTML with better linking possibly — I did experiment with what's available during the initial training module development a bit.
We should be able to use basic rounded buttons but our Quarto styling gets in the way, as you can see in these examples:
<button class="{ white bg-pink br3 bn f2 pv2 ph3 mt5 mb5 }" onclick="window.location.href='https://app.prod.validmind.ai/'; return false;">Log in</button>
:::{.dib .white .bg-pink .br3 .bn .f2 .pv2 .ph3 .mt5 .mb5}
[Log in](https://app.prod.validmind.ai/)
:::
The reason Quarto looks different is that it's not really a button as ::: is the equivalent of a div. I'm inclined to say even the HTML button in this example would be an improvement over the much more complex buttons we use today. Or, we could use a slightly different button in Quarto that works well with our existing CSS styling if we can figure out the vertical text alignment.
|
@nrichers I changed the search back to textbox and re-added it to the landing page as requested. It seems like this is a limitation of Quarto to only have the two options for the search box (and not being allowed to define different versions of the searchbox on different pages), so I suppose we'll just have to live with the squished search results. I played around with the options for Tachyons buttons but they honestly don't look as clean as the HTML ones (and we don't get to choose the exact right shade of pink), so I left those for now as well. |
There was a problem hiding this comment.
LGTM! 🚀 I pushed a9dfc87 to fix a couple of issues:
- The developer & validator links were broken, fixed (index.qmd is already a level above guide/ so no need for the
../). - The images were missing
fig-alttext, might as well fix while I was reviewing.
My only other comment is that it feels like there is just a bit too much whitespace in the navbar now. E.g. on a 1440x900 laptop screen, it feels like we're conceding just a bit too much whitespace to the words that matter, to the point where it detracts from the reading experience. Up to you if you want to make any additional changes or leave as-is, though.
(Granted, I feel about whitespace in the context of words much the same way some people might feel about the libretto in opera — it's just an excuse for the music. Too little and it's not opera; too much and it gets in the way. :P )
Good catch, thanks!
Yeah, I was gonna rename + tag these at some point after our filename convention agreement, but thanks for doing that in the meantime!
I would rather leave it as is, as I introduced this white-space deliberately with the idea that the old navbar was a bit too cluttered for my poor dyslexic eyes (even now, after a few months in where I ostensibly know where to look and where things live!). There are smarter people than me who can more effectively argue why white-space is important, especially on screens (ever try to read a really squished PDF or one really big rambly paragraph like this one, for that matter?), to direct the flow of information and give users room to differentiate between items, for example. I think the amount it has now says "this is a navbar" whereas before it blended into the rest of the site with little visual distinction which is why I didn't even notice it was there the first few times I perused the docs. I will render this PR and merge it after I'm done with the template edits for Barclays today, thank you for your thorough review! |
Works for me! |

Internal Notes for Reviewers
Major changes
index.qmd landing page
styles.css(which I modified for the custom elements on this page) and a tiny bit of custom css for the special links/buttons on this page and Tachyons!.qmd) ones, except for the ones in the buttons.Search box
overlayshow-item-contexttotrue, which gets us the breadcrumbs on the search for the pages!Header
customize-documentation-templates.qmdwhich has the extra CSS on top of it... hm. Maybe another Story to investigate, but it's honestly not noticeable unless you're watching it.Footer
repo-actionsto falseCaveats