[tw5] Re: Dragable items in List Tab?

2021-08-07 Thread amreus
Thanks for the replies.  I ended up with something very close to Eric first 
example except I added a separate ListEdit tab in the Info area.  If you 
read the Github discussion, Jeremy seems to like the idea so perhaps it'll 
be a feature soon.

Thanks.

On Thursday, August 5, 2021 at 9:53:51 PM UTC-4 Eric Shulman wrote:

> On Thursday, August 5, 2021 at 6:35:09 PM UTC-7 Eric Shulman wrote:
>
>> This is actually quite easy to do, using the *list-links-draggable* macro
>>
>
> errata: my previous solution omitted the display of the "List/Empty" 
> message when the list field is empty.
>
> Here's a corrected version that includes the "List/Empty" message:
> <$list filter="[list{!!title}limit[1]]" emptyMessage=<> 
> variable="has_list_items">
><$macrocall $name="list-links-draggable" type="span" subtype="div" 
> itemTemplate="$:/core/ui/ListItemTemplate"/>
> 
>
> Note:
> * The outer $list widget checks to see if the list field has at least 1 
> item. If it doesn't, the fallback emptyMessage content is displayed.
> * Using variable="has_list_items" preserves the currentTiddler context 
> for use by the $macrocall contained within the $list widget.
>
> -e
>

-- 
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/76d58bf5-cbd8-459e-89e8-555e9e29a681n%40googlegroups.com.


[tw5] Re: Dragable items in List Tab?

2021-08-05 Thread Eric Shulman
On Thursday, August 5, 2021 at 6:35:09 PM UTC-7 Eric Shulman wrote:

> This is actually quite easy to do, using the *list-links-draggable* macro
>

errata: my previous solution omitted the display of the "List/Empty" 
message when the list field is empty.

Here's a corrected version that includes the "List/Empty" message:
<$list filter="[list{!!title}limit[1]]" emptyMessage=<> 
variable="has_list_items">
   <$macrocall $name="list-links-draggable" type="span" subtype="div" 
itemTemplate="$:/core/ui/ListItemTemplate"/>


Note:
* The outer $list widget checks to see if the list field has at least 1 
item. If it doesn't, the fallback emptyMessage content is displayed.
* Using variable="has_list_items" preserves the currentTiddler context for 
use by the $macrocall contained within the $list widget.

-e

-- 
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/1505fce4-4827-437f-8ce4-eab40abc870an%40googlegroups.com.


[tw5] Re: Dragable items in List Tab?

2021-08-05 Thread Eric Shulman
On Thursday, August 5, 2021 at 5:55:52 PM UTC-7 TW Tones wrote:

> The tabs are effectively a list of buttons anyway. It would perhaps be 
> easier to build your own tab macro with the extended features on each 
> button.
> Alternatively you could have a tab in which you list the tab titles with 
> the draggable macro in which you can drag and drop the order.
>

Amreus' request is to be able to drag "*items in the List tab"*, not to 
drag the tabs themselves.

This is actually very easy to do, using the *list-links-draggable* macro.  
See my solution posted separately

-e

-- 
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/92685c06-ebb8-4147-ac39-63740b28bc7en%40googlegroups.com.


[tw5] Re: Dragable items in List Tab?

2021-08-05 Thread Eric Shulman
On Thursday, August 5, 2021 at 3:31:17 AM UTC-7 amreus wrote:

> Is there some reason items in the List tab could not be made draggable for 
> re-ordering?
>

This is actually quite easy to do, using the *list-links-draggable* macro

1) Edit the shadow tiddler: *$:/core/ui/TiddlerInfo/List*
2) Replace this line:
<$list filter="[list{!!title}]" emptyMessage=<> 
template="$:/core/ui/ListItemTemplate"/>
with this line:
<$macrocall $name="list-links-draggable" type="span" subtype="div" 
itemTemplate="$:/core/ui/ListItemTemplate"/>

That's it.  After doing the above, the contents of each tiddler's Info>List 
tab will now be draggable.

Note:
By default, the list-links-draggable macro displays its output as a bullet 
list.
By using type="span" and subtype="div", the bullets are suppressed
and the output is just a simple list of links, one per line.

enjoy,
-e

-- 
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/ddd675f3-cd74-4989-a582-f7034503f51an%40googlegroups.com.


[tw5] Re: Dragable items in List Tab?

2021-08-05 Thread TW Tones
amreus,

The tabs are effectively a list of buttons anyway. It would perhaps be 
easier to build your own tab macro with the extended features on each 
button.

Alternatively you could have a tab in which you list the tab titles with 
the draggable macro in which you can drag and drop the order.

I just discovered https://tiddlywiki.com/#list-tagged-draggable%20Macro

Eg;
<>

See attached on tiddlywiki.com

Regards
Tones


On Thursday, 5 August 2021 at 20:31:17 UTC+10 amreus wrote:

>
> Good morning,
>
> Is there some reason items in the List tab could not be made draggable for 
> re-ordering? It seems like this would be a more accessible way to re-order 
> toolbars, as an example.
>
>
>   [image: 2021-08-05_062420.png]
>

-- 
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/204b1d32-6e33-4adc-9bff-78c8162e45d4n%40googlegroups.com.


tab-order.json
Description: application/json


[tw5] Re: Dragable items in List Tab?

2021-08-05 Thread PMario
Hi,
Here's the issue: https://github.com/Jermolene/TiddlyWiki5/issues/5939
-m

On Thursday, August 5, 2021 at 1:18:53 PM UTC+2 PMario wrote:

> Hi,
>
> >Is there some reason items in the List tab could not be made draggable 
> for re-ordering? 
>
> No. Nobody requested it yet ... 
>
> 
>
> I think it should be easy to change the $:/core/ui/TiddlerInfo/List 
> tiddler to contain a <> macro. 
>
> ... BUT ... 
>
> There is a problem. The existing code uses an emptyMessage=< List/Empty>>  ... to display some info if no "list" tiddler is present or 
> the list is empty. 
>
> We will need to extend the <> macro with an 
> emptyMessage parameter, to create a backwards compatible function. 
>
> I'll create a github issue with your proposal. 
>
> -mario
>
>

-- 
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/f916dfa5-9e1d-4a8e-8fbc-7989c6d0e5a2n%40googlegroups.com.


[tw5] Re: Dragable items in List Tab?

2021-08-05 Thread PMario
Hi,

>Is there some reason items in the List tab could not be made draggable for 
re-ordering? 

No. Nobody requested it yet ... 



I think it should be easy to change the $:/core/ui/TiddlerInfo/List tiddler 
to contain a <> macro. 

... BUT ... 

There is a problem. The existing code uses an emptyMessage=<>  ... to display some info if no "list" tiddler is present or 
the list is empty. 

We will need to extend the <> macro with an 
emptyMessage parameter, to create a backwards compatible function. 

I'll create a github issue with your proposal. 

-mario

-- 
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/c30377f9-9fc8-4873-8bcc-e7f9b5924e2an%40googlegroups.com.