fix(tagging): allow tags to be added on space, comma, clickaway #2025
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.
Problem
Currently, adding tags requires the user to press enter, which can be non-obvious and unintuitive.
Solution
Allow tags to be added when the user presses enter, space, comma, or clicks away from the tags input.
But a slight ordering problem happens when the user clicks away from the tags input to the "create link" or "save" button at one go:- When the user clicks "create link" on the create link form, first the tag input is added, then the link is created;- When the user clicks "save" on the edit link form, first the link is saved, then the tag input is added.edit: above problem is fixed, always adds tags before saving. but the solution might be a little unclean though
Some extra fixes: slight amendments to logic for disabling save/create link buttons