Closed kpdecker closed 8 years ago
LGTM. Maybe "alternatives" could be of a different color to make it obivous that it's some kind of keyword ?
I'll rebase this when the alternatives branch is merged and put together an example with them side by side.
Merged.
Rebased.
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.
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.
How does this feel?
Re: details, there is a link hover and the name sections are still clickable, but open to other ideas.
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).
Pushed the changes for red text.
Create separate list for ordered, unordered, and forbidden items within arrays.
Is what I'm working with right now. This also updates the non-ordered case to the following:
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