omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    10
    1003
    660095
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ihf
      ihf last edited by

      @cvp I turned on log before creating a file it. I created an outline and saved it but when I looked at the log file it was empty.

      cvp 2 Replies Last reply Reply Quote 0
      • cvp
        cvp @ihf last edited by cvp

        @ihf weird, I do

        • log on
        • new
        • type outline
        • end without saving

        outline.log contains what I typed

        Don't come back in the script before you check the .log

        The log is not xxx.log but always outline.log, did you know it?

        1 Reply Last reply Reply Quote 0
        • cvp
          cvp @ihf last edited by

          @ihf No news, no answer to my post beginning with "To avoid confusion between long press / double tap on an outline"...
          Do we stop the project?

          1 Reply Last reply Reply Quote 0
          • ihf
            ihf last edited by

            @cvp I'm sorry for the delay in responding. My problem is that I can't seem to reliably get long-press to be recognized and therefore begin the drag/drop. Is there a specific part of the line that needs to be touched to make this work? Also renumbering is failing for some moves.

            Here is a log file and an image of the outline (which ought not to be a valid outline).

            0,0,01
            4,4,61
            5,5,0a
            10,10,62
            11,11,0a
            16,16,63
            17,17,0a
            22,22,64
            23,23,0a
            28,28,01
            30,30,65
            31,31,0a
            38,38,66
            39,39,0a
            drop,12,32,40

            https://imgur.com/a/lbVJEkt

            cvp 2 Replies Last reply Reply Quote 0
            • cvp
              cvp @ihf last edited by

              @ihf said:

              My problem is that I can't seem to reliably get long-press to be recognized and therefore begin the drag/drop. Is there a specific part of the line that needs to be touched to make this work?

              The problem comes from the fact that the long press gesture is linked to a TextView which can also be touched by standard gestures for select/copy/paste.

              That's why I propose to override the outline text by a transparent view which would be touched by a long press while the text it-self would stay touchable by standard gestures of a text.

              So, popup menu and long press should only be active on the outline and standard menu should only be active on the text it-self.
              But I need your ok before to develop this important modif.

              1 Reply Last reply Reply Quote 0
              • cvp
                cvp @ihf last edited by

                @ihf said:

                Here is a log file and an image of the outline (which ought not to be a valid outline).

                I'll study this case tomorrow but I know there are still renumbering bugs in some moves.

                1 Reply Last reply Reply Quote 0
                • ihf
                  ihf last edited by

                  @cvp Your idea sounds like it would solve the problem I am seeing.

                  cvp 2 Replies Last reply Reply Quote 0
                  • cvp
                    cvp @ihf last edited by

                    @ihf said:

                    Your idea sounds like it would solve the problem I am seeing.

                    Ok, I'll develop that in priority...Tomorrow, except if I get a no go from you this night

                    1 Reply Last reply Reply Quote 0
                    • cvp
                      cvp @ihf last edited by

                      @ihf your renumbering bug: you move to after 2.0
                      Do you want The f becomes 3.0 or 2.1?

                      1 Reply Last reply Reply Quote 0
                      • ihf
                        ihf last edited by

                        @cvp Good question. On the Notebook app that I've mentioned earlier, if you move to under the 2.0 it becomes 3.0 but if you move to under the b (in 2.0) then it becomes 2.1. So it is sensitive to whether the location is indented or not.

                        cvp 3 Replies Last reply Reply Quote 1
                        • cvp
                          cvp @ihf last edited by

                          @ihf said:

                          So it is sensitive to whether the location is indented or not.

                          That becomes complex, isn'it?

                          1 Reply Last reply Reply Quote 0
                          • cvp
                            cvp @ihf last edited by cvp

                            @ihf V00.19 will include

                            1. gestures on outline <> gestures on text

                            1. difference between drop under outline or under text, in function of horizontal position of finger

                            1. drop under outline or under text

                            1 Reply Last reply Reply Quote 0
                            • cvp
                              cvp @ihf last edited by cvp

                              @ihf New V00.19 available with:

                              Version V00.19
                                - correction of bug "log may not be activated after an 'open file'"
                                - correction of bug "move last line shows a too high pink area"
                                - correction of bug "bad renumbering after move"
                                - support new setting "font size of hidden outlines, may be set to 0"
                                - support longpress and double tap popup menu only on outline
                                - support standard gesture select/copy/paste only on text it-self
                                - differentiate if we would drop under the outline or under the text
                                  by start the red line at left of outline or left of the text
                                - support drop under outline and under text
                              
                              1 Reply Last reply Reply Quote 0
                              • ihf
                                ihf last edited by ihf

                                Is there a way to promote by drag/drop? For example in the outline below,: is there a way to take 4.2.1 and move it with children to 4.3?
                                https://i.imgur.com/XoyFoue

                                cvp 3 Replies Last reply Reply Quote 0
                                • cvp
                                  cvp @ihf last edited by cvp

                                  @ihf I don't understand the request: why a drag/drop if you can do it with a backtab on 4.2.1which will become 4.3 and its children would follow.

                                  But, if you want it becomes 4.2, you can drag/drop,

                                  If you drag/drop to under (see where begins the red line)

                                  • an outline, the first moved line will have the level of the target.
                                  • a text, the first moved line will be a child of the target

                                  You decide where begins the red line by moving left/right your finger while dragging

                                  1 Reply Last reply Reply Quote 0
                                  • cvp
                                    cvp @ihf last edited by cvp

                                    @ihf there are still bugs of renumbering when dropping a group with children under outline of a line which has itself children...and I am completely drowned šŸ¤”

                                    1 Reply Last reply Reply Quote 0
                                    • cvp
                                      cvp @ihf last edited by

                                      @ihf New V00.20 available with

                                      Version V00.20
                                        - review all renumbering (one more time)
                                      

                                      If you have met some renumbering bugs with V00.19, please retry with V00.20

                                      1 Reply Last reply Reply Quote 0
                                      • ihf
                                        ihf last edited by

                                        @cvp yes , you can promote by moving the child above the desired point and then moving it down. The notebook app permits this in one step by moving to the left. Currently this triggers the error of moving to itself. However, you are also quite right to say that the back tab will accomplish the same in one step. I did hit one Indexerror (out of range) but I’m not sure how i got it. I think outline.py is now working rather well. I will do more testing. I am amazed at what you have been able to do and I thank you for all of your efforts.

                                        cvp 1 Reply Last reply Reply Quote 0
                                        • ihf
                                          ihf last edited by

                                          @cvp future enhancement: add checkboxes to outline.

                                          cvp 1 Reply Last reply Reply Quote 0
                                          • cvp
                                            cvp @ihf last edited by cvp

                                            @ihf said:

                                            The notebook app permits this in one step by moving to the left.

                                            Don't forget that I have also foreseen the left or right swipe gestures to promote/demote.
                                            Better than a long press, I think.

                                            But ok, next version will also include left and right move during longpressing

                                            That will say you will be able to promote/demote by 4 ways:

                                            1. Tab and back tab keys
                                            2. Double tap an outline and choosing tab or backtab in popup menu
                                            3. Swiping left or right a line of text
                                            4. Moving left or right a long pressed outline
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB Forums | Contributors