-
Notifications
You must be signed in to change notification settings - Fork 98
Improved category selection for recipes #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@sam-19, as you managed to do quite some work on the frontend: Do you see a chance to implement the frontend part when you have a API interface to fetch all or some of the recipe categories? If yes, I could try to create such an API endpoint in the backend. |
The Nextcloud-vue library has a component called MultiselectTags. I think it could be used to serve this purpose. There is already an API call to return a list of recipe categories, even if it does return a bit more information than is necessary. Now I would need to do some testing to see how the component works, but I suspect we may not need anything other than what already exists. I'm afraid using a pre-existing component doesn't leave much room to create fancy input matching schemes, but I imagine a basic string compare should be enough unless someone has hundreds or thousands of categories (unlikely?). I'll get back to you once I've had a change to try it out. |
@sam-19
but when making the app I got some error messages like
Do I need to register the components somewhere? Could you help me out here? :) |
You’re right. I’m using @christianlupus nextcloud docker dev setup. The error appears when checking out the master branch and inserting above line
and
e.g., in |
I cannot confirm this behavior. I created this branch and I am capable of calling |
That is good news! It happens in the What I tried was reinstalling node, the As this problem doesn’t seem to be related to this issue, we shouldn’t spam this thread anymore. I edit this post if above helped. Edit: It turned out that this problem was related to the node/npm installation on my macOS system. The version installed via homebrew seems to have been broken. npm installed the |
Current state
In recipe-editing mode the complete category needs to be typed in by hand. Typos result in newly created categories requiring manual fixing of recipes.
Proposed state
When typing in the categories field the typed string is compared to all existing categories. Initially the comparison could be done character by character, later maybe with some fuzzy search. The detected category or a list of best results should be presented to the user who can select the correct one by clicking with the mouse or selecting with the arrow keys + return.
Alternative
An alternative for the selection would be a dropdown list in which all existing categories are presented. The user can select from the list to fill the category field of the recipe.
Additional Considerations
This suggestion could also be relevant for selecting ingredients, keywords, and tools. Maybe a generic approach which is reusable for those cases might be a good thing.
The text was updated successfully, but these errors were encountered: