Repository navigation
[FEAT] Select fields accept a value the candidate list does not hold - #159
Merged
Merged
Conversation
…ndidate list does not hold, typed and validated in place
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
(none), thenOther (enter manually). Every new scope went through that last row: move to it, press Enter, then type the value in a second prompt.Create "..."row. When nothing matches, that row is the only one and it is already selected, so a new value costs one Enter.dialoguer::FuzzySelectreturns one of the items it was built with and nothing else, so the picker is a new prompt insrc/prompt/picker.rs. It draws itself on the terminal but renders every line throughtheme::prompt_theme(), so it looks like the other prompts.(none)stays for an optional field, and returns no value. Arrow keys, Tab, Home, End, Backspace, and Del work. Esc and Ctrl-C cancel the prompt. Avalidationregex that rejects the value prints the message under the list and the prompt stays open.Fix found along the way
rona -g -ifell back to the built-in message format when the user skipped an optional extra field.build_commit_messagevalidated the template against the fields that were answered, so{?scope}was an unknown variable as soon as the scope was absent:Validation now uses the declared
commit_extra_fields, likerona branchandrona pralready did. The message isfeat: Tidy up.