I think a having a docking interface and the NestedSplitter (Easter-egg
splitter right click) interface is kind of redundant, they both do similar
things with similar goals and having them co-exist long term probably
doesn't make sense.

Vocab: Leo's log-pane is so called for historical reasons, it's a tab-pane
containing log, spell, find, and other widgets, so I'll call it the
tab-pane.

The NestedSplitter interface lets you freely arrange all widgets (body,
tree, log, spell, find, todo, quick-nav, graph, tags, anything else put in
the tab-pane).

Until the dock interface lets you do that, you'd lose functionality
removing NestedSplitter.  Allowing free arrangement of all widgets with
docks is what I attempted to do, dock interface wise, but gave up.

Basically I think the dock ui needs to let you arrange all widgets, not
just the big three (tree / body / tab-pane).  Currently I think what it's
added over the NestedSplitter interface is more intuitive arrangement
(mouse dragging! ;-) and different aesthetics. On aesthetics, if it doesn't
already have one, the dock ui probably needs a toggle for display of the
dock titles, seeing long term labeling the tree the tree etc. is a waste of
screen space.

You said

> - A central widget allows the user to drag dock widgets to any area at
any time.  Without a central widget you can only drag a widget to an area
that already contains a dock.  Once an area becomes empty it can't be used!

but I never found using only one area to be a constraint - all possible
arrangements were still possible.  My approach explicitly used only one
area, and you can't pull the last dock out of a nest of docks, so there was
never an empty window issue.

Hopefully this new approach (using docking for just the big-three widgets
initially) will allow an incremental implementation of a full dock UI,
maybe first adding support for todo / graph / tags / quick-nav / back-links
etc. etc., then finally breaking the log, spell and find widgets out of the
tab-pane, which was the can of worms I ran away from.

Cheers -Terry



On Fri, May 24, 2019 at 10:10 AM Edward K. Ream <edream...@gmail.com> wrote:

> Yesterday Leo's new docking interface saw first light.  It's in the "dock"
> branch. You can take a look by setting --dock in the command line. I am
> eating my own dog food without serious problems.  There are two bugs that
> must be fixed.
>
> This post discusses whether Leo's legacy gui (look and feel) has any
> long-term future. This is a thinking out loud post, and I definitely want
> your opinions.
>
> *Important*: I have no plans to do anything drastic any time soon.  I may
> replace --dock by --no-dock, to make docking the default, but Leo's legacy
> gui will continue work* exactly* as before for quite a while.  If I do
> retire Leo's legacy gui, it will likely be done in Leo 6.1, not 6.0, unless
> we all, unanimously, fall in love with docks.
>
> *Important*: it will be much easier to follow along if you actually play
> with the new gui before reading on.
>
> *The new gui*
>
> The Outline dock is the central widget
> <https://doc.qt.io/qt-5/qmainwindow.html#details>.  The outline dock
> can't be deleted, moved or floated, which is no real restriction at all.
> See below. The Log dock resides in the left dock area; the Body dock
> resides in the bottom dock area. This means that the Body dock gets the
> full width of the main window.
>
> *Important:* The user can change the default placement of the Log and
> Body docs (in relation to the Outline doc) by dragging the docks.  Leo will
> save and restore any changes, so the defaults above don't really matter.
> (Saving/restoring doesn't work perfect at present.  That's one of the bugs
> that must be fixed.)
>
> I am in the midst of re-doing the add-editor command.  It will likely use
> Qt's splitDockWidget
> <https://doc.qt.io/qt-5/qmainwindow.html#splitDockWidget>method to do the
> gui work.  This promises to be a big visual improvement over Leo's legacy
> add-editor command.
>
> *The central widget*
>
> Qt does not *require* a central that main windows have a central widget,
> despite what obsolete docs may say.  However, there are two big advantages
> to having a central widget:
>
> - It's not possible to have an empty Leo main window, as in the last
> screen shot in Chris George's recent post
> <https://groups.google.com/d/msg/leo-editor/JAquBmE9yRA/UC79b7HlAwAJ>.
>
> - A central widget allows the user to drag dock widgets to any area at any
> time.  Without a central widget you can only drag a widget to an area that
> already contains a dock.  Once an area becomes empty it can't be used!
>
> At present I am leaning towards making central widget be a dock widget
> that can't be moved, floated or deleted.  This makes the central widget
> look like a dock (with the Outline label).  I think this visual uniformity
> is good, but it does obscure the fact that the Outline is a central
> widget.  I'll be experimenting further with this.
>
> *Bugs*
>
> Two bugs must be fixed.  These are early days, so there are likely more:
>
> 1. Leo doesn't preserve the sizes of the main window properly. This is
> likely due to interactions with legacy code.
>
> 2. Alt-x doesn't set focus properly when the body pane is free-floating.
>
> *Retire Leo's legacy look?*
>
> This question appears to violate our rule that we never discuss
> preferences. But imo the question deserves thorough discussion. Imo, a
> dock-based gui is simply better:
>
> 1. Docks are (generally) more intuitive and flexible than Leo's legacy gui.
>
> However, this is debatable.  I await your opinions. There are some (very
> minor) drawbacks:
>
> - Without packing the Tabs dock into the Outline dock, there is (I think)
> no way of *exactly* matching Leo's previous layout (@bool
> big-outline-pane = False).
>
> - Without packing the Body dock into the Outline dock, there is (I think)
> no way of putting the body pane precisely below the Outline dock.
>
> Imo, neither of these is a big deal.  But we shall see.
>
> *Note: *Docks are required for #1093
> <https://github.com/leo-editor/leo-editor/issues/1093>, but I won't let
> the tail wag the dog by letting this have any influence in our discussions.
>
> *Commands*
>
> Several commands could be eliminated if we retire the old gui, including
> toggle-split-direction. Docks also suggest new commands. It would be
> convenient to delete the old commands and add the new commands into Leo's
> @menu setting, but we could easily live with both the old and new
> commands.  Non-functional commands would simply print a message and do
> nothing.
>
> *Summary*
>
> Retiring Leo's legacy look and feel would be a major milestone.  I won't
> do it if there are serious objections to it.
>
> Having said that, I do think that retiring legacy gui would be in the long
> term best interests of Leo's community:
>
> - *Unity*: It would avoid splitting users into separate camps.
>
> - *Simplicity*: it would simplify the code and would allow Leo to retire
> commands related to the old gui.
>
> If serious objections do arise, Leo will support the --no-docks option
> indefinitely.
>
> All comments, questions and concerns welcome.  Let me know if I have
> forgotten anything.
>
> Edward
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/8b025114-883b-404d-8b9d-c3040965df72%40googlegroups.com
> <https://groups.google.com/d/msgid/leo-editor/8b025114-883b-404d-8b9d-c3040965df72%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAFPg46ThQTWb%2BmSdurgJJzBsMZ8BZo3DOAXq0eqre%2B1cVMVRLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to