Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Outliner with drag/drop reordering
-
@ihf said:
My hope is that you will somehow eventually be able to do drag and drop of parent and child nodes so that the outline can be reordered flexibly.
I understand that. But, I can't do that before he normal process which is buggy in its renumbering part.
Drop will need automatic renumbering.Could you explain me how you see this drag and drop?
How do you want to select what to drag?
How do you want the dragging operation?
How do you want to indicate where to drop?And I promise that I'll at least try to process this drag and drop
-
@ihf New Github available with
Version V00.04 - correction of (one) bug of automatic renumbering after line feed - correction of (one) bug of automatic renumbering after tab - correction of (one) bug of automatic renumbering after back tab - if outline is exactly the same as previous line, display it in gray nb: - actually, this should not be authorized but automatic renumbering sometimes generates such invalid cases - if this functionnality is allowed, the outline would become invisible - hide/show children supported (also saved for next run) nb: actually, for testing, not really hidden but small characters to check which lines would be hidden
I'm now open for bugs description and waiting for your move/drag explanation.
-
I envision drag/drop where I do a long press on a line which selects it together with any child nodes and then dragging it to another place in the outline where everything is then appropriately renumbered. Ideally, this paradigm would also work for promoting and demoting of parts of the outline. In other words, long press with drag to move elsewhere in the outline, and long press and slide to right to demote or slide to left to promote.
-
-
@ihf before end of the day (European time), you will get a version to test "my vision of" drag.
Not yet a drop, just only to ask if you like it (please, answer sincerely).
This initial post only to warn you that the version will import @mikael 's module gestures.py.
Thus, up to you to already install it in your site-packages -
@ihf New Github available with
Version V00.05 - remove the "move" option from the popup menu when tapping an outline - to start a drag operation, long press anywhere on a line - hold your finger on the screen - pressed line and its children lines are set in a little mobile label - this label is above your finger so it stays visible why moving your finger - move the mobile label so its top/left blue point falls on a line - drop process is still to be developped, wait and see nb: actual drop process drops the entire text (outlines included) at specified location
-
@cvp i just tried to run it and got name long_press is not defined (is that from gestures.py) if so perhaps my version is out of date?
-
@ihf long_press should come from gestures, try to download the last version
-
@cvp I think that once again i need to send a video but from another app called Notebook that is the best implementation of this that I have ever come across. Alternatively, we could do a Zoom so that I could share a window and show it to you.
-
@ihf That will say you don't like the way I do a drag and drop?
Ok for a video, no private dialog if possible -
Here is a quick screen recording. The outline has controls on each line (optional) to make it easy to select with a mouse. Using drag/drop I think the finger (or pen) would just touch the line and long-press. This does not show all of the various ways that the outline can be re-ordered but it may give you some ideas. I can do more if that would be helpful.
-
@ihf access denied, your link was not correct, ok if changed in vimeo.com/561037612
-
@ihf did you try my way? It is the solution of long press anywhere on a line to get it with its children for moving. Is that not what you asked? I thought it was exactly what you wanted by your sentence "Using drag/drop I think the finger (or pen) would just touch the line and long-press"
-
@cvp Yes that is correct but ideally it should only show the line(s) that are moving as you drag.
-
@ihf but, you asked to move the pressed line and it's children lines, what I did
In my example, I pressed the 2.3 ne the moving area contains 2.3, 2.3.1 and 2.3.2 -
@ihf and I could only move vertically, forcing the x at left, like
-
@ihf said:
as you drag
Do you want to say that I would only show the moving area if and only if I move my finger?
Édit: I stop for today but, if you have still time, answer to the last question.., thanks
-
Showing the area to be moved before you actually move your finger is fine. My only concern was that it not be a box larger than the area of the text otherwise it can block out part of what you’re moving to (if that makes any sense).
-
@ihf ok, understood, it will be so
-
@ihf the next version will contain, for promote/demote by gestures, two ways:
- either by a long press on one line and moving the dragging box left or right on the same line
- either by a left or right swipe on one line (what I prefer)
You should try both ways and tell me which one to keep in the script, or we can keep both