Rails API Guides navigation

The api.rubyonrails.org site has a consistently quirky interface. It you go to the main site, you get this frames-based page with a nice search function on the side. But if you follow a link to anything in there, for example https://api.rubyonrails.org/classes/ActiveRecord/Persistence/ClassMethods.html#method-i-create, you lose the ability to browse around or search.

7 Likes

It would also be really neat to have a panel to switch versions, kind of like Typescript and .NET’s docs have.

3 Likes

I want to add that this thread is the first time I’ve ever even seen the sidebar! I would love an easy version switcher as well.

2 Likes

There’s some similar conversation going on in No search in Rails Guides if you want to join the party there!

This pull-request on SDoc removes frames in favor of a CSS solution on the guides :tada: :

@sunfox That’s fantastic! This PR is almost a year old though. How can we boost its visibility?

I’ve pinged the original author, hopefully this can help to get it merged. Having more :+1:, reading and testing the code could also help this PR get some momentum.

1 Like

I’ve updated the PR. There still are lot’s of things we can improve in later PR’s:

  • I always find the top namespace pages confusing: ActionCable
  • We could show methods in the sidepanel as well…
  • We might collapse the linked files in the top bar…
2 Likes

While we’re documenting the API, could this become an official page, please?

One of my less-happy tasks is going back in time and working on sites that have been lying fallow for a very long time. Just remembering what version of each dependency I can get away with is the largest part of the problem. And if you want to upgrade something you wrote five years ago, your first step is getting it to run locally, so you can be sure your tests are still green, before you change anything.

Walter

2 Likes