[twdev] Re: Documentation about plugin dependencies

2020-10-27 Thread Saq Imtiaz
https://tiddlywiki.com/#Plugin%20Dependencies On Tuesday, October 27, 2020 at 9:51:15 PM UTC+1, Matthew Lauber wrote: > > I believe in the release notes for 5.1.22, it was mentioned that "Plugins > may now declare dependencies that are automatically installed without user > intervention". Is t

[twdev] Re: Exclude files from build

2020-09-25 Thread Saq Imtiaz
Have you tried setting a *directories* entry in the tiddlywiki.files file, with a *fileRegExp* that excludes dotfiles? On Friday, September 25, 2020 at 5:57:36 PM UTC+2, kohlt...@gmail.com wrote: > > Yes, it lives inside the plugin directory (which is the root directory of > that repository). >

[twdev] Re: Exclude files from build

2020-09-24 Thread Saq Imtiaz
I assume the .fslckout file is created inside the plugin directory? You can control what is included from the directory using a tiddlywiki.files file: https://tiddlywiki.com/#tiddlywiki.files%20Files You can probably use the filesRegExp option to meet your needs. On Thursday, September 24, 2020

[twdev] Re: Tiddlywiki JZIP Plugin and tiddlywiki Libraries

2020-07-31 Thread Saq Imtiaz
The / character is a path separator, so the behaviour of creating subdirectories is correct when such characters are present in a filename. To use a literal / as part of a filename, use encodeuricomponent. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki

[twdev] Re: Tiddlywiki JZIP Plugin and tiddlywiki Libraries

2020-07-30 Thread Saq Imtiaz
> >- The tiddlers are saved incorrectly please see attached zip file > > Please give an example of your expected outcome and the actual outcome. -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop

[twdev] Re: (cont) EditorMagic

2020-07-28 Thread Saq Imtiaz
Do feel free to remove the $action-log widgets if you don't find them useful or think they are no longer needed. On Monday, July 27, 2020 at 5:11:11 PM UTC+2, Mat wrote: > > I'll shift my attention to the popup and tools (which, incidentally, will > be significantly easier for me than to work on

[twdev] Re: (cont) EditorMagic

2020-07-27 Thread Saq Imtiaz
On Monday, July 27, 2020 at 11:30:59 AM UTC+2, Mat wrote: > > Saq Imtiaz wrote: >> >> [...] I would recommend getting the functionality as you want it before >> switching focus to performance. >> > > Oh!? Do you mean building/polishing tools instead? >

[twdev] Re: (cont) EditorMagic

2020-07-27 Thread Saq Imtiaz
Personally I think focusing on performance right now is premature. I would recommend getting the functionality as you want it before switching focus to performance. Even then a good place to start would be actually using this with a larger tiddlywiki, like tiddlywiki.com, to understand what if

[twdev] Re: (cont) EditorMagic

2020-07-27 Thread Saq Imtiaz
@Mat Hm, since it is always matched against existing strings (e.g titles) is > that not enough? I mean the fragment "Editox" is as disallowed as e.g > "Edito]]" , is it not? (But I have to admit this logic of mine it feels > like I'm stepping back to how it was when before you stepped in when I

[twdev] Re: (cont) EditorMagic

2020-07-24 Thread Saq Imtiaz
@Mat First, again, I really appreciate your help. Even if you say we should just > treat it as prototype, I think it is desirable that it at least works > fairly OK - and it feels like it is close to doing that :-) > Naturally, The point about treating it as a prototype is that you can make la

[twdev] Re: (cont) EditorMagic

2020-07-21 Thread Saq Imtiaz
Hi Mat, The itemfilter stuff works. There is a noticeable delay which I estimate to > be proportional to the number of items i.e the list of items is much longer > for [[ than for << or <$ ... or perhaps more correctly expressed, it's > probably proportional to the complexity of the itemfilter.

[twdev] Re: (cont) EditorMagic

2020-07-20 Thread Saq Imtiaz
Unless there is some kind of caching issue, your link does not have the updated copy of body/editor that I provided in my last post. On Monday, July 20, 2020 at 5:58:07 PM UTC+2, Mat wrote: > > Saq, thanks, but AFAICT it does not work as intended; If you type [[xxx > you have the popup firing al

[twdev] Re: (cont) EditorMagic

2020-07-20 Thread Saq Imtiaz
Try this for the body/editor: \whitespace trim \define em-showPopup() <$action-popupcaret $state=<>/> <$action-setfield $tiddler=<> template=<> fragment=<> /> <$action-setfield $tiddler="test" state=<> /> \end \define em-updatePopupState() <$list filter="[match[false]]"> <$action-delet

Re: [twdev] Re: Caret position - Take 2

2020-07-20 Thread Saq Imtiaz
Maybe have a look here: http://editormagic2.tiddlyspot.com/backup/ On Monday, July 20, 2020 at 1:13:49 PM UTC+2, Mat wrote: > > Or even the version where only variables have been renamed would do the >> trick. >> > > OK, I'll fiddle a bit. > BTW, google groups now split this thread into multiple

Re: [twdev] Re: Caret position - Take 2

2020-07-20 Thread Saq Imtiaz
Or even the version where only variables have been renamed would do the trick. > >> -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikidev+unsubscr...@

Re: [twdev] Re: Caret position - Take 2

2020-07-20 Thread Saq Imtiaz
I would assume that before you started trying to use em-filter in body/editor: - you got things working with em-filter in popuptools first, with only necessary changes in body/editor - you have backups So if you dig up that backup, before you tried to use em-filter in body/editor and things stoppe

Re: [twdev] Re: Caret position - Take 2

2020-07-20 Thread Saq Imtiaz
@Mat On Monday, July 20, 2020 at 11:53:09 AM UTC+2, Mat wrote: > > I am going to need the latest working copy of the demo to be able to >> compare and generate a diff. > > > By "working" I assume you mean the latest copy that I'm hoping you take a > look at; yes that is http://editormagic2.tidd

Re: [twdev] Re: Caret position - Take 2

2020-07-20 Thread Saq Imtiaz
@Mat there are a lot of tools for showing diffs, but the advantage with a version control system like git is that it keeps track of the different versions that you might want to see diffs between, and github also provides a nice UI for viewing diffs. Otherwise its considerably more work, find th

Re: [twdev] Re: Caret position - Take 2

2020-07-18 Thread Saq Imtiaz
I only have access to a phone at the moment and your editor gets in the way. Go through your code stepwise in the popup tool and make sure you aren't accidentally settings currentTiddler to a different variable. As long as currentTiddler points to the popup tool tiddler this will work: [subfilt

Re: [twdev] Re: Caret position - Take 2

2020-07-18 Thread Saq Imtiaz
I don't understand how the question you posted relates to what we discussed. As I suggested earlier, a filter saved in a field can be easily re-used with the subfilter operator. [subfilter{!!myfilter}] You may have to make sure the em-fragment variable is defined in the detection code as well.

Re: [twdev] Re: Caret position - Take 2

2020-07-18 Thread Saq Imtiaz
I did say: For titles this would be something like [all[tiddlers]prefix]. For other tools, a filter or regexp can just as easily exclude things as include. The purpose is to limit false matches. Currently a [[ or <$ will match anything after them other than a space. If you can't build a

Re: [twdev] Re: Caret position - Take 2

2020-07-18 Thread Saq Imtiaz
No, I mean make that a field in the popup tool that can be accessed and used by the detection code as well. It can be an optional field if necessary. On Saturday, July 18, 2020 at 6:43:33 PM UTC+2, Mat wrote: > > Hm, that's already in place in the tools, but maybe you mean move it from > the to

Re: [twdev] Re: Caret position - Take 2

2020-07-18 Thread Saq Imtiaz
@Mat looks good. Having throught about it some more, I think we should go ahead and introduce a second "content" filter for the popup tools, to remove some of the false positives. For titles this would be something like [all[tiddlers]prefix]. Would also apply to widgets and macros. On Satur

[twdev] Re: [Dev][Visual Studio Code] Announcing Syntax Highlighting and Intellisense Plugin for TW5

2020-07-17 Thread Saq Imtiaz
Sounds very neat Joshua, thanks for sharing. A compelling reason to try VS Code at some point. On Friday, July 17, 2020 at 9:50:58 PM UTC+2, Joshua Fontany wrote: > > > https://marketplace.visualstudio.com/items?itemName=joshua-fontany.tw5-syntax > > > >- Automatically highlight HTML/Wikite

Re: [twdev] Re: Caret position - Take 2

2020-07-17 Thread Saq Imtiaz
> > As far as I know we don't have any other easier and efficient way to save >> variables for every step of a list widget run, have them persist and >> update, and compare them afterwards. >> > > (JS?) > Sure but then it would mean the detection code is in JS... which would probably lead to a

Re: [twdev] Re: Caret position - Take 2

2020-07-17 Thread Saq Imtiaz
Hi Mat, > First, unless you object, I will hereon refer to the end user popup > content templates as "popup tools" or, if the context allows, just "tools". > And we can now call the /_Popup tiddler simply "the popup". > > Agreed upon nomenclature is good. I struggled with this yesterday both w

Re: [twdev] Re: Caret position - Take 2

2020-07-16 Thread Saq Imtiaz
@Mat replies inline Also, if you look at the Browser Developer tools console (ctrl+shift+I on >> chrome), there is some additonal debugging going on. >> > > If I interpret it correctly, that's why the iframe for WidgetDocs doesn't > work. > There is an error logged to do with the iframe, but t

Re: [twdev] Re: Caret position - Take 2

2020-07-16 Thread Saq Imtiaz
The only changes while our messages crossed where renaming macros and removing unused variables On Thu, 16 Jul 2020, 22:24 Mat, wrote: > @Saq, thank you. > > First regarading: > > Also, if you look at the Browser Developer tools console (ctrl+shift+I on >> chrome), there is some additonal debugg

Re: [twdev] Re: Caret position - Take 2

2020-07-16 Thread Saq Imtiaz
Mat: I've renamed the macros to facilitate comprehension. Beyond that I will wait for you to verify that the behaviour is correct before cleaning up the code further. Note that I've tried to address both the issue with deleting the popup state when there are no matches, as well as making sure i

Re: [twdev] Re: Caret position - Take 2

2020-07-16 Thread Saq Imtiaz
, I always do that sort of thing to help debug actions. On Thursday, July 16, 2020 at 6:50:18 PM UTC+2, Mat wrote: > > Saq Imtiaz wrote: >> >> @Mat do not test the code I posted yesterday, I did some more tinkering >> late last night. Just need to find time to look

Re: [twdev] Re: Caret position - Take 2

2020-07-16 Thread Saq Imtiaz
@Mat do not test the code I posted yesterday, I did some more tinkering late last night. Just need to find time to look through it carefully and test. On Wednesday, July 15, 2020 at 11:21:02 PM UTC+2, Mat wrote: > > @Saq, I'm really looking forward to try it out but I'm afraid this will at > ea

Re: [twdev] Re: Caret position - Take 2

2020-07-15 Thread Saq Imtiaz
No rush. In fact, maybe leave that alone and consider this other issue instead. I think there's definitely an issue with the code that was introduced when it went from being just a title picker as in the start of this thread, to adding a list that loops through all the tiddlers tagged $:/tags/

Re: [twdev] Re: Caret position - Take 2

2020-07-15 Thread Saq Imtiaz
@Mat this is a rush job so I don't think its quite right/complete, and I didnt get the chance to test much, but try this. Make a backup first! Replace your editorMagicActions macro with: \define processNextMagicActionsTiddler() <$list filter="""[all[tiddlers]tag[$:/tags/EditorMagic]!has[draft.o

Re: [twdev] Re: Caret position - Take 2

2020-07-14 Thread Saq Imtiaz
@Mat: I.e only delete if what is currently investigated does not match the > template in use. Problem is, there is no "template in use" until one has > been set. But if we could set a faux template value in em-state to begin > then nothing will match this, until the template in use is set, upon

Re: [twdev] Re: Caret position - Take 2

2020-07-14 Thread Saq Imtiaz
@Mat: > >>>- If there is no match, we cancel any already shown popups. >>> >>> failed attempt - I made a "deletePopState" macro but calling it gives > RSOE Uncaught TypeError: Cannot read property 'left' of undefined > (to locate the call: it's in editorMagicActions in the inner ListWidgets

Re: [twdev] Re: Caret position - Take 2

2020-07-14 Thread Saq Imtiaz
I feel like with the hit rate of these guesses I should be playing the lottery. About to take a look at your demo now. On Tuesday, July 14, 2020 at 3:20:20 PM UTC+2, Mat wrote: > > Saq Imtiaz wrote: >> >> Have you made trigger-end available as a variable in the popup? >>

Re: [twdev] Re: Caret position - Take 2

2020-07-14 Thread Saq Imtiaz
Have you made trigger-end available as a variable in the popup? On Tue, 14 Jul 2020, 14:26 Mat, wrote: > Thanx, it was indeed misplaced outside of the button. It now works but no > trigger-end is appended. I'm leaving it for your to look at. > > <:-) > > -- > You received this message because yo

Re: [twdev] Re: Caret position - Take 2

2020-07-14 Thread Saq Imtiaz
Make sure you use the exact attribute name that I mentioned earlier, and that the span is inside the button for each list result. If that doesn't help, I'll debug later. On Tuesday, July 14, 2020 at 1:38:17 PM UTC+2, Mat wrote: > > Saq, no rush whatsoever. > > I just also updated the TitlePicker

Re: [twdev] Re: Caret position - Take 2

2020-07-14 Thread Saq Imtiaz
Mat: Busy day but I'll make some time to read, catch up and review in the afternoon. On Tue, Jul 14, 2020 at 12:17 PM Mat wrote: > OK, updated http://editormagic2.tiddlyspot.com/ > > I think I've now managed to separate concerns between the /body/editor and > /_Popup. It is worth noting that wha

Re: [twdev] Re: Caret position - Take 2

2020-07-13 Thread Saq Imtiaz
@Mat > IF these changes are also supposed to deal with the move-with-arrow-keys > issue, then that aspect does not seem to work fully yet. But, yes, it does > show the popup and I'll continue with the wikitext. > > My changes today are meant solely to address the missing selectionEnd vari

Re: [twdev] Re: Caret position - Take 2

2020-07-13 Thread Saq Imtiaz
Hi Mat, selectionEnd is the end caret position. So we split to get individual characters, keep only what is before selectionEnd, and join back to a string. selectionEnd and what it is used for is explained earlier in the thread. Part of the motivation for putting in so much time in the explan

Re: [twdev] Re: Caret position - Take 2

2020-07-13 Thread Saq Imtiaz
Don't think there is anything wrong with your code. The issue is probably this: - the code relies on selectionEnd, which we dont have access to since that is provided by action-popupcaret Possible options: a) don't rely on selectionEnd for detection (though this might get inconsistent like before)

Re: [twdev] Re: Caret position - Take 2

2020-07-13 Thread Saq Imtiaz
> > Given that it's all wikitext changes, are you requesting that I implement > it? I can probably do that given enough time but I'm sure there will be > several missteps along the way. > I can help but I wont have much time until the weekend at the earliest to do any real coding on this. If y

Re: [twdev] Re: Caret position - Take 2

2020-07-12 Thread Saq Imtiaz
Good morning Mat, On Monday, July 13, 2020 at 12:53:05 AM UTC+2, Mat wrote: > > This adds an index: > > Using the Title Picker as an example, if we can do something like this: <$list filter="[minlength[1]]"> <$list filter="[all[tiddlers]prefixcount[]!match[0]]" variable="_NULL"> <$list filter

Re: [twdev] Re: Caret position - Take 2

2020-07-12 Thread Saq Imtiaz
+100 to re-reading the previous explanations of the what the different bits of code do and how they work together. It will help you immensely with the next round of changes. Can we find a way to make it: >> <$text text=<> /> X >> where X represents the position in the list, i.e. 1, 2, 3 > >

Re: [twdev] Re: Caret position - Take 2

2020-07-12 Thread Saq Imtiaz
@Mat random thought that I don't have time to look into now, but if doable could be very useful here. Right now the content of each button in the popup is: <$text text=<> /> Can we find a way to make it: <$text text=<> /> X where X represents the position in the list, i.e. 1, 2, 3 So basic

Re: [twdev] Re: Caret position - Take 2

2020-07-12 Thread Saq Imtiaz
This will be short, juggling a few other things. No stress, I know its hard to work through wikitext coding. For all its strengths it can be hard to follow. Not using a version control like git also makes this harder, we both can't see exactly what the other person has changed. $:/core/ui/EditT

Re: [twdev] Re: Caret position - Take 2

2020-07-12 Thread Saq Imtiaz
Hi Mat, > But I'm curious: even for pre-made popup tools, the system will still have > to know if <$widget foo> is closed or not. So how is the fragment end > detected? In the EditorMagic/_Popup it is defined to be the "whole string" > after the trigger until a trigger-end... but it seems you

Re: [twdev] Re: Caret position - Take 2

2020-07-11 Thread Saq Imtiaz
Hi Mat, Type e.g [[Ed to get the popup. > Now type either of: > - a blank space and several other words > - or hit the Enter key a few times to get new rows > This hides the popup. > Now, where you're standing, type [[E > This shows the popup in the old place > Right. This is actually the same

Re: [twdev] Re: Caret position - Take 2

2020-07-11 Thread Saq Imtiaz
Mat: decided to make your life a bit harder. There are updates! https://saqimtiaz.github.io/sq-tw/editormagic-popup.html - $:/plugins/EditorMagic/styles (new) - $:/plugins/EditorMagic/editor-operations/insert-completion.js (new) - $:/core/ui/EditTemplate/body/editor (updated) - EditorM

Re: [twdev] Re: Caret position - Take 2

2020-07-11 Thread Saq Imtiaz
Hi Mat, ...except for if there's a tiddler titled literally: > > A [[Tiddler > > ...and I try to complete by typing this > > [[A [[Tid > > - this gives no popup. My spontaneous feeling is that TWs native warnings > against using brackets in titles should be enough to prevent this ... > That is

Re: [twdev] Re: Caret position - Take 2

2020-07-10 Thread Saq Imtiaz
Hi Mat, >1. Pop up position: Creating a new row seems to take presedence and >steer where the popups shows. I get this bug(?) to most consistently show >if the text *starts out* with empty rows, then the popup shows in that >area rather than where the title is completed. > > Could

[twdev] Re: Plugin Packaging Question

2020-07-10 Thread Saq Imtiaz
ing Mario's videos and notes. > > If its documented anywhere please let me know. > > Thanks all > Tony > > On Friday, July 10, 2020 at 6:43:17 PM UTC+10, Saq Imtiaz wrote: >> >> Just FYI; node.js users of TiddlyWiki will expect a "folder version"

[twdev] Re: Plugin Packaging Question

2020-07-10 Thread Saq Imtiaz
Just FYI; node.js users of TiddlyWiki will expect a "folder version" of your plugins, that is a directory structure with one tiddler per file. Working with the correct directory structure and tiddler names from the beginning will make your life easier long term. This ties in with what Mario men

Re: [twdev] Re: Caret position - Take 2

2020-07-09 Thread Saq Imtiaz
I also recommend to look through the wikitext changes in the popup Tiddler, so you understand what changes were made and why. On Thu, 9 Jul 2020, 19:13 Mat, wrote: > between <$edit> and > > > Aha, thanks. The docs explicitly > states "The content of the

[twdev] Re: Caret position - Take 2

2020-07-09 Thread Saq Imtiaz
Hi Mat, > > >> Secondly: If we move the reveal for the popup in *$:/core/ui/* >> *EditTemplate/body/editor*, inside of the closing tag, it would >> allow editor toolbar commands to work when included in the popup. Nice >> bonus. >> > > huh? Is that some super trick or is it an established

[twdev] Re: Caret position - Take 2

2020-07-09 Thread Saq Imtiaz
@Mat: https://saqimtiaz.github.io/sq-tw/editormagic-popup.html All tiddlers needed for the functionality are tagged $:/EditorMagic The screenshot below (at the very end) shows which fields are set in the state tiddler for the popup. Note that when there is no selection, selection-end = selectio

[twdev] Re: Caret position - Take 2

2020-07-09 Thread Saq Imtiaz
ration We could also extend tm-edit-text to support "replace at caret position" to make the insertion of completed strings easier. On Thursday, July 9, 2020 at 9:19:24 AM UTC+2, Saq Imtiaz wrote: > > Hi Mat, > > Let's hope I haven't been too bold and jinxed us, and

[twdev] Re: Caret position - Take 2

2020-07-09 Thread Saq Imtiaz
Hi Mat, Let's hope I haven't been too bold and jinxed us, and that we wont find some killer bug in my approach ;) > Can I ask, is @Jeds construct of use? It obviously has been very useful > for my demos, and I also recall Snowgoon bringing up some strenghts >

[twdev] Re: Active Tiddler Tools RFC

2020-07-09 Thread Saq Imtiaz
I think current tiddler in this context is OK and should not be confusing as Eric points out. I noticed that Tony used the terms "focus" and "set focus", so "target" "set target" felt like a good but also easy replacement. Could just as easily be "current" and "set current". On Thursday, July

[twdev] Re: Active Tiddler Tools RFC

2020-07-08 Thread Saq Imtiaz
"Target tiddler" / "set target" terminology seems appropriate. Would even work with your icons. Inappropriate use of the term focus will lead to misunderstanding, potentially having to field a lot of related questions from confused users, and renaming your terminology when the core starts keepi

[twdev] Re: Caret position - Take 2

2020-07-08 Thread Saq Imtiaz
Hi Mat, It helps that I made a PR for snowgoon's plugin a few weeks ago to make a few improvements and optimizations, so I understand both his code and some of the challenges involved with popups in textareas. I didn't have more time or I would have cleaned it up before sharing. If you are int

[twdev] Re: Caret position - Take 2

2020-07-08 Thread Saq Imtiaz
@Tony: Eric's suggestion of "active tiddler" is probably a good stop-gap solution as it doesn't clash with established nomenclature. Suggest you use that name (active tiddler) to post a demo of what you are talking about in a new thread if you want feedback and/or suggestions for a better name.

[twdev] Re: Caret position - Take 2

2020-07-08 Thread Saq Imtiaz
Hiya Mat, Checking to see if you saw the demo I posted for you? You may or may not like the implementation approach, but I think it addresses most of your concerns and potentially has ideas that might be beneficial in whichever implementation you decide to pursue. You get full access to variab

[twdev] Re: Caret position - Take 2

2020-07-07 Thread Saq Imtiaz
@Tony Please consider using a different term instead of "focused tiddler" as this is likely to lead to misunderstandings. Focus has a very specific meaning in HTML parlance, in brief the element with focus is the target for keyboard input. Details: https://developers.google.com/web/fundamentals/

[twdev] Re: Caret position - Take 2

2020-07-07 Thread Saq Imtiaz
@Mat Play with this and see if it's closer to what you are thinking of: https://saqimtiaz.github.io/sq-tw/editormagic-poc.html It's a quick 30 minute hack so expect it to be rough. In particular if you have unfinished links that can cause some issues, and it will only in textareas/inputs where

[twdev] Re: Caret position - Take 2

2020-07-06 Thread Saq Imtiaz
The approach I would try is: - extend the edit-text widget engines with a keydown event listener which saves the caret position in a state tiddler specific for that field and tiddler. - have a reveal widget that gets triggered as a popup, depending on the text in the textarea, using the caret p

[twdev] Re: How make certain strings fire an action in editor?

2020-07-01 Thread Saq Imtiaz
PS: If I was going to try and do this with just wikitext, that is probably where I would start. On Wednesday, July 1, 2020 at 2:13:34 PM UTC+2, Saq Imtiaz wrote: > > Mat: here is an alternative approach to consider. > > - a button or keyboard shortcut in the editor that creates a

[twdev] Re: How make certain strings fire an action in editor?

2020-07-01 Thread Saq Imtiaz
Mat: here is an alternative approach to consider. - a button or keyboard shortcut in the editor that creates a popup at the caret position - an input field in the popup where you start typing whatever you want autocompleted - now its easy to know where the string starts and ends - all your other

[twdev] Re: Can't get 'tm-save-wiki' to work

2020-06-29 Thread Saq Imtiaz
You're welcome. Don't hesitate to post if you have other questions in the future. If the issue is with code different from what is in the repo on github, just post a demo to make it easier to debug. On Monday, June 29, 2020 at 9:51:55 AM UTC+2, Souf K wrote: > > The download saver involves a

[twdev] Re: How make certain strings fire an action in editor?

2020-06-28 Thread Saq Imtiaz
Found it and reported, thanks. It's a typo, udpate instead of update :) As for your demo, I am not really sure. I mentioned this pull request because it solves the problem of firing actions based on keyboard activity in the text area. Beyond that I am not sure about what you need to do, or how

[twdev] Re: How make certain strings fire an action in editor?

2020-06-28 Thread Saq Imtiaz
Can you give me step by step instructions to reproduce the bug, as well as your OS and browser version? I had a quick check and am not getting any errors. On Sunday, June 28, 2020 at 12:11:36 PM UTC+2, Mat wrote: > > @Saq - a potential bug in the PR and also problems in getting the exchange > of

[twdev] Re: Can't get 'tm-save-wiki' to work

2020-06-28 Thread Saq Imtiaz
Without a demo with the updated code you are mentioning, I can only guess. The download saver involves a click event at some point to trigger the download. Is your widget adding a click listener to the body/document that might be interfering? On Sunday, June 28, 2020 at 9:58:20 AM UTC+2, Souf K

[twdev] Re: How make certain strings fire an action in editor?

2020-06-27 Thread Saq Imtiaz
On Saturday, June 27, 2020 at 10:24:05 PM UTC+2, Mat wrote: > > > I of course don't want to delay the current PR, but it there any *other > *reason > for why not to raise this already now? > The PR is about adding keyboard support to the tagpicker and search fields. This addition to the edit

[twdev] Re: How make certain strings fire an action in editor?

2020-06-27 Thread Saq Imtiaz
Once the PR is merged, you would need to edit the shadow tiddlers for the editor and add the inputActions= parameter to the edit widget invocation. You could try raising at PR at that point to add a inputActions={{$:/config/editor/inputActions}} parameter, which would do nothing unless $:/confi

[twdev] Re: How make certain strings fire an action in editor?

2020-06-27 Thread Saq Imtiaz
;$action-createtiddler /> is a valid widget invocation, you will need some parameters. On Saturday, June 27, 2020 at 9:11:37 PM UTC+2, Mat wrote: > > Saq Imtiaz wrote: >> >> If you want to experiment, you can grab the edit-text widget tiddler from >> the demo

[twdev] Re: How make certain strings fire an action in editor?

2020-06-27 Thread Saq Imtiaz
If you want to experiment, you can grab the edit-text widget tiddler from the demo http://tag-picker-kb.tiddlyspot.com/ On Saturday, June 27, 2020 at 8:22:45 PM UTC+2, Mat wrote: > > Saq Imtiaz wrote: >> >> Mat, when merged this pull request includes adding the ability for

[twdev] Re: How make certain strings fire an action in editor?

2020-06-27 Thread Saq Imtiaz
Mat, when merged this pull request includes adding the ability for the edit-text widget to fire actions when a user types into the text area: https://github.com/Jermolene/TiddlyWiki5/pull/4725 This may be something you can use. On Saturday, June 27, 2020 at 10:52:14 AM UTC+2, Mat wrote: > > For

[twdev] Re: Cursor position?

2020-06-27 Thread Saq Imtiaz
@Mat I am not familiar enough with your code to be able to offer an opinion. Sometimes these issues are due to transcluding like {{template}} instead of {{||template}} or {{mytiddler||template}} In the meantime try using this instead of currentTiddler: {{{[get[draft.of]]}}} On Saturday, June 27,

[twdev] Re: Can't get 'tm-save-wiki' to work

2020-06-26 Thread Saq Imtiaz
>From what I can see of your code at a quick glance, you are using widget.dispatchEvent rather than invokeAction. Furthermore there are no parameters on the event. I am pretty sure you need to specify param (the template to be used for saving). It is not optional, see https://tiddlywiki.com/#W

[twdev] Re: Stop the Dirty flag that forces "Changes that you made may not be saved" Message

2020-06-22 Thread Saq Imtiaz
> > > Unfortunately I do not know how to create the bookmarklet but have tried.. > javascript:(function(){ $tw.saverHandler.numChanges = 0; $tw.saverHandler. updateDirtyStatus(); })(); reset dirty reset dirty See: http://js.do/blog/bookmarklets/ -- You received this message because you ar

[twdev] Re: Stop the Dirty flag that forces "Changes that you made may not be saved" Message

2020-06-21 Thread Saq Imtiaz
Not sure I fully understand the problem despite re-reading the OP a few times, but I don't think you can reset the dirty status from wikitext. The following run from the dev console or via a bookmarklet will reset the dirty status: $tw.saverHandler.numChanges = 0; $tw.saverHandler.updateDirtySt

[twdev] Re: Hook defined in startup module not working

2020-06-18 Thread Saq Imtiaz
There is no way at present to hook into renaming that occurs via the standard edit template, which I think is a shortcoming that needs to be addressed. Looks like Jeremy is on the case for that. On Thursday, June 18, 2020 at 12:15:47 PM UTC+2, Mirko Richter wrote: > > Hi! I came accross exactl

Re: [twdev] Re: Refresh widget after an external JS finished loading

2020-06-16 Thread Saq Imtiaz
i-loaded isn’t persisted in the storage and has its > value reset on every reload? > > > -- > > > On Tuesday, Jun 16, 2020 at 11:13 a.m., Saq Imtiaz > wrote: > Here's the first idea that comes to mind: > > Add a onYouTubeIframeAPIReady function that calls th

Re: [twdev] Re: Refresh widget after an external JS finished loading

2020-06-16 Thread Saq Imtiaz
Here's the first idea that comes to mind: Add a onYouTubeIframeAPIReady function that calls the following: $tw.wiki.setText(title,field,index,value,options) Use this to set the value of a tiddler like $:/vp/youtube-api-loaded to true $tw.wiki.setText("$:/vp/youtube-api-loaded","text","","true")

[twdev] Re: Attempting to create a horizontally dense storyview

2020-06-13 Thread Saq Imtiaz
@Yestin this might be a good starting point: https://learnawesome.org/tiddlywiki.html#%24%3A%2Fplugins%2Frmnvsl%2Fkrystal See also: - https://twitter.com/Learn_Awesome/status/1265574525342793730 - https://learnawesome.org/digitalgardensetup On Saturday, June 13, 2020 at 12:30:20 AM UTC+2,

[twdev] Re: Bug detected that may cause problems with overwritten system tiddlers?

2020-06-04 Thread Saq Imtiaz
PSaT/bookmarkletMaker/ > AdvancedSearch]] > > > And while this list does not change the haschanged tiddlers I think it may > be changing one of the subtiddlers. > > I will need to follow this lead further. > > Thanks > Tony > > > > > On Friday, June 5

[twdev] Re: Bug detected that may cause problems with overwritten system tiddlers?

2020-06-04 Thread Saq Imtiaz
@Tony what browser and OS are you using? Running the filter [haschanged[]] at https://tiddlywiki.com/empty.html in Linux and the latest Chrome gives me the following: $:/StoryList $:/HistoryList $:/state/tab--1498284803 $:/temp/advancedsearch On Friday, June 5, 2020 at 5:57:22 AM UTC+2, Tony

[twdev] Re: [Idea] Custom Text-Body Templates (worth a Core Pull Request)?

2020-05-28 Thread Saq Imtiaz
config tiddlers are defined and users would not have to re-order filters > _within_ a config tiddler to change things at the 'section' level. > > Best, > > Joshua Fontany > > On Thursday, May 28, 2020 at 10:23:23 AM UTC-7, Saq Imtiaz wrote: >> >>

[twdev] Re: [Idea] Custom Text-Body Templates (worth a Core Pull Request)?

2020-05-28 Thread Saq Imtiaz
@Tony can you please post a precise example - with code or even pseudo code - of something you would wish to achieve, that you think is not possible with the given pull request? Regards, Saq On Thursday, May 28, 2020 at 9:17:19 AM UTC+2, TonyM wrote: > > Joshua, > > This seems like a great addi

[twdev] Re: [Idea] Custom Text-Body Templates (worth a Core Pull Request)?

2020-05-26 Thread Saq Imtiaz
I have been using the subfilter in the page template part of this for a few months and it works great, but that's just for switching out entire templates. This allows more fine-grained control. I expect this change to be entirely backwards compatible. The only thing worth verifying is if the qu

[twdev] Re: [Idea] Custom Text-Body Templates (worth a Core Pull Request)?

2020-05-25 Thread Saq Imtiaz
ng >> their name as a link (so you can "jump to the code" if it is not rendering >> correctly by toggling the Debug switch and clicking a template title). >> >> Thanks Saq, I'll put together a set of change as a PR, so we can have >> some testable code

[twdev] Re: [Idea] Custom Text-Body Templates (worth a Core Pull Request)?

2020-05-24 Thread Saq Imtiaz
I'm still a bit under the weather so not thinking with the clearest head here but a few thoughts: - I like the use of subfilter, that is the problem with the current way $:/config/ui/ViewTemplate is used, it is a direct assignment as a text reference - I would want similiar extensib

[twdev] Sharing some experimental bits and bobs

2020-05-23 Thread Saq Imtiaz
So this one is strictly for those familiar with TW core internals and JavaScript, you have been warned. I've started posting some of my experimental bits and pieces and doodads in case some of them may be of interest to other developers: https://saqimtiaz.github.io/sq-tw/sandbox.html This in re

[twdev] Re: Request for help: Packaging Stroll as a plugin

2020-05-21 Thread Saq Imtiaz
just wondering if this is the best way to do this. What if a user is also > using the "refs" tag? How should plugins maintain their own namespace? > > On Thursday, May 21, 2020 at 2:15:34 PM UTC-5, Saq Imtiaz wrote: >> >> [tag[refs]] is equivalent to [all[tiddle

[twdev] Re: Request for help: Packaging Stroll as a plugin

2020-05-21 Thread Saq Imtiaz
[tag[refs]] is equivalent to [all[tiddlers]tag[refs]] What you want is [all[shadows+tiddlers]tag[refs]] 3rd party plugins should not be packaged into a Stroll plugin. Instead a stroll file should consist of empty.html + stroll plugin + 3rd party plugins Note that most of the benefit of hosting

[twdev] Re: New to TW - experienced dev - question

2020-05-20 Thread Saq Imtiaz
*, module-type *widget *and put your javascript code for your action-getbookinfo widget in there. Save and reload and that widget will be accessible in all tiddlers. On Wednesday, May 20, 2020 at 4:42:27 PM UTC+2, Saq Imtiaz wrote: > > @Flan: think of > plugin > > as an umbrella te

[twdev] Re: New to TW - experienced dev - question

2020-05-20 Thread Saq Imtiaz
ntation but > it's not very friendly to someone new to TW. > > On Wednesday, May 20, 2020 at 1:28:33 AM UTC-7, Saq Imtiaz wrote: >> >> Plugin javascript tiddlers need the correct module-type to determine how >> they are made available/run. >> https://tiddlywiki.c

[twdev] Re: Curious about field transclusions with formating

2020-05-20 Thread Saq Imtiaz
A startup module defining extra fields works, I've done it in the past for a plugin for dates and fields I wanted treated as an array. Eg: $tw.modules.define("$:/boot/tiddlerfields/sq-duedate","tiddlerfield",{ name: "sq-duedate", parse: $tw.utils.parseDate, stringify: $tw.

[twdev] Re: New to TW - experienced dev - question

2020-05-20 Thread Saq Imtiaz
PS: also note the $tw.utils.httpRequest method which might be handy: https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/utils/dom/http.js On Wednesday, May 20, 2020 at 10:28:33 AM UTC+2, Saq Imtiaz wrote: > > Plugin javascript tiddlers need the correct module-type to determi

  1   2   >