[Plugin] Updated recipe plugin

143 views
Skip to first unread message

Odin

unread,
Jan 12, 2021, 11:58:40 AM1/12/21
to TiddlyWiki
In this thread, Jonathan Lundquist proposed that the edit tiddler button redirects to the recipe editor tiddler instead of editing the tiddler. I went with another approach. I added a toolbar button that only shows up at tiddlers tagged with 'Recipe' letting your opening your recipe directly in the recipe editor(by default all recipes are tagged 'Recipe', but this can be changed in the config).

I also added a new category to filter the recipes with. You can now set add a course to each recipe (breakfast, lunch, dinner, snack and other). For now, the options are hard-coded, but in the future, I want to figure out a way to make this configurable so that users can add and remove options without needing to edit the plugin tiddler.

You can find the plugin at: https://odinjorna.github.io/recipe-plugin/

springer

unread,
Jan 12, 2021, 12:37:11 PM1/12/21
to TiddlyWiki
Thanks for developing this recipe plugin! 

Small glitch: the default tag for new recipes is Recipe (with a capital R) and yet the read-me says that we'll see the toolbar for anything tagged with recipe (no caps). 

So it seemed to be not working, until I tracked down that discrepancy.

-Springer

Odin

unread,
Jan 12, 2021, 12:48:19 PM1/12/21
to TiddlyWiki
Thanks for the reply! I will fix the typo in the readme. But it the typo isn't in the code, see screenshot. Note that if you change the default tag settings in the config tab, it only applies to newly made recipes. So the button won't shop at recipes with the old tag.
screenshot.jpg

Op dinsdag 12 januari 2021 om 18:37:11 UTC+1 schreef springer:

springer

unread,
Jan 14, 2021, 2:17:36 PM1/14/21
to TiddlyWiki
Hi Odin!  A bit more feedback on recipe plugin:

(1) Appreciation: I think this is a very valuable kind of thing to offer, especially if we're inviting folks to adopt TiddlyWiki as a friendly personal notes app.

(2) Search glitch: Installing the plugin (dragging it to my wiki) does not seem to carry over any visible cues about the need for, or mechanism for, a custom search (to deal with everything being tucked into fields). So, users won't easily understand why they can't find recipes with "molasses" (for example) based on using the standard search interface. UPDATE: I've now found your "dashboard" shadow tiddler *was* installed with the plugin, but I needed to find out the name (by hitting edit at your demo site) and do an advanced search (or troll through the plugin contents) to find it; it doesn't seem to "live" in any convenient place yet, and isn't linked up within the read-me or config tabs for the plugin.

(3) text field: It seems a good practice to use the text (body) field for something text-like, especially if it's likely to look like paragraphs. So, I'm not sure why the default text field of the tiddler wouldn't be ideal for holding the instructions. Unlike with the ingredient list, there doesn't seem to be much special formatting for instructions (apart from having multiple paragraphs -- which of course is what the text field is designed to handle anyway). One benefit would be less of a search gap, since at least the default search would "see" into the instructions if they're in the basic text field. Also, if the plugin gets disabled, or a tiddler gets dragged to a new wiki, a better glimpse of the contents would still be recognizable and display decently.

(4) recipe tag change: If someone changes the "default tag for new recipes" they currently risk losing the recipe template display (and search functions, etc.) for any existing recipe tiddlers. So, when I opt for "recipe" instead of "Recipe" (as I avoid capitalized tags), is it possible to build in an option, right there, to change the tag on any existing tiddlers with the old tag, so that changing the tag doesn't leave those tiddlers behind? (I have access to ways to rename tags, but again I'm thinking of beginners.)

All of the above issues are ones that dedicated TW5 users can work around; my feedback here is just on the level of suggestions for ensuring that the plugin is user-friendly for folks who haven't already become TiddlyWiki converts with a decent sense of how to troubleshoot. Especially if it's refined to be more beginner-friendly, then this plugin, as I appreciate above, will be an attractive "off-the-shelf" solution for the TW showroom.

Thanks again!

-Springer

Odin

unread,
Jan 19, 2021, 5:55:43 AM1/19/21
to TiddlyWiki
Hi Springer!

Many thanks for the detailed feedback! It is much appreciated. Especially as I seek to make this plugin as user friendly for beginners as possible. I will make the dashboard more visible, as I envisioned this as the main hub for all recipe related activities. So users can't miss it :)

Regarding the text-field: when making the plugin, I was advised on keeping it empty, as it would allow users to add their own comments and texts. Storing all data in fields, and transcluding the field contends through a viewtemplate instead of pasting it all into the textfield would make it more "foolproof". Because it would prevent users from editing the textfield and breaking the styling for example. But I didn't realise that it would impact the search capabilities. I am viewing it as a trade-off and am leaning towards keeping it as is, because there is a recipe editing form that is bundled with the plugin. So there isn't a need to open up the default editing screen in most cases.

About the recipe tag change: This is something I had thought of. But wasn't really sure how to solve at the time. I think the config could contain a button that changed the tags. Where users can input the old tag name and a new one. I think TiddlyCommander has functionality like this.

I will try to update the plugin when I have the time. Good to know people are using it : )
(I even got my first star on Github : D)
Op donderdag 14 januari 2021 om 20:17:36 UTC+1 schreef springer:
Reply all
Reply to author
Forward
0 new messages