Repository navigation
Add suggestions when features are incorrectly specified - #48963
Conversation
1b194c6 to
2413f1c
Compare
|
I think the changes make sense, but not sure why we'll have two different behaviors for unknown options or unknown features. With options we show the top matches regardless of similarity score, here you'll show the top matches only if they meet a threshold, otherwise you'll show everything. I think the reasoning for the former is that the user can do a help command or search the docs if they don't see what their looking for - is there something different about features such that it's more helpful to show all of them? |
@shawkins @Pepo48 Thanks for the review! First of all, I wanted to have behavior changes rather low for outputs - it means that if users specify feature incorrectly, the full list is shown, and they can see the possible features (some people can be used to that 😛 ). I find showing the full list of features as the worst case for the output, but IMHO it's still better than hiding it, and pointing to the docs, or running some "big help" command (if we have sth like "./kc.sh help features", I'd be ok with that). That's the difference for options and features - right now, we have ~50 features that could be listed, so it's not VERY bad, so we can still show them in the output.
Considering the case B), I'd still rather list all features, than suggest some nonsense for features 😁 |
Closes keycloak#48962 Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Co-authored-by: Peter Zaoral <pepo48@gmail.com> Signed-off-by: Martin Bartoš <mabartos@redhat.com>
There was a problem hiding this comment.
I assume the fact that the suggestions mechanism only goes through "disableable" features, meaning the essential features (e.g. hostname) will never be suggested, is deliberate design choice, right?
If so, then LGTM. Thanks, Martin!
* Add suggestions when features are incorrectly specified Closes keycloak#48962 Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Address review comments Co-authored-by: Peter Zaoral <pepo48@gmail.com> Signed-off-by: Martin Bartoš <mabartos@redhat.com> --------- Signed-off-by: Martin Bartoš <mabartos@redhat.com> Co-authored-by: Peter Zaoral <pepo48@gmail.com>
OLD
NEW