GNOME Bugzilla – Bug 779908
Change editing/adding of ingredients to be less popover-driven
Last modified: 2017-05-05 11:40:20 UTC
We want to change this to be more inline in the list, instead of the very jumpy popover we have now.
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
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: GrIngredientsViewerRow GtkBox unit_label ingredient_label buttons_stack to something like this: GrIngredientsViewerRow GtkBox GtkStack unit_label unit_entry GtkStack ingredient_label ingredient_entry buttons_stack 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.
Created attachment 350365 [details] [review] Add-Initial-Editing-for-GrIngredientsViewerRow
We are putting this together on the inline-editing branch
Most of this has landed now, some refinements are still happening.