-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalized master-stack layout engine #634
Comments
A few suggestions for commands to be exposed with this plugin. PreliminariesWindows orderSome of the commands below require a order of windows. I suggest ordering windows column-wise. This seems a reasonable extension of what most people would expect on a traditional
Master columnWhile the core of this layout engine does not require defining a On the one hand, this is what people expect from a master-stack layout. On the other hand, this simplifies the logic of exposing certain functionalities.1. To keep things simple, I suggest using a Stack column and normal columnsJust to fix some terminology, let me use Layout specificationTo sum up, a complete layout specification would consist of
One could represent this using a single string list, which indicates the column type in position 1 (M, S or N), and adds the max-rows after a dash for all non-stack columns. E.g.2
Optional config options that would be nice to be able to configure as the initial (minimum) width of each column.3 Ideally, one could use the layout engine to create multiple master-stack instances with different specifications. Commands
Open question
|
I have some thoughts. Proposed MVP:
^^ That's it. Once that works, we can expand more easily, IMO. Quick terminology/concepts that I think can simplify this:
I believe the implementation gets vastly simplified if its thought about in these terms. This allows us to make no assumptions of people's screen resolutions, screen orientation, use cases, or layout preferences. This also generalizes well to other automatic tiling layouts such as Fibonacci, Dwindle, etc, by nesting Areas programmatically. We can provide sane defaults that most people would expect, such as a DWM-style 2-column. As far as operations with this model, things like rotating and transposing become independent of being a row or a column. Areas could also be laid out independently, such as having the Primary as the middle column of a 3-column (that is, three-Area) arrangement. The key is to use an ordered, linear collection (List or equivalent) and map an Area to a range on that list. As windows enter and exit the workspace, they would be either appended or prepended to the list (configurable) and then the MVP code described in the beginning of my rant would take over. Another thing to consider is the social responsibility of the chosen terminology. GitHub now uses "main" as the default branch name, for example. |
Ok. I was looking through this today to get a handle on it. This is my basic understanding of a layout engine which would handle most cases: Probable MVP
SliceArea(
direction: row,
SliceArea(leaderPriority: 0, max: 1),
SliceArea(leaderPriority: 1, max: 3, direction: column),
BaseArea(
stackPriority: 0,
SliceArea(2),
SliceArea(leaderPriority: 2, direction: column),
LeafArea(Infinite)
)
) Follow-on tickets
|
Progress
Follow-up issues |
This PR adds the ability for layout engines to perform non-standard actions, and still have their resulting layouts be saved to `Workspace` instances. This was needed for #634, where the `SliceLayoutPlugin` tries to perform operations on the `SliceLayoutEngine`, but was unable to save the resulting `ILayoutEngine` instance to the `Workspace`. The `PerformCustomAction` method can be used by `ILayoutEngine` implementations to perform non-standard actions.
Create a generalized master-stack layout engine, defined in terms of
N
columns, where all but one column has a maximum number of rows.For example:
2 * 1 * X
would be a 3-column layout, where:1 * X
for a classic master stack layout.2 * X
for a master stack with two master windows.The text was updated successfully, but these errors were encountered: