Skip to content
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

Build out Pane API #255

Open
andyrichardson opened this issue May 26, 2020 · 1 comment
Open

Build out Pane API #255

andyrichardson opened this issue May 26, 2020 · 1 comment
Labels
Maintenance Changes to the project which don't affect the end user

Comments

@andyrichardson
Copy link
Collaborator

About

The current API for pages and panes is pretty limited. The Pane component should be used without discrimination for:

  • Presenting content
  • Splitting child panes
  • Recursively managing panes in a tree-like manner

The I3 docs have a pretty nice summary of using a tree layout for reference.

Also see here for an example of nested panes in the repo.

Example

Open to suggestions if this doesn't work but off the top of my head, something like this should work:

<Pane split="horizontal">
  <Pane split="vertical">
    <Pane>A</Pane>
    <Pane>B</Pane>
  </Pane>
  <Pane>C</Pane>
</Pane>
Screenshot

Screenshot 2020-05-26 at 20 01 27

Context bar

We would also benefit from a context bar which can be used in any pane.

Top level

<Pane split="horizontal">
  <ContextBar>X</ContextBar>
  <Pane split="vertical">
    <Pane>A</Pane>
    <Pane>B</Pane>
  </Pane>
  <Pane>C</Pane>
</Pane>
Screenshot

Screenshot 2020-05-26 at 20 07 06

Nested

<Pane split="horizontal">
  <Pane split="vertical">
    <Pane>A</Pane>
    <Pane>
      <ContextBar>X</ContextBar>
      B
    </Pane>
  </Pane>
  <Pane>C</Pane>
</Pane>
Screenshot

Screenshot 2020-05-26 at 20 07 23

@andyrichardson andyrichardson added the Maintenance Changes to the project which don't affect the end user label May 26, 2020
@andyrichardson
Copy link
Collaborator Author

Update to this!

  • Tree view is incorrect - should not be limited to a tree structure (i.e 3 panes is allowed)
  • we might not need to nest panes - either works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Changes to the project which don't affect the end user
Projects
None yet
Development

No branches or pull requests

1 participant