outmoded / lout

API documentation generator
Other
276 stars 49 forks source link

Partition array display into 3 parts #138

Closed kpdecker closed 8 years ago

kpdecker commented 8 years ago

Create separate list for ordered, unordered, and forbidden items within arrays.

image

Is what I'm working with right now. This also updates the non-ordered case to the following: image

I feel like there could be some improvements here, but I'm not sure what exactly. Feels potentially confusing with the alternatives UI. Opening PR to start discussion there.

Fixes #130

Marsup commented 8 years ago

LGTM. Maybe "alternatives" could be of a different color to make it obivous that it's some kind of keyword ?

kpdecker commented 8 years ago

I'll rebase this when the alternatives branch is merged and put together an example with them side by side.

Marsup commented 8 years ago

Merged.

kpdecker commented 8 years ago

Rebased. image

There are 2 arrays and 1 alternatives structures in this screenshot. I don't know that this is the clearest thing in the world, but at the same time I wonder how many people are going to this level of complexity in Joi. At a certain point I start to wonder if you're API design has underlying issues if you're creating this complex of validation rules.

Marsup commented 8 years ago

Agreed that the different parts are not very visible. What about using a color to note meta information ? (this + alternatives)

Also after some time, the details at the far right is not very ergonomic, it's hard to see which details relates to what.

kpdecker commented 8 years ago

How does this feel? image

Re: details, there is a link hover and the name sections are still clickable, but open to other ideas.

Marsup commented 8 years ago

I'm no color expert but it looks OK. I didn't realize it was clickable, mouseover is fine to highlight the link, not the other way around (except for objects).

kpdecker commented 8 years ago

Pushed the changes for red text.