New features in leoInteg

81 views
Skip to first unread message

Félix

unread,
Jul 8, 2020, 2:46:39 AM7/8/20
to leo-editor
Just pushed lots of new features on the dev branch!

Jeez its almost 3am ugh... Way too late for me to start giving list of features i'm going straight to bed!

I'll explain all the new stuff when I have breakfast but I thought I'd just post this 'heads up' in case you guys wanna start testing, exploring and playing with it while I sleep.
--
Félix

Edward K. Ream

unread,
Jul 8, 2020, 4:27:44 AM7/8/20
to leo-editor
On Wed, Jul 8, 2020 at 1:46 AM Félix <felix...@gmail.com> wrote:
Just pushed lots of new features on the dev branch!

Thanks for this. I'm getting up just as you are going to sleep ;-)

When I start your extension I get this warning:

[boltex.leointeg]: Menu item references a command `leointeg.dehoist` which is not defined in the 'commands' section.

Apart from that, everything seems to work as before.

Edward

Félix

unread,
Jul 8, 2020, 10:29:14 AM7/8/20
to leo-editor
Note to self: Test under windows just before pushing after adding features!

Turns out vscode commands are case-insensitive under linux! Which leads to compile errors when trying to run under windows with erroneous case inconsistencies!

Thanks for trying, and sorry for this rookie mistake! All fixed under the dev branch now! 
--
Félix

(thats why I let it simmer for a little while in dev before moving stuff to master... gotta catch small typos and bugs!)

Edward K. Ream

unread,
Jul 8, 2020, 11:47:45 AM7/8/20
to leo-editor
On Wed, Jul 8, 2020 at 9:29 AM Félix <felix...@gmail.com> wrote:
Note to self: Test under windows just before pushing after adding features!

Turns out vscode commands are case-insensitive under linux! Which leads to compile errors when trying to run under windows with erroneous case inconsistencies!

Thanks for trying, and sorry for this rookie mistake! All fixed under the dev branch now! 

Everything looks good now.

Edward

Félix

unread,
Jul 8, 2020, 2:54:46 PM7/8/20
to leo-e...@googlegroups.com
Here's a quick list of most of the new features now on the "dev" branch. Going to make little touch-ups and cleanup before merging to master.

New option setting : Use Leo Tree Browsing. (find better name!)

New option setting : Show/hide 'edit headline' hover icon. (allowing to remove all icons lets the user go directly from the tree to the body pane with  a single 'tab' hit on the keyboard.

New Visual Helper: when changing option-settings, a new popup will appear indicating the options have been changed but are still pending 'saving' in the user's settings file. 1.5 Seconds later the 'Auto-saved' message should appear as usual. (Some users were closing / changing tabs too fast after changing settings and not realizing they had not waited long enough for the 'auto-save' to kick in.)

After changing the option-settings, if any changes involved the hover-icons, the tree will refresh (debounced / timeout of 200ms) to reflect the changes.

The "currently selected node" attributes are now watched by leoInteg in order to strictly show and allow relevant commands and icons only. (in command palette and on the top title bar of outline views)

Outline tree nodes also have more properties to allow stricter set of commands to be offered in via the right-click context menu ("goto-next-clone" only shown on cloned nodes, "refresh from file" only shown on '@clean/@files etc...)

Hoist and dehoist commands have been implemented for the currently selected node *and* also for any visible node in the outline tree via right-click context menu. De-hoist command is accessible as an icon in the tree top title bar, as a regular command, and as a context-menu entry on the single topmost ode of a hoisted tree.

Keyboard editing improvements: Commands try to bring focus back into the right pane after execution to improve the keyboard editing experience and fluency.

Keyboard editing improvements: CTRL-T and Tab shortcuts that match Leo's behavior to switch active panel

"Direct" keyboard navigation in the outline tree: Move the selected tree node and body pane with single arrow keys, as in Leo. Replaces vscode's usual tree navigation system. Optionally toggled on/off as an option setting.

New keyboard shortcuts: 
gotoFirstVisible : alt+home,
gotoLastSibling : alt+end,
gotoNextClone : alt+n,
sortSiblings : alt+a,
showOutline : alt+t,
Toggle outline/body focus : ctrl+t,
Focus Body : alt+d,
Focus body (from tree) : tab",
Alt+Arrow keys: Direct Tree Navigation.
Arrow Keys: (with 'Leo-tree-browse' option) Direct Tree navigation

As usual, please report anything that comes to mind while using this so I can make adjustments :) 

Thanks for trying this stuff out you guys!
--
Félix

Edward K. Ream

unread,
Jul 8, 2020, 3:48:37 PM7/8/20
to leo-editor
On Wed, Jul 8, 2020 at 1:54 PM Félix <felix...@gmail.com> wrote:
Here's a quick list of most of the new features. Going to make little touch-ups and cleanup before merging to master.

New option setting : Use Leo Tree Browsing. (find better name!)

When I clicked the checkbox the pane said "Modified". How do I save the settings?

Alt+Arrow keys: Direct Tree Navigation.
Arrow Keys: (with 'Leo-tree-browse' option) Direct Tree navigation

There is a subtle difference with the arrow keys when focus is in the Tree, without Direct Tree Navigation, and possibly with Direct Tree Navigation.

Alt arrow keys select exactly one node. Plain arrow keys select the proper node, but leave a dotted outline surrounding the parent node when moving from the parent to the child. This is a bit annoying.

Edward

Brad

unread,
Jul 8, 2020, 3:52:07 PM7/8/20
to leo-editor
Hello Félix,

As a regular user of Leo and VSCode, this is awesome!

Following Matt Wilkie's great step-by-step account of how to get things going under Anaconda Python, I edited some leo outlines and was very impressed by the potential of this project.

Not knowing much about VSCode extensions, do you imagine that further down the road a user of VSCode will just be able to open a .leo file and have the various components start up so that manipulating Leo outlines will be seamless?

Thanks again.

Kind regards,
Brad

Félix

unread,
Jul 8, 2020, 5:00:01 PM7/8/20
to leo-editor
When I clicked the checkbox the pane said "Modified". How do I save the settings?

After 1.5 seconds it should be replaced by auto-save message, in grey, I'm going to test it under windows too... 

Plain arrow keys select the proper node, but leave a dotted outline surrounding the parent node when moving from the parent to the child. This is a bit annoying.

Thanks I'm also going to test it under windows for I dont see what you describe under linux.

 (btw, under windows, for illustration purposes, alt+printscreen captures only the current window and places it in the clipboard, for direct copy/paste in posts/replys in here in the google groups forums.)

Félix

Félix

unread,
Jul 8, 2020, 5:14:42 PM7/8/20
to leo-editor
Hi Brad!

Glad you like it!

Knowing that other people understand and use what i'm doing is a great motivator and a pleasant experience! So thank you for taking the time to report your usage of leoInteg!

Not knowing much about VSCode extensions, do you imagine that further down the road a user of VSCode will just be able to open a .leo file and have the various components start up so that manipulating Leo outlines will be seamless?

Well for some, (I think Ar-jan made it work seamlessly under conda/anaconda, see https://github.com/boltex/leointeg/issues/10#issuecomment-654665776 ) it feels 'seamless' if you've configured the python command line option to start the server and connect automatically... I guess I could start the leoInteg extension all the time even if there's no .leo file in the current workspace... (there's many little details that could be fined tuned to offer a more pleasant experience) 

But I guess actually it depends what you mean exactly by 'seamless' and 'open a leo file'. 

And with that, I'm inviting you to describe what the user experience would be in your mind, the best or nicest way to more fully integrate the 'open a leo file' and seamless concepts, in a detailed and precise way. 

People who take the time to describe very precisely how a feature could (or should) be experienced and implemented sometimes make a project move along faster than people who submit actual code!

Thanks again and don't hesitate to address any issues at all :)
--
Félix

Félix

unread,
Jul 8, 2020, 5:27:20 PM7/8/20
to leo-editor
Edward, I've switched back to windows to test changing config for the new 'leo tree browsing' mode and it works fine.  (for me... might be some other problem elsewhere)

Alt-arrows call the exact same function as arrows alone when the new 'leo tree browsing' mode is enabled.... so there's no reason they would react differently. (the shadow/dotted thing you mentionned.)

also Like I mentionned : 
New Visual Helper: when changing option-settings, a new popup will appear indicating the options have been changed but are still pending 'saving' in the user's settings file. 1.5 Seconds later the 'Auto-saved' message should appear as usual. (Some users were closing / changing tabs too fast after changing settings and not realizing they had not waited long enough for the 'auto-save' to kick in.)

that's the new 'modified' indicator popup that gets replaced, 1.5 seconds later by the old "settings saved" popup. (keep your eyes on it for 1.5 seconds when changing a setting.) it's debounced by 1.5 seconds to let people change many settings rapidly.

Make sure the new 'leo tree browsing' option is "on" before trying the arrow keys alone. if option is off, you're back to using the arrows in the old vscode style which just moves a 'cursor' shade over the nodes, and "Enter presses" are then also needed to actually select nodes and see the body pane reflect that selection. 

(Guess I might actually include that in the intro-to-leo video i'm working on...)

Félix

Félix

unread,
Jul 9, 2020, 3:54:27 AM7/9/20
to leo-editor
Currently doing small ui touchups and interaction/focus fixes: 
 - ctrl+S is really needed when focus on tree or body to save the leo file and derive files.
 -  and so are maybe home , end , pgup and pgdn keys when the 'leo tree browsing style'  option is on. 
 - along with the 'enter' key that should be overriden in this mode, to mimic Leo focus shift between tree and body, (exactly like the 'tab' key).

half of those are already on dev branch (Also recorded all my audio files for the video tutorial. that was fun! just need to capture video and do the editing)

g'night! :)
--
Félix

Edward K. Ream

unread,
Jul 9, 2020, 7:04:30 AM7/9/20
to leo-editor
On Wed, Jul 8, 2020 at 4:00 PM Félix <felix...@gmail.com> wrote:
When I clicked the checkbox the pane said "Modified". How do I save the settings?

After 1.5 seconds it should be replaced by auto-save message, in grey, I'm going to test it under windows too... 

Now it works.  After the "Modified" auto-save message I see a "Settings Saved" message.

The error in the settings.json file may have been the reason I didn't see the "Settings Saved" message before.

Edward

Edward K. Ream

unread,
Jul 9, 2020, 7:13:36 AM7/9/20
to leo-editor
On Wed, Jul 8, 2020 at 4:27 PM Félix <felix...@gmail.com> wrote:

Make sure the new 'leo tree browsing' option is "on" before trying the arrow keys alone. if option is off, you're back to using the arrows in the old vscode style which just moves a 'cursor' shade over the nodes, and "Enter presses" are then also needed to actually select nodes and see the body pane reflect that selection. 

Everything now works as you describe when "leo tree browsing" is on. The selected outline node has a solid outline. The parent node doesn't have a dotted outline. However, if the mouse is left hovering over a node that node has a dotted outline. But that's to be expected.

Edward

Edward K. Ream

unread,
Jul 9, 2020, 7:15:39 AM7/9/20
to leo-editor
On Thu, Jul 9, 2020 at 2:54 AM Félix <felix...@gmail.com> wrote:
Currently doing small ui touchups and interaction/focus fixes: 

Thanks for the update.

One feature I'd like to see eventually. When leoInteg opens a .leo file I would like to see the .leo file appear in vs code's "File: Open Recent" submenu.

Edward

Brad

unread,
Jul 9, 2020, 3:32:53 PM7/9/20
to leo-editor
Hello Félix,

I appreciate your hard work on this project!

My workflow in VSCode is normally as follows:

- Store directories as projects using the Project Manager extension.
Directories can contain a variety of file types (Python, Jupyter, markdown, Leo, ...)

- Open a project and click on various files in the VSCode Explorer to open them in tabs and make edits.
For Leo files, it would be nice if opening a Leo file from the Explorer would start all of the necessary 'machinery' (e.g., server) if it is not started already so that I can immediately see the outline and work on it.

I suppose the idea is that, if someone has python and the leointeg extension installed, operating on leo outlines will take no more setup than editing a text file. If the procedure requires command line operations or creating special shortcuts, I am guessing that the uptake of the extension may be limited to 'experts'.

Kind regards,
Brad

Félix

unread,
Jul 9, 2020, 4:00:58 PM7/9/20
to leo-editor
Thank for your update Brad, 

I see what you mean and am currently working on solutions on that matter: https://github.com/boltex/leointeg/issues/72

I feel the need to point out that if your settings are set correctly, leoInteg *will* start everything automatically if your current workspace includes a .Leo file. (short of actually opening the Leo file itself, for which the command has to be initiated by the user)

3 options are necessary for this. (in the "leo settings" webview) "start server" and "connect to server" and optionally the 'python command' launch string... This should leave you in the state where the 'open file' button is shown in the Leo panel.

The fact that you're using a 'Project Manager' extension may come and play a role in the auto-activation of leoInteg as described above. Also, there are more than one extension named exactly "Project Manager" so i'm wondering which one you're using... (the one by Alessandro Fragnani or the one by Michael Škrášek?)

I'm working on adding more features to all this to support suggestions that you, and Edward made. 

So far, a realistic and easy thing to implement that I can think of (without too much thinking) is something like: ... it would be that Leo files would have a context menu option available in the regular file explorer to 'open with LeoInteg'. I dont think its possible to override the fact that if you ask vscode to 'Open' a Leo file, that it would simply show you the XML content as it would have done if clicked on a regular XML file. but I could be wrong. 

That would be in the short term,. taking more time to explorer those avenues would lead to even better integration in the long run I'm sure. 

And please, don't hesitate to popup with more detailed ideas ! Greatly appreciated!
--
Félix

Félix

unread,
Jul 10, 2020, 4:14:48 AM7/10/20
to leo-editor
added some cool 'test' stuff on branch "boltex/issue75" 

A preview unknown attributes, i.e. p.v.u, basic usage: So use a .leo file that maybe has some 'todo' tasks added to some nodes,  or other attributes added by other plugins and what not! open them with leoInteg and behold! 

also you can hover over them too, to see objects content for now, obviously other UI rendering of this will come later.

@buttons coming soon too, goodnight for now :)
--
Félix

Edward K. Ream

unread,
Jul 10, 2020, 7:44:38 AM7/10/20
to leo-editor
On Fri, Jul 10, 2020 at 3:14 AM Félix <felix...@gmail.com> wrote:

added some cool 'test' stuff on branch "boltex/issue75" 

Félix and I chatted on zoom yesterday for several hours. What follows are some items we discussed.

A preview unknown attributes, i.e. p.v.u, basic usage: So use a .leo file that maybe has some 'todo' tasks added to some nodes,  or other attributes added by other plugins and what not! open them with leoInteg and behold! 

Note to others: outline nodes with uAs have greyed paper clips with (1) after them.

also you can hover over [the nodes] too, to see objects content for now, obviously other UI rendering of this will come later.

The read only interface is fine for now.

@buttons coming soon too, goodnight for now :)

Great to hear!

Edward

P.S. When I load ekr.leo in the "boltex/issue75" branch I see this in the output window:

Leo 6.3-devel, devel branch, build 06dcc4a054
2020-07-09 12:10:56 -0500
Python 3.7.6, LeoGui: dummy version
Windows 10 AMD64 (build 10.0.18362) SP0
read outline in 0.07 seconds
Plugin leo.plugins.nodetags not loaded.
Plugin leo.plugins.python_terminal not loaded.
Traceback (most recent call last):

  File "C:\leo.repo\leo-editor\leo\core\leoPlugins.py", line 515, in loadOnePluginHelper
    __import__(moduleName)

  File "C:\leo.repo\leo-editor\leo\plugins\viewrendered3.py", line 396, in <module>
    import leo.plugins.qt_text as qt_text

  File "C:\leo.repo\leo-editor\leo\plugins\qt_text.py", line 414, in <module>
    class LeoLineTextWidget(QtWidgets.QFrame):

AttributeError: 'NoneType' object has no attribute 'QFrame'
This doesn't look like a leoInteg problem. I'll look into it.

EKR

Brad

unread,
Jul 10, 2020, 10:26:55 AM7/10/20
to leo-editor
I am using the extension by Alessandro Fragnani.

Kind regards,
Brad

Félix

unread,
Jul 10, 2020, 12:02:39 PM7/10/20
to leo-editor
Humm.. I turned the 'load plugins' flag back on... this seems to trip a plugin that cant deal with the null GUI... I'll wait for more details about this and see if people report crashes with plugins bugging at startup.
Reply all
Reply to author
Forward
0 new messages