Re: [tw5] Presenting: list-table-draggable - drag'n drop rows of data

2022-10-06 Thread Mat
Hi Brian and good to hear you like it.

First off, let me recommend that you join the main group for TW 
at https://talk.tiddlywiki.org/  - I saw this post there because all posts 
here on gg get reposted there, but not vice versa. It is the new official 
main forum for TW.

With that said; You're right in your observation. I believe it should be 
solvable but it is a bit complex so I'll need to return to think about how 
to solve it, earliest in the weekend (but I can't make any promise). Here's 
the difficulty: 

As you know, the displayed rows in the table are based on the output from 
your custom filter, which is stored in the `list-filter` field. Each title 
creates a table row but because you can reorder the table rows, the order 
is arbitrary and thus has to be statically stored, which is done in the 
`list` field. 

But it is of course important that if a new tiddler qualifies in the 
filter, it should also show up in the resulting table. So the table rows 
are generated from BOTH the static list and the list-filter. This means 
that when you uncheck "done" in your tiddler then it no longer qualifies in 
the list-filter... but the title is still in the static list field! Again, 
this field has to be static to keep track of your arbitrary sort order.

What I should probably do is to add an action when an item is drag'n 
dropped to weed out all titles in the list field that don't qualify in the 
list-filter. There's just a nagging feeling that I've pondered over this 
and decided against it, but I'm not sure and I can't remember why I'd do 
that. (I.e why would I want items that don't qualify in the filter?)

Incidentally, as I've now quickly reviewed the code (and realized it is 
pretty complex) I note that I've also put in a qualified that each filter 
output has to be an *existing* tiddler. I wonder if this is a wise 
requirement. But it does mean that if you *delete* your done actions, they 
will disappear from the table. Not sure you'd want that but just sayin'.

Anyway, I'll have to get back to this, hopefully this weekend but no 
promise.

And do consider switching over to - or at least joining - the 
https://talk.tiddlywiki.org/ forum.

<:-)



On Thursday, October 6, 2022 at 3:54:36 PM UTC+2 bria...@gmail.com wrote:

> This Draggable Table deal is SWEET!  I started incorporating it into all 
> sorts of places in my Tiddlywiki.
>
> One issue though, it doesn't seem to "update" correctly.  I'm using it for 
> a task list, and when I check a task off as "done" (tagged with "Done") the 
> table row should no longer appear in the table because it does not match 
> the filter any longer. That only works so long as I have never "dragged" 
> the line item. 
>
> Once I drag the table row to a new spot in the table, the filter that 
> populates the table doesn't seem to apply any more, and my table row (that 
> should disappear) remains in the table.
> Maybe I'm missing something?
>
> Hope you keep working on this fantastic plugin, and thank you for making 
> it!
>
> On Saturday, April 24, 2021 at 5:10:34 PM UTC-4 Mat wrote:
>
>> Updated  v.0.0.7
>>
>> Drag'n drop reordering should now work properly.
>> Thanks @History Buff.
>>
>> <:-)
>>
>> On Saturday, April 24, 2021 at 10:41:21 PM UTC+2 Mat wrote:
>>
>>> @note2 - yeah, perhaps an official plugin. Or maybe something like the 
>>> list-links macro could be replaced with a more generic solution to present 
>>> items with a template.
>>>
>>> @Mohammad - yes, as you understood, updating one list also updates the 
>>> other lists that use the same list field. I kind of think there is some 
>>> value in seeing this to think that very thought. 
>>>
>>> @History Buff - Darn, I agree; *something is not working with the DnD*! 
>>> I have to look into this. Thanks for reporting.
>>>
>>> <:-)
>>>
>>> On Saturday, April 24, 2021 at 9:47:34 PM UTC+2 History Buff wrote:
>>>
 I like this. However, in the examples, I tried to arrange one through 
 four top to bottom and could never get there. I may have not been doing 
 something right, but the behavior didn't seem consistent from one drop to 
 the next.

 On Saturday, April 24, 2021 at 7:46:20 AM UTC-7 Mohammad wrote:

> Mat,
>  Nice idea! Clever solution!
>
> One minor comment: (ignore)
> In the demo page of plugin I tried reorder rows in example two and 
> then I saw other examples updated! I know the reason!
> But I suggest what do you think if a stateTiddler or variable is used 
> here so it keeps tables independent!
>
>
>
> Best wishes
> Mohammad
>
>
> On Sat, Apr 24, 2021 at 5:44 PM Mat  wrote:
>
>> *"Don't be a square. Be a table."* 
>> - Aristotle
>>
>> The *TWaddleur* proudly presents
>> list-table-draggable 
>> ~ structured data in draggable rows ~
>>
>> Where the core macros 

Re: [tw5] Presenting: list-table-draggable - drag'n drop rows of data

2022-10-06 Thread Brian Cary
This Draggable Table deal is SWEET!  I started incorporating it into all 
sorts of places in my Tiddlywiki.

One issue though, it doesn't seem to "update" correctly.  I'm using it for 
a task list, and when I check a task off as "done" (tagged with "Done") the 
table row should no longer appear in the table because it does not match 
the filter any longer. That only works so long as I have never "dragged" 
the line item. 

Once I drag the table row to a new spot in the table, the filter that 
populates the table doesn't seem to apply any more, and my table row (that 
should disappear) remains in the table.
Maybe I'm missing something?

Hope you keep working on this fantastic plugin, and thank you for making it!

On Saturday, April 24, 2021 at 5:10:34 PM UTC-4 Mat wrote:

> Updated  v.0.0.7
>
> Drag'n drop reordering should now work properly.
> Thanks @History Buff.
>
> <:-)
>
> On Saturday, April 24, 2021 at 10:41:21 PM UTC+2 Mat wrote:
>
>> @note2 - yeah, perhaps an official plugin. Or maybe something like the 
>> list-links macro could be replaced with a more generic solution to present 
>> items with a template.
>>
>> @Mohammad - yes, as you understood, updating one list also updates the 
>> other lists that use the same list field. I kind of think there is some 
>> value in seeing this to think that very thought. 
>>
>> @History Buff - Darn, I agree; *something is not working with the DnD*! 
>> I have to look into this. Thanks for reporting.
>>
>> <:-)
>>
>> On Saturday, April 24, 2021 at 9:47:34 PM UTC+2 History Buff wrote:
>>
>>> I like this. However, in the examples, I tried to arrange one through 
>>> four top to bottom and could never get there. I may have not been doing 
>>> something right, but the behavior didn't seem consistent from one drop to 
>>> the next.
>>>
>>> On Saturday, April 24, 2021 at 7:46:20 AM UTC-7 Mohammad wrote:
>>>
 Mat,
  Nice idea! Clever solution!

 One minor comment: (ignore)
 In the demo page of plugin I tried reorder rows in example two and then 
 I saw other examples updated! I know the reason!
 But I suggest what do you think if a stateTiddler or variable is used 
 here so it keeps tables independent!



 Best wishes
 Mohammad


 On Sat, Apr 24, 2021 at 5:44 PM Mat  wrote:

> *"Don't be a square. Be a table."* 
> - Aristotle
>
> The *TWaddleur* proudly presents
> list-table-draggable 
> ~ structured data in draggable rows ~
>
> Where the core macros *list-links-draggable* and 
> *list-tagged-draggable* merely shows each list item as the *title*, 
> the rendered list, *list-table-draggable* lets you show each list 
> item as a *row with complex data*.
>
> The data is presented in a *table* e.g styled like tab-separated 
> values :
>
> [image: tsv.png]
>
> ...and, as noted, you might want to drag'n drop to rearrange them.
>
> <:-)
>
> P.S I think this functionality should be possible by default in TW. Do 
> you agree?
>
> -- 
>
 You received this message because you are subscribed to the Google 
> Groups "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to tiddlywiki+...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/a2231911-5d1d-42a1-a81d-57d9f1697685n%40googlegroups.com
>  
> 
> .
>


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/37353fbb-5024-4363-9703-f5dd8f0871ean%40googlegroups.com.