Device OS API Reference Docs Update

As you may have noticed, there have been two parallel sets of pages in the Device OS firmware reference for years. The /cards/firmware is what you’d get from search, and it had one topic per page. This is necessary to make search work reasonably. And then there was the single-page three column listing in the reference section. One problem is that as the reference has gotten bigger, it takes a significant amount of time to load on slower computers or slower internet connections.

Well I finally did it. I fixed the multi-page version to work well, and it’s now the default.

Don’t panic: The old way is right below it in the navigation as “Device OS API (Single Page)” and all of your old links still work to the single-page version if you prefer the single-page 3-column style.

But here’s why the new multi-page version is great:

  • It loads much more quickly, both because the page is smaller and also because it doesn’t have to generate the left navigation for the entire reference at page open.
  • Multi-page now has continuous scrolling, both up and down. When you reach the limit of what you’ve loaded, it adds a new page above or below it so you can scroll along just like the single-page version.
  • Keyboard previous/next page (Shift-Left Arrow or Shift-Right Arrow) now loads the next page into continuous scroll so the entire page no longer needs to reload, and it’s very fast.
  • As you scroll, the URL bar now updates so if you restore tabs, you come back to the same place you were before.
  • Code examples are inline instead of on the right column, which I think is easier to read and follow, and also has less line-wrapping.
  • Firmware library reference is now integrated into the regular docs menu hierarchy instead of being hidden from navigation. This was a historical limitation in the docs infrastructure, and the limitation no longer exists.
  • On mobile, fast load + continuous scroll is awesome.

https://docs.particle.io/reference/device-os/api/

9 Likes

Wooo! :slight_smile: I love this.

1 Like

great work!

1 Like

I love this too! I’ve been stuck in the docs the last couple of days and noticed things were “different”. It’s much nicer to navigate.

1 Like