Placement behaviour of VR vs. VR3 pane?

137 views
Skip to first unread message

Viktor Ransmayr

unread,
Oct 27, 2020, 12:38:36 PM10/27/20
to leo-editor
Hello Thomas,

In advance of the release of Leo 6.3 I have started to check out the mentioned improvements to VR & VR3 in the release notes of Leo.

In my environment, I noticed an annoying difference in VR3, when comparing it to VR's behaviour:

* The VR3 pane is always at the very top of the window - and - not to the right of the body - or - below the body (when @string initial-split-orientation = vertical is active) ...

* Similar the VR3 pane is always at the very left of the window - and - not at the right side - or - below the body pane (when @string initial-split-orientation = vertical is commented out) ...

Have you succeeded in your Leo 6.3 b1 environment, that the VR3 pane is located at the same place as the VR pane?

If yes, can you please share your respective configuration settings ...

With kind regards,

Viktor

Thomas Passin

unread,
Oct 27, 2020, 2:01:05 PM10/27/20
to leo-editor
Hi, Viktor,

In recent development releases of Leo, the VR3 pane has sometimes started to show up in unexpected places.  I have also had the VR pane open in undesired locations too (VR and VR3 use almost identical code for the on/off behavior). This seems to be caused by some bug/feature in Leo's machinery that has not been tracked down yet (there have been some recent changes to this part of Leo's code, which may or may not have something to do with it).  Edward has speculated that there may be some unexpected caching going on,

I have not seen the VR3 pane show up at the left nor under the body pane, but it probably has the same cause.  To help with recovery, I added a new command, and you should try it out:

<ALT-x>vr3-use-default-layout

This should put the VR3 pane to the right of the body pane, which should be to the right of the outline pane, no matter what incorrect layout had come about.  This layout should be stable when VR3 is toggled on and off again.  If this doesn't work for you, please post the actual behavior and I'll try to come up with a way to make it work as intended.

If this works but it is not the layout you want to use, you should be able to use the context menus of the splitter bars between panes to change the layout.  Then you can save your preferred layout under some name. After this, you can just load that named layout if VR3 should open in the wrong place again.

Please note that I wouldn't be able to offer any changed code until after Leo 6.3 final is released, since the devel branch can't be changed until then.

BTW, I use the initial setting

@string initial-split-orientation = horizontal

Most of my testing during development has been with this setting.  This puts the outline pane at the left with the Nav pane below it, the body pane to its right, and the VR/VR3 pane to the right of that.  But this setting did not prevent some of the undesired opening locations.  I don't think any existing setting can do that.

Viktor Ransmayr

unread,
Oct 27, 2020, 3:32:37 PM10/27/20
to leo-editor
Hello Thomas,

tbp1...@gmail.com schrieb am Dienstag, 27. Oktober 2020 um 19:01:05 UTC+1:
...

I have not seen the VR3 pane show up at the left nor under the body pane, but it probably has the same cause.  To help with recovery, I added a new command, and you should try it out:

<ALT-x>vr3-use-default-layout

This should put the VR3 pane to the right of the body pane, which should be to the right of the outline pane, no matter what incorrect layout had come about.  This layout should be stable when VR3 is toggled on and off again.  If this doesn't work for you, please post the actual behavior and I'll try to come up with a way to make it work as intended.
 
Yes, this resulted temporarily in the expected layout ...

However the expected layout does not persist a restart of Leo, even if I set "@string initial-split-orientation = horizontal" - and - even if I delete ~/.leo/db before restarting Leo 6.3 b1 :-(

Shall I create an issue in GitHub?

In any case: Thanks a lot for your help & quick response!

With kind regards,

Viktor

Thomas Passin

unread,
Oct 27, 2020, 4:08:07 PM10/27/20
to leo-editor
Hi, Viktor,

I don't think you need to open an issue on Github since I plan to keep working on the problem after Leo 6.3 Final is released.  In the meantime, once you get a layout that you like, I suggest saving it using the splitter bar context menu.  After a restart you can load that named layout using the context menu, and things should go back the way you want.

You could make it even easier by creating a button to run the vr3-use-default-layout command.  The button body would be -

c.k.simulateCommand('vr3-use-default-layout')

I have done this myself, but don't need to use it very often.




This has been one of those pesky problems that are hard to pin down.  I have put in quite a few hours with the VR3 code and the Leo code, and still it's not fully cleared up.  Now that I know it's still a problem for you, I'll get back to work on it.

Thomas Passin

unread,
Oct 27, 2020, 9:57:10 PM10/27/20
to leo-editor
I have been able to coerce VR3 into configurations like you described.  To do it, I had to use the splitter bar context menu item toggle split direction/just this. Once in one of these other configurations, VR3 would toggle on and off in a consistent location, but when it was off the pane arrangement might jump into the previous configuration - this might not be what anyone wants.  I'm not sure if VR3 can do anything about this since it is basically a layout matter, and I'm not even sure it's actually wrong.

At any rate, I have handled it by getting Leo - with VR3 off - into my preferred layout with the body pane right and the outline and Tabs panes sharing the left column.  Then I saved this layout as body-pane-right using the splitter context menu.  No matter what unusual situation I get the layouts into, I have (so far) always been able to restore what I want by loading my named layout, and then if necessary running the vr3-use-default-layout command.

You could also save another layout named, say, vr3-right after you get the layout with VR3 that you like, and restoring that should always work.

Viktor Ransmayr

unread,
Oct 28, 2020, 3:52:08 PM10/28/20
to leo-editor
Hello Thomas,

tbp1...@gmail.com schrieb am Mittwoch, 28. Oktober 2020 um 02:57:10 UTC+1:
I have been able to coerce VR3 into configurations like you described.  To do it, I had to use the splitter bar context menu item toggle split direction/just this. Once in one of these other configurations, VR3 would toggle on and off in a consistent location, but when it was off the pane arrangement might jump into the previous configuration - this might not be what anyone wants.  I'm not sure if VR3 can do anything about this since it is basically a layout matter, and I'm not even sure it's actually wrong.

At any rate, I have handled it by getting Leo - with VR3 off - into my preferred layout with the body pane right and the outline and Tabs panes sharing the left column.  Then I saved this layout as body-pane-right using the splitter context menu.  No matter what unusual situation I get the layouts into, I have (so far) always been able to restore what I want by loading my named layout, and then if necessary running the vr3-use-default-layout command.

You could also save another layout named, say, vr3-right after you get the layout with VR3 that you like, and restoring that should always work.

On Tuesday, October 27, 2020 at 4:08:07 PM UTC-4, Thomas Passin wrote:
Hi, Viktor,

I don't think you need to open an issue on Github since I plan to keep working on the problem after Leo 6.3 Final is released.  In the meantime, once you get a layout that you like, I suggest saving it using the splitter bar context menu.  After a restart you can load that named layout using the context menu, and things should go back the way you want.

You could make it even easier by creating a button to run the vr3-use-default-layout command.  The button body would be -

c.k.simulateCommand('vr3-use-default-layout')

I have done this myself, but don't need to use it very often.

This has been one of those pesky problems that are hard to pin down.  I have put in quite a few hours with the VR3 code and the Leo code, and still it's not fully cleared up.  Now that I know it's still a problem for you, I'll get back to work on it.

Thanks a lot for your two messages. - Applying the command - or - the suggested  button is a good workaround.

But IMO other Leo users will experience similar issues, when the have to switch from the '--use-docks' behavior of 6.2 to the 'NO docks' behavior re-introduced with 6.3 ...

If I find some time, I'll try to find out how the behavior for VR/ VR3 is for a new installation of Leo for a new user in Fedora 32 ...

Thomas Passin

unread,
Oct 28, 2020, 5:04:52 PM10/28/20
to leo-e...@googlegroups.com


On Wednesday, October 28, 2020 at 3:52:08 PM UTC-4, Viktor Ransmayr wrote:
Thanks a lot for your two messages. - Applying the command - or - the suggested  button is a good workaround.

But IMO other Leo users will experience similar issues, when the have to switch from the '--use-docks' behavior of 6.2 to the 'NO docks' behavior re-introduced with 6.3 ...

There is no code anymore in VR3 (or Leo) that knows about docks anymore. In 6.2, Leo (and so VR3) could  be run either with or without docks.  I would not have expected splitter layouts (what we have without docks) to have been influenced by dock settings - the two were completely orthogonal as far as I know (which may not be too far).

And yes, do please see what happens with a fresh install of 6.3.

Viktor Ransmayr

unread,
Oct 29, 2020, 5:36:30 AM10/29/20
to leo-editor
Hello Thomas,

Here are the notes from my experiment this morning:

Checkout behavior for a user, having installed Leo-stable from GitHub.

* Rename ~/.leo to ~/.ole
* Restart Leo - and - re-open this outline using 'File > Open-Outline'

### after restart ...

* Leo showed a tip - but - did not ask me for a Leo-ID ...
* Try 'Help > Open Help topics > Help' ...

    * VR pane is opened to the right (as expected)

* Open 'myLeoSettings'. Outline is created & opened after confirmation ...
* Comment out 'viewrendered' and insert 'viewrendered3'

### after restart ...

* Leo showed another tip ...
* Try 'Help > Open Help topics > Help' ...

    * VR3 pane is in light mode - and - is opened to the left :-(


Viktor Ransmayr

unread,
Nov 1, 2020, 8:52:20 AM11/1/20
to leo-e...@googlegroups.com
Hello Edward, hello Thomas

What's the expected procedure for handling such a bug / issue during sabbatical times?

With kind regards,

Viktor

Thomas Passin

unread,
Nov 1, 2020, 9:41:00 AM11/1/20
to leo-editor
Well, I'm still working on the VR3 problem.  The main questions, I think, are who would approve a PR, and who is going to keep the devel branch on GutHub up to date.  Edward has written that he will still have some involvement - he won't be completely absent.

Edward K. Ream

unread,
Nov 2, 2020, 5:17:20 AM11/2/20
to leo-editor
On Sun, Nov 1, 2020 at 7:52 AM Viktor Ransmayr <viktor....@gmail.com> wrote:

> Here are the notes from my experiment this morning:

Checkout behavior for a user, having installed Leo-stable from GitHub.

* Rename ~/.leo to ~/.ole
* Restart Leo - and - re-open this outline using 'File > Open-Outline'

### after restart ...

* Leo showed a tip - but - did not ask me for a Leo-ID ...
* Try 'Help > Open Help topics > Help' ...

    * VR pane is opened to the right (as expected)

* Open 'myLeoSettings'. Outline is created & opened after confirmation ...
* Comment out 'viewrendered' and insert 'viewrendered3'

### after restart ...

* Leo showed another tip ...
* Try 'Help > Open Help topics > Help' ...

    * VR3 pane is in light mode - and - is opened to the left :-(

What's the expected procedure for handling such a bug / issue during sabbatical times?

Report them, as always.

I don't see anything new or troubling in the behavior you report.

Edward

Edward K. Ream

unread,
Nov 2, 2020, 5:17:53 AM11/2/20
to leo-editor
On Sun, Nov 1, 2020 at 8:41 AM Thomas Passin <tbp1...@gmail.com> wrote:
Well, I'm still working on the VR3 problem.  The main questions, I think, are who would approve a PR, and who is going to keep the devel branch on GutHub up to date.  Edward has written that he will still have some involvement - he won't be completely absent.

Right. I'm happy to look at PR's.

Edward

Viktor Ransmayr

unread,
Nov 2, 2020, 3:06:19 PM11/2/20
to leo-e...@googlegroups.com
I'm not sure, if I'm the only one finding the behavior troubling - or - if simply my notes were not clear enough describing the issue?

Reason for my experiments: I thought one of the intentions of Leo 6.3 is to make the look & feel better for new Leo users.

I write left to right & top to bottom - so - my expectation is that both renderers (VR & VR3) behave identical related to the placement of their renderer pane! - But they do NOT :-(

Similarly, how do you feel, if the system comes with 'dark mode' enabled by default - and - one renderer (VR) follows, while the other one (VR3) ignores it?

I did reach out to both of you, since I don't know if the problems are only on the side of the VR3 plugin - or - if it's related to a combination of changes made to Leo Core & VR3 b/w 6.2 & 6.3.

Thomas Passin

unread,
Nov 2, 2020, 3:54:53 PM11/2/20
to leo-editor
I'm not sure that VR and VR3 have different  behavior.  There seems to be an element of caprice in VR3's placement - still trying to track that down - and I have seen VR also open in unplanned positions on my system.  The layout code is practically identical between the two plugins, so I would expect them to have similar issues.

As for picking up a dark theme, I could look to see how VR accomplishes that.  The thing is that the VR/VR3 pane is essentially a web browser, and so would need to load different style sheets to different themes, but how would it know that some other style sheet were needed?   You can already supply a different style sheet for VR3 (at least for ReStructured text, I don't recall about MD and asciidoc), but it's asking too much for most people to develop one, I think.

Edward K. Ream

unread,
Nov 2, 2020, 4:25:22 PM11/2/20
to leo-editor
On Mon, Nov 2, 2020 at 2:06 PM Viktor Ransmayr <viktor....@gmail.com> wrote:

I thought one of the intentions of Leo 6.3 is to make the look & feel better for new Leo users.

True. However, vr3 is not enabled for new users.

Edward

Viktor Ransmayr

unread,
Nov 3, 2020, 1:31:05 AM11/3/20
to leo-e...@googlegroups.com
Hello Edward,

Fair. - I guess I got it wrong on my side, since VR3 was mentioned together with VR in your version 6.3 b1 announcement. - See
With kind regards,

Viktor

Viktor Ransmayr

unread,
Nov 3, 2020, 1:53:35 AM11/3/20
to leo-e...@googlegroups.com
Hello Thomas.

Am Mo., 2. Nov. 2020 um 21:54 Uhr schrieb Thomas Passin <tbp1...@gmail.com>:
I'm not sure that VR and VR3 have different  behavior.  There seems to be an element of caprice in VR3's placement - still trying to track that down - and I have seen VR also open in unplanned positions on my system.  The layout code is practically identical between the two plugins, so I would expect them to have similar issues.

Looking forward to your findings. - Let me know if I can help. - From a platform POV its Fedora & Debian Linux, but if needed I can start a Windows VM ...
 
As for picking up a dark theme, I could look to see how VR accomplishes that.  The thing is that the VR/VR3 pane is essentially a web browser, and so would need to load different style sheets to different themes, but how would it know that some other style sheet were needed?   You can already supply a different style sheet for VR3 (at least for ReStructured text, I don't recall about MD and asciidoc), but it's asking too much for most people to develop one, I think.

 Yes, for a new user I also believe this is too much to ask.

With kind regards,

Viktor

Thomas Passin

unread,
Nov 3, 2020, 9:29:47 AM11/3/20
to leo-editor

On Tuesday, November 3, 2020 at 1:53:35 AM UTC-5, Viktor Ransmayr wrote:

Looking forward to your findings. - Let me know if I can help. - From a platform POV its Fedora & Debian Linux, but if needed I can start a Windows VM ...

And I have Mint and Ubuntu as VMs also.  I develop on Windows 10.

Thomas Passin

unread,
Nov 4, 2020, 10:56:30 AM11/4/20
to leo-e...@googlegroups.com
Victor,

I deleted the .leo/db/g_app_db directory and the VR/VR3 layout problems have gone away (at least on Windows, and at least for the time being).  Well, it may open in the wrong place once, but after using the vr3-use-default-layout command, it seems to be stable in its layout after that.

I *think* the code is the same as in the 6.3 branch, but I had better check and make sure I didn't change anything.  If I did, I'll post about it here later.  Would you be so good as to try it yourself and let me know what happens?  I recall that you had said earlier that deleting the db database didn't help, but I think that was on a pre-6.3.1 version.

Viktor Ransmayr

unread,
Nov 4, 2020, 11:46:49 AM11/4/20
to leo-editor
Hello Thomas,

tbp1...@gmail.com schrieb am Mittwoch, 4. November 2020 um 16:56:30 UTC+1:

I deleted the .leo/db/g_app_db directory and the VR/VR3 layout problems have gone away (at least on Windows, and at least for the time being).  Well, it may open in the wrong place once, but after using the vr3-use-default-layout command, it seems to be stable in its layout after that.

I *think* the code is the same as in the 6.3 branch, but I had better check and make sure I didn't change anything.  If I did, I'll post about it here later.  Would you be so good as to try it yourself and let me know what happens?  I recall that you had said earlier that deleting the db database didn't help, but I think that was on a pre-6.3.1 version.

I have done my test with the following version of Leo:
  • Leo 6.3-b1, master branch, build d1bd39e14d
Do you want me to perform the re-test on the development branch?

Thomas Passin

unread,
Nov 4, 2020, 1:16:18 PM11/4/20
to leo-editor
I have just checked the 6.3 branch, and get the same results.  After deleting the .leo/db/g_app_db, VR3 first opened on the left.  After applying vr3-use-std-layout, VR3 opened correctly on the right for every outline I opened, and did so again after closing and restarting Leo.  VR opened on the right as well.

It's still not ideal but better than before.

Viktor Ransmayr

unread,
Nov 4, 2020, 5:30:07 PM11/4/20
to leo-editor
tbp1...@gmail.com schrieb am Mittwoch, 4. November 2020 um 19:16:18 UTC+1:
I have just checked the 6.3 branch, and get the same results.  After deleting the .leo/db/g_app_db, VR3 first opened on the left.  After applying vr3-use-std-layout, VR3 opened correctly on the right for every outline I opened, and did so again after closing and restarting Leo.  VR opened on the right as well.

It's still not ideal but better than before.

I re-verified my original findings now also in the updated devel branch ( Leo 6.4-b1, devel branch, build f55d7eff4f ) :

* VR pane starts at the left side, can be moved to the right side w/ 'vr3-use-standard-layout' - but - does NOT survive a restart of Leo.

###

FTR: Here's the startup information from the log pane:

Leo Log Window
Leo 6.4-b1, devel branch, build f55d7eff4f
2020-10-31 00:49:02 -0500
Python 3.8.6, PyQt version 5.15.1
linux
setting leoID from os.getenv('USER'): 'user'
current dir: /home/user/PyVE/Repo/Leo-Repo
load dir: /home/user/PyVE/Repo/Leo-Repo/leo-editor/leo/core
global config dir: /home/user/PyVE/Repo/Leo-Repo/leo-editor/leo/config
home dir: /home/user
reading settings in /home/user/PyVE/Repo/Leo-Repo/leo-editor/leo/config/leoSettings.leo
reading settings in /home/user/.leo/myLeoSettings.leo
reading settings in /home/user/Documents/SL2020.leo
read outline in 0.21 seconds

wrote recent file: /home/user/.leo/.leoRecentFiles.txt
 saved: SL2020.leo

Linux details are: A Fedora 32 VM on top of Qubes OS R4.0

Viktor Ransmayr

unread,
Nov 4, 2020, 5:39:07 PM11/4/20
to leo-e...@googlegroups.com
Am Mi., 4. Nov. 2020 um 23:30 Uhr schrieb Viktor Ransmayr <viktor....@gmail.com>:
tbp1...@gmail.com schrieb am Mittwoch, 4. November 2020 um 19:16:18 UTC+1:
I have just checked the 6.3 branch, and get the same results.  After deleting the .leo/db/g_app_db, VR3 first opened on the left.  After applying vr3-use-std-layout, VR3 opened correctly on the right for every outline I opened, and did so again after closing and restarting Leo.  VR opened on the right as well.

It's still not ideal but better than before.

I re-verified my original findings now also in the updated devel branch ( Leo 6.4-b1, devel branch, build f55d7eff4f ) :

* VR pane starts at the left side, can be moved to the right side w/ 'vr3-use-standard-layout' - but - does NOT survive a restart of Leo.

Clarification:  VR3 pane starts at the left side, can be moved to the right side w/ 'vr3-use-standard-layout' - but - does NOT survive a restart of Leo.

Thomas Passin

unread,
Nov 4, 2020, 5:40:00 PM11/4/20
to leo-editor
Odd, since for me the position is stable on the right after the default layout command.

Does "PyVE" in the paths indicate you are using a virtual environment?  Not that I can see why that would make a difference.  Let me just confirm that you deleted the db apps directory.

Viktor Ransmayr

unread,
Nov 4, 2020, 5:44:17 PM11/4/20
to leo-e...@googlegroups.com
Am Mi., 4. Nov. 2020 um 23:40 Uhr schrieb Thomas Passin <tbp1...@gmail.com>:
Odd, since for me the position is stable on the right after the default layout command.

Does "PyVE" in the paths indicate you are using a virtual environment? 

Yes.

Not that I can see why that would make a difference.  Let me just confirm that you deleted the db apps directory.

No, not in this case. - Is it required after executing the 'vr3-use-standard-layout' command?

Thomas Passin

unread,
Nov 4, 2020, 7:55:14 PM11/4/20
to leo-editor
No - I closed Leo, deleted the folder, and started it again.

At the moment, I have leo 6.2.1/Python3.8 and leo 6.3b1/Python 3.9 on a linux ubuntu VM (not in a virtual environment).  On 6.2.1, the layout works as I described.  On 6.3b1, it worked as you described - that is, on restart VR3 opens on the left.  I deleted the db apps directory, and now it is opening on the right after restart (although I still had to invoke the default layout command the first time).  I have put the vr3-use-default-layout command in a button to make this easier.
Reply all
Reply to author
Forward
0 new messages