Gatha Plugin: Experimental Release

Thomas, I have done some change in 0.8.0 (I hope publish it tomorrow).

Information tiddlers (tabs) in edit mode

Information tiddlers (tabs) in view mode

Agree!
I am thinking to use casecades for this purpose!
If the type is hidden with current methid, it will be hidden for all tiddlers!
Give your opinion please!

Did you consider showing the form in view mode? That would free you from hacking the edit template. (I read somwhere that the EditText Widget supports editing the same tiddler since 5.2.0 or so.)

I am thinking to use an editable form! It seems edit template needs more hack!
The downside is I have to use a central form and open each plugin there! similar to what Tinka uses!

Not sure about this. I think (using the new cascade filters) you should be able to set up conditional view templates for normal tiddlers in view mode. Let’s assume you have a field “gata-version” in your tiddlers, where you save the version number of gatha whenever a plugin is exported. Then you could test in your view templates for the existence of this field and use your own form template to present all tiddlers that have this field.

In Tix v0.7 — A Novel Tiddler Experience you will find a description of the filters and templates I set up for a completely different tiddler construct. Most of it here: What defines a tiddler

You would have to do the opposite of what I did. I left the body template relatively untouched and rebuilt the rest. You would only have to replace the body part.

(Sidenote: It would be interesting to test, if our sollutions are compatible, if you do it that way.) I hope this is not too much information. Just ideas and hints.

Cheers, Thomas

The current Gatha works like this! It uses cascades both for view and edit mode!
I thought to have a button to toggle the table rows from lock for edit to editable. But I preferred to have a more native way! editing tiddler!

I follow your progress and will have a closer look!

In Gatha see for example $:/config/gatha/EditTemplateBodyFilters/PluginMetaData it does what you mean! but cascades do not work on fields and one has to use the viewmode!

Thank you!

Gatha seems worthy of a "Golden Smurf Award"

See … Thoughts on Badges - #7 by TiddlyTweeter

1 Like

That would be perfect.

For the rest: Ignore what I said, I see you are already there. (I will have to try to understand the field restriction though. Probably another day.)

The easiest way is to use css :

<style>
.tc-links-draggable-list>ul>:first-child:not(li):after{
content:"Drop here !";
}
</style>

But a custom macro would be better for accessibility. Another option would be to wrap the draggable list in a container together with a reveal widget for the hint, then position the reveal widget with position:absolute above the droppable list. When the list is not empty, hide the reveal.

2 Likes

Maybe the emptyMessage of the list widget could do that instead of the reveal.

@telumire

This is quite a conundrum :confused:

.tc-links-draggable-list>ul > :first-child :not(li) :after

Please explain what the bold stuff is doing? I’m a bit baffled. child combinator followed by :first-child pseudo class then rejecting li elements?

What am I not seeing?

Thanks!

@CodaCoder this css selector target the first child of the ul element inside tc-links-draggable-list, and if it’s not a li, display some content in the after pseudo element. As soon as the list is not empty, the first child becomes a list item (li) and thus the message disappear. I use the direct descendant selector on the ul in order to not accidentally select descendants inside the list items.

Hi Mark,

yes, plugin is not created in the production wiki, You need to export it.

It uses template to let users edit/view fields, click on the plugin full name e.g. $:/plugins/marks/test

Yes!

See the screencasts here: Gatha Plugin: Experimental Release - Plugins - Talk TW (tiddlywiki.org)

Gatha plugin seems to depend on tiddlywiki/jszip plugin(optional) for exporting zip folder

That is right! It is good to automatically install JSZIP when install Gatha. But as @pmario explained elsewhere, plugin dependency only work if both plugins come from the same library.

Hi @Mohammad, Thanks for this great plugin which I am using to develop my own plugins. Could I use it to export plugin demo.html for multiple plugins?

I am developing three plugins in one place (i.e. tw-htmlwidgets, tw-echarts, tw-leaflet). Both tw-echarts and tw-leaflet are depending on tw-htmlwidgets.

When I try to export plugin demo (demo.html). It only exports tw-htmlwidgets. Could I export all packages I am developing into one demo.html?

The publish filter controls what will be published! So add what you want!

Thanks @Mohammad . I tried two methods in the $:/config/gatha/PublishFilter

[[$:/plugins/bangyou/tw-echarts4r]]
[[$:/plugins/bangyou/tw-leaflet]]

This one don’t export other plugins

[prefix[$:/plugins/bangyou/tw-echarts4r]]
[prefix[$:/plugins/bangyou/tw-leaflet]]

This one do export other plugins tiddlers, but don’t pack into plugins (i.e. cannot list in the plugin page)

Please read the documents.
Ghata has two publish filters:

  1. a global publish filter
  2. a local publish filter

Publish filter does not include anything in the plugin, but it export your selected tiddlers/theme/plugins into demo file.
Example

  1. Open Gatha Studio Workspace — create and export plugins, editions, and packages in browser (kookma.github.io)
  2. From Sidebar-> More → Gatha
  3. Find Global publish filter ($:/config/gatha/PublishFilter)
    4.Add Shiraz to the publish filter (add this line: [[$:/plugins/kookma/shiraz]])
  4. Open Sidebar → Gatha - > Bahar
  5. Under export plugin click on plugin.demo

That’s all

1 Like

NOTE: You may have several plugins under development! The current setup does not support exporting all of them in one step, as they are not packaged yet!
Only previously packaged ones can be exported.

However I submitted a ticket (Publish and Export Several Plugins and Sub plugins at Once · Issue #8 · kookma/TW-Gatha (github.com)) to add this option in future releases

1 Like