Correct practices for applying changes to TiddlyWiki Styles

This is true, however I think this is less due to a lack of wanting to do it properly and moreso a side-effect of a lack of knowledge for recommended practices for applying new elements to tiddlywiki.

I know back when I was first getting into modifying the UI, I would just make a bunch of tiddlers with copy/pasted CSS from other stylesheets, tag it to match, and would just leave it that way, as well as in plain tiddlers with <style> sections inside of them, or copy pasting tags with specific styles applies.

One of TW unavoidable shortcomings comes from how open it is to customization, in that making specific guides and guidelines can be a bit difficult, but as far as Stylesheets, themes, and Plugins go, I think it would benefit to actually differentiate their use-cases.

Personally, I see plugins as anything that modifies a specific section or function of TiddlyWiki, with a Theme being a specific type of plugin, aimed at only modifying the appearance of TW.

The only problem with this approach is how you cannot use multiple themes, such as one to modify buttons, and another to modify the story river, whereas plugins you can do this. I do not know if this is intentional or not.

If this isn’t the correct way to think about it, then that is also a good point to add as far as explaining their functions. It would seem documentation on the usage of Themes is a bit scarce on the main site.

If documentation were created by a user, where would they submit it to be evaluated and possibly added to the main website?

2 Likes

FYI:

A Plugin is a bundler of json tiddlers with a plugin-type including plugin/theme/language and in fact you can have others (That is a hack)

I think when you refer to a plugin you are really thinking of plugins that act as a modular solution that can be be used happily included with others. Plugins named as themes can be switched and only one applies at a time, so it is a global and selectable package of tiddlers.

That is

Themes are one OR the Other at a time - but they are still “plugins”

Plugins are used one or more simultaneously

You could actually extract tiddlers from a theme and use them separately if you wanted a degree of simultaneous settings.

Arguably you could create a theme Just to have switchable elements, look at the Snow White theme it depends on $:/themes/tiddlywiki/vanilla as will most themes.

Hm, I had forgotten about how snow worked, thats a good point!

So my general Idea was in the right ballpark metaphorically speaking, but with your clarification I can see I missed some details.

If you don’t mind further elaborations, what makes the use of multiple plugins at once a hack? (Was that not intentional in design?)

Sorry, Here I was referring to other plugin types eg the plugin-type field can be any made up value such as “data” but you will need a new tab in Control Panel > Plugins to list them.

Ahh, I see.

What would be the purpose in giving it a quasi- plugin-type? Wouldn’t tiddlywiki default to just registering it as a normal plugin plugin-type?

Yes, As I said it is a hack, I personally want the core to adopt some additional types but in the mean time I can construct my own. And separating them from regular plugins would be nice eg;

  • Data - plugins containing data tiddlers from references to incoming business transactions. They do nothing unless parsed by another tool
  • Book - a readable piece of content
    etc…

Plugins can be dragged else where, disabled, and shadows edited, or all deleted in one hit.

  • Additional features I am developing includes a way to update the current plugin with the edits applied to the shadows.
1 Like

Sounds useful, to have the ability to push changes to the plugin. The way your working on it wont require you to repack it?

It will repack it but without the user needing to think about it.

Hmm, I’d be very curious how you get around the need to save and reload. It was my understanding that this was reuired for a plugin to push changes, but I may have the incorrect idea.

We are straying off topic but its your Topic :nerd_face:

You “understanding” is the common one.

In recent versions it is now only tiddlers containing javascript modules that need the wiki to reload, and then only if you want the changes to take effect.

  • So no javascript, no reload needed, no problem
  • If has javascript only if you must reload it. So this does not stop you updating it.

Did you know?;
If you drop one or more tiddlers on a wiki then they are added to the $:/Import tiddler as JSON tiddlers, rename the $:/Import tiddler, deleting any stray fields and set the plugin-type to plugin and you gain a “plugin”.

I did not, thats interesting. :thinking:

Haha yes, I do that more than I’d like to admit.

Well returning back to the main topic of the, well- topic, is there anything you’ve noticed others do when it comes to applying css or overwritting core styles?

This additional tab lists any other plugin type in a wiki

Other-plugin-types.json (1.5 KB)

Others are much better than I at CSS, but I just take any css I want to override and put it in a tiddler tagged as a stylesheet, see Control Panel > Info > Advanced > StyleSheets - which is a draggable list and the last css wins.