Skip to content

feat: added initial rework of docs #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

0xcadams
Copy link
Contributor

@0xcadams 0xcadams commented Jul 9, 2025

Updated docs with:

  1. Revamped search using cmdk and lazy imports instead of a fetch to pull the JSON. Reduced the debounce time and added preloading so it feels fast. Fixed markdown to plaintext.
  2. Reworked navigation: renamed sections for (hopefully) more clarity, added icons & animations, changed grouping, and made some groups default to closed to feel less overwhelming.
  3. Random rewording for clarity.
  4. Added fun hotkeys for quick navigation around the docs.
Screenshot 2025-07-09 at 4 41 07 PM Screenshot 2025-07-09 at 4 42 03 PM Screenshot 2025-07-09 at 4 41 48 PM Screenshot 2025-07-09 at 4 41 38 PM

Copy link

vercel bot commented Jul 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
zero-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2025 6:35pm

@0xcadams 0xcadams marked this pull request as ready for review July 9, 2025 20:55
@0xcadams
Copy link
Contributor Author

0xcadams commented Jul 9, 2025

@aboodman @alexhking welcome any feedback you have here (I can't assign you as reviewers yet w/o permissions).

@aboodman
Copy link
Contributor

Wow!

Supportive of most of this. Specific feedback:

  • I do not like the visual noise of the hotkeys on the buttons and links. Sorry.
  • I do not like to use rules (lines) as separators in our designs if we can avoid it. I like the layouts to be clean enough to not need them. I do not think they are needed here. Remove.
  • I like the improved performance of the search.
  • I do not like how the search box changes size depending on how many results there are. It should always be the same size.
  • I am mixed on the icons, but I want to try it out for a bit.
  • I like the restructure of the nav, but I think that "Postgres" should continue being the second section
  • There is a layout bug introduced around the subnav
    on the right side where it doesn't always align w/ the search box (see video: https://github.com/user-attachments/assets/82f980df-d102-4199-9db7-8cfa16b837fe)
  • "markdown to text" – nice fix.
  • I need to go through the copy changes.

@alexhking
Copy link
Contributor

Nice! This is a whole lot of work and looks pretty cool. I did notice a few things looking through the code and while testing it out. Going to do a deep dive and then do inline comments, etc. Thanks!

@alexhking alexhking self-requested a review July 10, 2025 14:52
@0xcadams
Copy link
Contributor Author

Sounds great - I will make updates based on this (and Alex I'll wait for your feedback). If either of you have any changes for how the icons are shown, let me know. I was trying to make the sections clearer visually.

I will make smaller PRs in the future, got a bit ahead of myself.

@alexhking
Copy link
Contributor

initial-review-compressed.mp4

@0xcadams ☝🏼 Initial visual review

Copy link
Contributor

@alexhking alexhking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some inline comments along with the video from above. Thanks for the nice work!

app/page.tsx Outdated
@@ -57,21 +72,26 @@ export default function Home() {

<div className={styles.navLinks}>
<Button
variant="outline"
className={styles.primaryButton}
className="flex items-center gap-2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice that you're putting back the tailwind classes. Initially when we created this docs site from Aria Docs, we wanted to get rid of tailwind completely. I'm not a huge fan of it, but if you're more comfortable using it we can keep it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it - I was under the impression you were trying to move in the opposite direction. Yeah personally I like tailwind because it is simple and global styles are tough to manage as things grow. But duly noted, I won't step on these changes in the future

<CommandItem
key={item.id}
value={item.id}
onSelect={() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where things could break with standard browser behavior. Handling navigation with router.push breaks standard link functionality.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, fair point. I will try to rework to use links with prevent default. Not sure how well that integrates with cmdk

[tocs, level2Tocs],
);

useHotkeys(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], e => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we do if more than 10 headings exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hotkeys only apply to the first ten - and if there's only one header it doesn't show them.

@0xcadams
Copy link
Contributor Author

Thanks for the feedback!

I made some changes to the search box - pinned to the top. It's more similar to how it currently is - let me know if this doesn't address feedback.

  • I do not like the visual noise of the hotkeys on the buttons and links. Sorry.

I moved this to a tooltip instead of showing in the button. Agreed it was noisy.

  • I do not like to use rules (lines) as separators in our designs if we can avoid it. I like the layouts to be clean enough to not need them. I do not think they are needed here. Remove.

Removed

  • I am mixed on the icons, but I want to try it out for a bit.

Open to any changes here

  • I like the restructure of the nav, but I think that "Postgres" should continue being the second section

Done

Fixed this

  • I need to go through the copy changes.

Should've done these separately, will do this in the future.

Alex:

  • I changed the icon for the solidjs - let me know if this is better. The icons are mostly based on Lucide (shadcn and a lot of projects use it): https://lucide.dev/icons. Exceptions are the brand logos (React and SolidJS)
  • I fixed the back button issue - thanks for finding that.

@alexhking
Copy link
Contributor

Thanks for the quick revisions. On the surface it looks good to me, the hover states are cool. Curious what @aboodman thinks. Otherwise, lgtm.

@aboodman
Copy link
Contributor

aboodman commented Jul 12, 2025 via email

@0xcadams
Copy link
Contributor Author

Few more bits of visual feedback in attached movie:

I will address these!

As for tooltips, sorry still not a fan, it just seems superfluous. How often is somebody going to click on these? Are shortcuts really needed? It seems harder to process that there is a shortcut and use it than to just click? Is this something you yourself want Chase? Or thinking others wants it?

My thought process was that it's more of a branding choice.

I assume a lot of early adopters using Zero (and early inspirational products using sync engines) have keyboard shortcuts. To my mind, it's more of a reflection of how zero users want their products to be - fast to load, fast to search, and have keyboard shortcuts for fast navigation.

That being said, they're not incredibly useful and personally I would likely not use them outside of the novelty of it. I'm open to feedback - up to you where you want this to go!

@aboodman
Copy link
Contributor

I assume a lot of early adopters using Zero (and early inspirational products using sync engines) have keyboard shortcuts. To my mind, it's more of a reflection of how zero users want their products to be - fast to load, fast to search, and have keyboard shortcuts for fast navigation.

Ah! That's an interesting rationale. But yeah I think let's not do things artificially. The docs are a reflection of our quality standards too and part of quality is making things useful (and only making things that are useful).

Anyway, we have zbugs which is an actual real app that we can use and add keyboard shortcuts to.

@aboodman
Copy link
Contributor

A trick I often use with product questions is just asking what we ourselves want. We are the target market for Zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants