thinkle / gourmet

Gourmet Recipe Manager
GNU General Public License v2.0
341 stars 141 forks source link

Alter Database Field to Allow a Recipe to Have More Than One Category #1008

Open zombiewoof opened 3 years ago

zombiewoof commented 3 years ago

If the database, that is used, allows something like MySQL 'LIKE', it would be nice to be able to associate more than one category with a recipe. For example, I have a Chicken Soup recipe that is prepared in a crock pot. It would be convenient to have the recipe listed in Poultry, Soups, and Crock Pot instead of having to pick just one category.

thinkle commented 3 years ago

Recipes already can have more than one category :)

Looks like there was no slick widget for doing a multi-pick, so it's just comma separated at all (which means a category can't have a comma in it).

Tom

On Tue, Oct 13, 2020 at 12:26 PM zombiewoof notifications@github.com wrote:

If the database, that is used, allows something like MySQL 'LIKE', it would be nice to be able to associate more than one category with a recipe. For example, I have a Chicken Soup recipe that is prepared in a crock pot. It would be convenient to have the recipe listed in Poultry, Soups, and Crock Pot instead of having to pick just one category.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/thinkle/gourmet/issues/1008, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAELYW5R2XAB5B3EFPRLEZTSKR5R3ANCNFSM4SPGULYQ .

zombiewoof commented 3 years ago

Maybe clicking category input could open a window, with the categories listed and a checkbox for each one? Already chosen category(ies) already checked.

zombiewoof commented 3 years ago

I have worked up a screen, in PHP, to illustrate the window I mentioned in my earlier comment. I realize that this probably can't be done with a widget, but shouldn't be too complicated to implement.

The 'New Category' input could be allowed to accept the currently used CSV-type input to add more than one new category or add categories to the chosen ones. Parsing of the input should check against the existing list of categories to prevent duplication - found item(s) should be added to the chosen categories for this recipe, as would any new category(ies) added.

Screenshot from 2020-11-02 16-42-17

thinkle commented 3 years ago

Yes -- I'm not too likely to work on the GTK side of things but others are welcome too. Here's how it's currently implemented in my web-based prototype -- a type/dropdown combo + a tags interface.

[image: image.png]

On Mon, Nov 2, 2020 at 4:54 PM zombiewoof notifications@github.com wrote:

I have worked up a screen, in PHP, to illustrate the window I mentioned in my earlier comment. I realize that this probably can't be done with a widget, but shouldn't be too complicated to implement.

The 'New Category' input could be allowed to accept the currently used CSV-type input to add more than one new category or add categories to the chosen ones. Parsing of the input should check against the existing list of categories to prevent duplication - found item(s) should be added to the chosen categories for this recipe, as would any new category(ies) added.

[image: Screenshot from 2020-11-02 16-42-17] https://user-images.githubusercontent.com/4460090/97922574-b1938880-1d2a-11eb-8998-a0ef161257b8.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thinkle/gourmet/issues/1008#issuecomment-720746147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAELYW4INBMSDIMHVKVO6P3SN4TDFANCNFSM4SPGULYQ .