My only wish in tiddlywiki: is this possible? Where should I start from?

After a long time of use, I’ve got everything I want from tiddlywiki (well, almost, there are so many possibilities that you can never stop) But for the moment I actually have everything I can imagine wanting. Except one thing, which if it is possible would be one of the most useful ever.

I have some tiddlywiki around that I use to collect various information (recipes, places I’ve visited, books read… ideas)
• I write the name of the idea, the name of the book, etc. as the title.
• In the fields an evaluation (perhaps a score or a review) and in the text field the content of the information, where I describe the subject of the tiddler.

To do this I am very happy with tiddlywiki. I can make templates to compile tiddlers with ease. In this way each of my ideas is saved in a file, with all its conceptual links. Or I know which books I liked the most and why and I can easily recommend them based on requests (filter by genre, length, etc.)
In short, I use it to hold all kinds of information and I am happy with it.

For now I can capture the informations very effectively, but the problem is to get them back

I’m missing one thing, a overview.

A tiddler (or some tiddlers) where i can keep a table with some columns.

In the first column, the names of all tiddlers (or all tiddlers with a particular tag…) sorted alphabetically by default, and in the other columns some selected fields and the corresponding values ​​they assume in the tiddlers.
This is the basic idea. Which in itself isn’t too useful, but it’s an good starting point (also you can understand what I would like to create)

— Other features that would be handy:


I just remembered now that I should have alphabetized the columns by their title. Imagine that they are.

  • 1: Order by: Clicking on the title of the column you can order the rows based on the content of that column. For example, if I were to sort the films by their score, I can click on the column title and toggle between 3 modes: (1) ascending or (2) descending (3) no mode (return to the default alphabetical by title)

  • 2: This is not important but I had it in mind. Color the cell by value.

  • 3: Still on the column title, a button that opens a popup:
    On this popup there are all the values ​​without repetition, each appearing only once at most. From here I can search for the values ​​of the fields and also search for them (analogous to when I want to add a tag in the editor: all the tags appear only once, in alphabetical order, and I can search for them) Once a value is picked the table displays only (or puts at the top) the tiddlers with that value in that field.
    E.g. if i select “noir”, “Chinatown” and “The third man” appear.

Basically for each column the functions 1 and 3 (2 really not necessary).
That is: Ability to sort alphabetically (A-Z, Z-A and no order). And the possibility to search for a particular value (title, score…)


• I have some time and desire to experiment, but I'm not experienced enough to start from scratch, so I would like to ask these two things about the project I want to undertake:
  1. First of all if it’s feasible (or it’s not suitable for the tiddlywiki ecosystem for example it would work but too slow)

  2. Secondly, where should I start? (If anyone has any idea how to do this)
    Btw, I’m not asking for codes ore anithing, just a description of how it could work, then I’ll take care of it from there. Because unfortunately I really don’t know where to start.

This seems very much like Mohammad 's Shiraz Dynamic Tables.

I would check out this one first, because it’s fairly new and Mohammad is constantly updating. But there have been other similar projects. If you click on “links” on the top of the forum, and then type “tables” into the search engine, you’ll see multiple entrees, some of which are similar in concept.

If none of these work, then I would roll my own with two nested list widgets, the outer one selecting the tiddlers you want and the inner one stepping through the fields you want. The interior would use HTML to build up a table.

1 Like

There’s a lot to think about here, thank you!

1 Like

Oh my, just how did i not find this before. I even installed quite a few of Mohammad plugins. They are all of the highest quality. I feel I’m already close to the solution. :sweat_smile:

4 Likes

This is defiantly a good start, these can be used to list and visualise many different things within TiddlyWiki, one way to look at it is going from the “list widget” to a “table view” with feature’s in the table to manage columns and rows, sort and selection.

  • I hope in time we can have a solution that meets with your ideas and all you have to give it is the filter (for the rows) and let it find the columns (fields) but allow columns to be hidden as desired.
  • As generic as possible so we can all just use it as an alternate way to view and manage tiddlywiki content.

Let us be able to move from Lists to tables as we need.

1 Like

Experience TiddlyWiki Fluency: Creating a Reading List - YouTube – this video by @sobjornstad covers some of the things you are looking for. The whole video is quite long, but you can take a peek at the result towards the end of the video (a table with a list of books, including some dynamic filtering of the contents of the table) and see if it is of any help to you.

1 Like

Great, now I really have a lot of ideas, I’ll get to work. It will take a while but in the meantime if I find something interesting, I will update you

Here’s a quick and dirty approximation, perhaps helpful to @SnapSam or others – automatically setting up rows for all of the fields associated with tiddlers under the tag-category in question (or whatever other filter-condition you want)…

Put this in a tiddler tagged $:/tags/ViewTemplate

<$list filter="[tag<currentTiddler>limit[1]]" variable="">

<$macrocall $name=table-dynamic filter="[tag<currentTiddler>]" fields="""[tag<currentTiddler>fields[]] -modified -modifier -creator -created -text -[<currentTiddler>get[remove-fields]enlist-input[]]""" caption="''Tiddlers tagged @@{{!!title}}@@, and their fields''" />

</$list>

You can add a field called remove-fields to take out any fields you don’t want to see (specific to the tag whose contents you’re looking at). And of course, edit the above if you do want to see things like text, modifier, etc., in the dynamic table.

-Springer

2 Likes

I believe this is responding to the Original Topic. An Overview.

For those passing @Springer is referring to a way to make use of Dynamic Tables, Part of @Mohammad’s Shiraz Plugin

Example under development;

1 Like

@TW_Tones,

I don’t see Shiraz plugin installed at that demo site…

I exported your tiddlers into a site with Shiraz, and the tables seem to work fine:

https://minimalist-test-mode.tiddlyhost.com/#Using%20Shiraz%20Dynamic%20tables%20and%20discovering%20fields

-Springer

1 Like

@TW_Tones and others,

Note that when field names are wider than their contents, dynamic tables can get cumbersome.

At the link above, note that I’ve also added a demo of a generic solution (described here): a way to make column headers look for tbl-caption variant, and a dynamic table listing all the fields, so that tbl_caption can be quickly assigned to them (an abbreviation, unicode symbol, whatever).

This way your dynamic table can be more horizontally compact, without modifying your actual field names.

and… Fixed sorting issue

One thing I don’t quickly know how to solve, @Mohammad: how to get a dynamic-table column to sort as numeric, rather than alphabetically. (See how the atomic number column sorts as 1, 10, 100, 101…)

FIXED: Setting the whole dynamic table to specify sortOp="nsort" is plenty good enough!

-Springer

1 Like

OOPs, too many wikis :frowning: Corrected

  • I have some CSS somewhere that extends column names up at an angel of 45% from their column, leaving the column to be “only” as wide as its content. You just need to add some whitepace above the table to accommodate them.
1 Like

Ah, found the answer to the sorting problem. It applies to the whole table, but surely is worthwhile, since it allows you to sort by atomic number. Your whole table would look something like this:

<$macrocall $name=table-dynamic sortOp="nsort" filter="[all[shadows+tiddlers]has[element]sort[element]]" fields="""[all[shadows+tiddlers]has[element]fields[]] -modified -modifier -element -creator -created -text -[<currentTiddler>get[remove-fields]enlist-input[]]"""  caption="''Tiddlers tagged @@{{!!title}}@@, and their fields''" />

I did too, using the filter only ie nsort
filter= [[all[shadows+tiddlers]has[element]] -[[Headers_Tiddler]] +[nsort[element]]"
but with inconsistent results? It works in preview not view :thinking:

I notice dynamic tables assumes we are selecting by tag and says this in a heading :frowning:

Note: there are also overflow options to scroll a table however for the element example I found zooming out sufficient although not perfect. Simply overflow hidden would help (Until zoom displays it) on large screens.

1 Like

Interesting discussion, I will keep this in mind in my efforts. Anyway, if you work on tables, even if you probably already know it, I recommend that you also look at TiddlyTables, the plugin Mohammad relied on for his.

It would be very interesting to see if we could add some dynamic scrolling of columns. For instance, in this case, keep the name, weight, and symbol fixed, but only show as many of the others that fit inside the current container, with some scroll gesture to hide some of the visible ones and show more of the hidden ones. I have no idea how to do that, not only in Tiddlywiki but in HTML tables, but I’m sure others have solved that issue for HTML, so we might be able to incorporate it here. It’s not a high priority for me now, but I have a project coming up where it might be useful. Hmmm.

  • This is possible, I have done it to a sophisticated level in the past.

If you build tables with the html tags thead / tbody and tfoot it is quite easy to introduce scrolling or pages. Using html table layouts, with listwidgets to iterate rows and columns within the table definition is quite easy and very powerful.

Do you have links to any of this?

Well, it’s quite easy to introduce vertical scrolling. Horizontal would take something more, especially if you wanted smooth scrolling that showed partial columns. It would make @Springer’s demo look much nicer. I know I’ve seen it done in HTML, but have no idea where. I may take a look, but this is low priority for me.

– Scott

Unfortunately no, all the work I did was inside a commercial solution for a client.

  • I did get a Horizontal scroll as well.
  • I also allowed one to go from an interactive table to generating PDF’s

There may be other ways, just keep in mind if an when this becomes a priority my experience suggests;

Happy coding :nerd_face:

Of course there’s the trivial solution of wrapping the table in a container with overflow-x: auto. But that doesn’t keep what I think of as the spreadsheet solution that keeps certain row or column headers fixed as you scroll.

More to think about!