After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779908 - Change editing/adding of ingredients to be less popover-driven
Change editing/adding of ingredients to be less popover-driven
Product: recipes
Classification: Other
Component: general
Other Linux
: Normal enhancement
: ---
Assigned To: Recipes maintainer(s)
Recipes maintainer(s)
Depends on:
Reported: 2017-03-11 17:04 UTC by Matthias Clasen
Modified: 2017-05-05 11:40 UTC
See Also:
GNOME target: ---
GNOME version: ---

Add-Initial-Editing-for-GrIngredientsViewerRow (12.12 KB, patch)
2017-04-25 06:26 UTC, Ekta Nandwani
committed Details | Review

Description Matthias Clasen 2017-03-11 17:04:00 UTC
We want to change this to be more inline in the list, instead of the very jumpy popover we have now.
Comment 1 Matthias Clasen 2017-04-20 11:30:28 UTC
I've started to prepare this on the inline-editing branch. What I've done so far is to break out the ingredients list as a separate widget: GrIngredientsViewer, with a GrIngredientsViewerRow widget for individual rows. The new widget has a non-editable mode. It is used in both the details and edit page.

I have reimplemented most of the ingredients list manipulation with the new widget:
- adding/removing new lists
- changing list titles
- adding/removing ingredient rows
- reordering ingredient rows

The one thing that is missing is actual editing of ingredients and amounts. All the code for the popovers and searching/filtering has been removed. We will bring it back in a different form.

Suggested next steps:
1) Make basic editing (without any assistance) work by replacing the labels with entries when the edit button is clicked and saving changes upon Enter. Open question: separate entries for unit and amount ?
2) Bring back the filtering/searching for ingredients in a form that is more like entry completion
3) Bring back filtering/searching for units in the same form
Comment 2 Matthias Clasen 2017-04-20 11:41:48 UTC
Details about the first step:

Since we now have separate widgets, the editing needs to go into GrIngredientsViewerRow. It is gr-ingredients-viewer-row.c and .ui. I would suggest to change the widget hierarchy in the ui file from this:


to something like this:


and then switch the stacks to show the entries when the edit button is clicked. I suggest two separate stacks (instead of just one) here so we keep the same sizes between the labels and entries.
Comment 3 Ekta Nandwani 2017-04-25 06:26:29 UTC
Created attachment 350365 [details] [review]
Comment 4 Matthias Clasen 2017-04-27 01:36:08 UTC
We are putting this together on the inline-editing branch
Comment 5 Matthias Clasen 2017-05-05 11:40:20 UTC
Most of this has landed now, some refinements are still happening.