[tw5] Re: It would be nice if drag and drop mechanism didn't happen everywhere

2023-05-28 Thread Charlie Veniot
For my personal use, I'm experimenting with making TiddlyWiki titles the 
dropzone area:

[image: Screenshot 2023-05-28 9.49.33 PM.png]

On Sunday, May 28, 2023 at 6:02:22 PM UTC-3 Charlie Veniot wrote:

> Okay, now that I'm back from slamming my forehead against a door frame for 
> not having brought this up earlier...
>
> Thank-you much, Eric !
>
> Does that ever make a huge difference.  I'm sure that's going to help me 
> immensely, and I'm going to set that up in all my TiddlyWiki instances.
>
> On Sunday, May 28, 2023 at 5:23:49 PM UTC-3 Eric Shulman wrote:
>
>> The `$dropzone` widget used to trigger drag-and-drop $:/Import handling 
>> is defined in `$:/core/ui/PageTemplate`:
>> ```
>> <$dropzone enable=<>>
>> ```
>> which also defines the `tv-enable-drag-and-drop` variable, which gets 
>> it's value from the contents of `$:/config/DragAndDrop/Enable`, and has a 
>> default value of "yes".  To disable the default $dropzone, create a tiddler 
>> named `$:/config/DragAndDrop/Enable`, with a text field value of "no".  
>> After doing this, you will no longer be able to use drag-and-drop to import 
>> tiddlers.  You will still be able to use the "Import" PageToolbar button 
>> (see the sidebar "Tools" tab, or `$:/ControlPanel > Appearance > Toolbars > 
>> Page Toolbar` settings) to initiate a "browse for file" system dialog to 
>> import tiddlers from locally saved .JSON files.
>>
>> You can define your own custom dropzone "hotspot" by creating a tiddler 
>> containing something like `<$dropzone>drop here to import 
>> tiddlers`.  When that tiddler is displayed, you can then 
>> drag-and-drop onto the "drop here to import tiddlers" text to initiate the 
>> TWCore's usual $:/Import handling.  To add a nice visible "import tiddlers" 
>> $button interface into the SideBar, try this:
>> * Create a tiddler (e.g., SidebarImportZone)
>> * Enter text content: `<$dropzone><$button>drop here to import 
>> tiddlers`
>> * Tag it with `$:/tags/SideBarSegment`
>> * Add a field named 'list-before' with a value of 
>> `$:/core/ui/SideBarSegments/tabs`
>>
>> Important note: Setting `$:/config/DragAndDrop/Enable` to "no" also 
>> disables use of drag-and-drop for re-ordering items within tag dropdowns.  
>> To avoid this side-effect, instead of setting 
>> `$:/config/DragAndDrop/Enable` to "no", you can disable the drag-and-drop 
>> $:/Import handling by editing the `$:/core/ui/PageTemplate` shadow tiddler 
>> and completely removing the `<$dropzone ...>` and `` widgets 
>> from that tiddler.  This leaves the tag dropdown handling intact, while 
>> still preventing page-wide drag-and-drop $:/Import handling from being 
>> triggered.
>>
>> enjoy,
>> -e
>>
>> On Sunday, May 28, 2023 at 8:56:37 AM UTC-7 cj.v...@gmail.com wrote:
>>
>>> https://youtu.be/-UNSlUzdAY8
>>>
>>

-- 
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/7908177f-7b78-4923-97a5-20c4ad30db7en%40googlegroups.com.


[tw5] Re: It would be nice if drag and drop mechanism didn't happen everywhere

2023-05-28 Thread Charlie Veniot
Okay, now that I'm back from slamming my forehead against a door frame for 
not having brought this up earlier...

Thank-you much, Eric !

Does that ever make a huge difference.  I'm sure that's going to help me 
immensely, and I'm going to set that up in all my TiddlyWiki instances.

On Sunday, May 28, 2023 at 5:23:49 PM UTC-3 Eric Shulman wrote:

> The `$dropzone` widget used to trigger drag-and-drop $:/Import handling is 
> defined in `$:/core/ui/PageTemplate`:
> ```
> <$dropzone enable=<>>
> ```
> which also defines the `tv-enable-drag-and-drop` variable, which gets it's 
> value from the contents of `$:/config/DragAndDrop/Enable`, and has a 
> default value of "yes".  To disable the default $dropzone, create a tiddler 
> named `$:/config/DragAndDrop/Enable`, with a text field value of "no".  
> After doing this, you will no longer be able to use drag-and-drop to import 
> tiddlers.  You will still be able to use the "Import" PageToolbar button 
> (see the sidebar "Tools" tab, or `$:/ControlPanel > Appearance > Toolbars > 
> Page Toolbar` settings) to initiate a "browse for file" system dialog to 
> import tiddlers from locally saved .JSON files.
>
> You can define your own custom dropzone "hotspot" by creating a tiddler 
> containing something like `<$dropzone>drop here to import 
> tiddlers`.  When that tiddler is displayed, you can then 
> drag-and-drop onto the "drop here to import tiddlers" text to initiate the 
> TWCore's usual $:/Import handling.  To add a nice visible "import tiddlers" 
> $button interface into the SideBar, try this:
> * Create a tiddler (e.g., SidebarImportZone)
> * Enter text content: `<$dropzone><$button>drop here to import 
> tiddlers`
> * Tag it with `$:/tags/SideBarSegment`
> * Add a field named 'list-before' with a value of 
> `$:/core/ui/SideBarSegments/tabs`
>
> Important note: Setting `$:/config/DragAndDrop/Enable` to "no" also 
> disables use of drag-and-drop for re-ordering items within tag dropdowns.  
> To avoid this side-effect, instead of setting 
> `$:/config/DragAndDrop/Enable` to "no", you can disable the drag-and-drop 
> $:/Import handling by editing the `$:/core/ui/PageTemplate` shadow tiddler 
> and completely removing the `<$dropzone ...>` and `` widgets 
> from that tiddler.  This leaves the tag dropdown handling intact, while 
> still preventing page-wide drag-and-drop $:/Import handling from being 
> triggered.
>
> enjoy,
> -e
>
> On Sunday, May 28, 2023 at 8:56:37 AM UTC-7 cj.v...@gmail.com wrote:
>
>> https://youtu.be/-UNSlUzdAY8
>>
>

-- 
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/ab4b7d26-2716-4eb0-9104-56db1027252an%40googlegroups.com.


[tw5] Re: It would be nice if drag and drop mechanism didn't happen everywhere

2023-05-28 Thread Eric Shulman
The `$dropzone` widget used to trigger drag-and-drop $:/Import handling is 
defined in `$:/core/ui/PageTemplate`:
```
<$dropzone enable=<>>
```
which also defines the `tv-enable-drag-and-drop` variable, which gets it's 
value from the contents of `$:/config/DragAndDrop/Enable`, and has a 
default value of "yes".  To disable the default $dropzone, create a tiddler 
named `$:/config/DragAndDrop/Enable`, with a text field value of "no".  
After doing this, you will no longer be able to use drag-and-drop to import 
tiddlers.  You will still be able to use the "Import" PageToolbar button 
(see the sidebar "Tools" tab, or `$:/ControlPanel > Appearance > Toolbars > 
Page Toolbar` settings) to initiate a "browse for file" system dialog to 
import tiddlers from locally saved .JSON files.

You can define your own custom dropzone "hotspot" by creating a tiddler 
containing something like `<$dropzone>drop here to import 
tiddlers`.  When that tiddler is displayed, you can then 
drag-and-drop onto the "drop here to import tiddlers" text to initiate the 
TWCore's usual $:/Import handling.  To add a nice visible "import tiddlers" 
$button interface into the SideBar, try this:
* Create a tiddler (e.g., SidebarImportZone)
* Enter text content: `<$dropzone><$button>drop here to import 
tiddlers`
* Tag it with `$:/tags/SideBarSegment`
* Add a field named 'list-before' with a value of 
`$:/core/ui/SideBarSegments/tabs`

Important note: Setting `$:/config/DragAndDrop/Enable` to "no" also 
disables use of drag-and-drop for re-ordering items within tag dropdowns.  
To avoid this side-effect, instead of setting 
`$:/config/DragAndDrop/Enable` to "no", you can disable the drag-and-drop 
$:/Import handling by editing the `$:/core/ui/PageTemplate` shadow tiddler 
and completely removing the `<$dropzone ...>` and `` widgets 
from that tiddler.  This leaves the tag dropdown handling intact, while 
still preventing page-wide drag-and-drop $:/Import handling from being 
triggered.

enjoy,
-e

On Sunday, May 28, 2023 at 8:56:37 AM UTC-7 cj.v...@gmail.com wrote:

> https://youtu.be/-UNSlUzdAY8
>

-- 
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/4b549298-2a36-411a-b51b-328bcb9890c5n%40googlegroups.com.