Closed wenxin-wang closed 9 years ago
@stieizc this is a feature called condensed navigation. In Aglio 1.x you can use --no-condense-nav
to disable it (in Aglio 2.0.0-beta it is --no-theme-condense-nav
). The way that it works is that it will condense the navigation down to a single item if and only if the resource has only one action. If there are more actions, then no condensing happens.
You can see both in the example API Blueprint. The Note List
resource has two actions and both are shown, while the Users
resource has only a single action and will be condensed to a single item.
The idea is to make the navigation as small as possible so that you can see as many items as possible. I'm definitely open to suggestions on how to make this better!
I like your way of leaving an option for turning it off, and condensing the side bar is okay to me.
Personally, I would prefer that the Resource section title (in the red frame) be the original title, and leave the side bar in the condensed style. Currently, the Action section title appears twice in the main area, which is a little bit confusing for me (I spent some time checking the syntax). Maybe this could be done by hiding the Resource section title in the side bar, instead of changing it (which I assume is the current implementation).
Anyway, thank you for making aglio:)
I notice that with --no-theme-condense-nav (I'm using beta), the Resource section title still gets changed. Is that also a feature?
@stieizc good point. After looking into this a bit I think you are right and it should only happen in the navigation. I'll fix that for the next beta release today.
Wow so fast, thank you! Look forward to it.
This should be fixed with the latest beta. Please re-open if you are still having an issue!
Hi all, Thank you for making such a great tool!
I found a little issue, I don't know if it's a bug, and don't know if anyone else had found it. I'm new to the blueprint so maybe I'm doing it wrong.
In a Resource Group, if there's an Action section under the resource section, the name of the resource section will be override by the first Action section's name. If there's no Action section, then things are fine (but of little use).
Here's the blueprint:
And here's the screen shot:
Notice that the name of the Resource section gets overriden.
By the way, the Resource name didn't show up in the side bar either.
Thanks in advance! Have a nice day.