nextcloud / nextcloud/cookbook

Jump to new ingredient when pressing Enter/Return in ingredient text box

Open
#2,114 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
641
Forks
113
Avg merge
21h 31m
Merged PRs (30d)
26

Description

Is your feature request related to a problem? Please describe.
When typing in a new recipe (e.g. copying it from a paper medium), inserting multiple ingredients is tedious: typing in one -> use mouse or 4-5 tabs to add a new ingredient line -> select that -> repeat.

Describe the solution you'd like
When pressing Return/Enter in an ingredient field, add a new ingredient field below or at the end AND set it to focus to simplify creating new ingredients.

That may also be implemented to the tools text boxes.
And maybe to the instruction text boxes as well, however as those accept new lines, this feature should may only be triggered e.g. when pressing return twice or by using CTRL+Return to avoid interfering with users wanting to use new lines there etc.

Describe alternatives you've considered
One can currently "abuse" the feature from #379 (#325) by typing all ingredients into a text editor and then copying them all over at once to the recipe. However, a direct integration would still be nicer, more intuitive and IMO should be relative easy to implement (however I sadly have no time and no insight to the code of this project as of now).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the browser recipe editor's ingredient text-box implementation and the code that adds ingredient rows. Reproduce the workflow in a new recipe, then verify that pressing Enter adds a row below or at the end and focuses it. Consider the separate behavior requested for tools and instruction text boxes, where multiline input may require a different shortcut.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.