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

SplitPane #110

Closed
bitpshr opened this issue Apr 13, 2017 · 2 comments
Closed

SplitPane #110

bitpshr opened this issue Apr 13, 2017 · 2 comments
Assignees
Milestone

Comments

@bitpshr
Copy link
Member

bitpshr commented Apr 13, 2017

Specification

This widget provides split pane behavior. Each SplitPane has two children and can be nested inside another SplitPane.

Split pane example

Features

  • vertical or horizontal orientation
  • ability to specify a minimum panel size
  • ability to specify a maximum panel size
  • ability to specify an initial panel size
  • ability to nest split panes

Value-add
Ability to divide content into resizable horizontal or vertical containers

Callbacks
onResizeStart
onResizeEnd
onResize

Mouse/keyboard interactions
Ability to click and drag divider line

Mandatory/valid/empty/wait states
None

Controlled/uncontrolled
Uncontrolled

List of any icons needed
None

Design input required (inc responsive design)
Look and feel of the center splitter

Any other considerations:

Acceptance criteria

  • I can orient a SplitPane vertically or horizontally
  • I can test SplitPanes inside other SplitPanes
  • I can click the divider bar and resize the primary panel
@rishson
Copy link
Contributor

rishson commented Apr 13, 2017

re: callbacks, if this widget is uncontrolled then what would the enclosing widget need apart from onResizeComplete?

e.g.

const MIN_SIZE = 200;
const INITIAL_SIZE = 300; 
w(SplitPane, {
  min: MIN_SIZE,
  size: INITIAL_SIZE,
  onResizeComplete: onResize,
  orientation: Orientation.VERTICAL,
  leading: someWidget,
  trailing: someOtherWidget
}, []);

function onResize(size) {
  INITIAL_SIZE = undefined;
}

@rishson
Copy link
Contributor

rishson commented Apr 13, 2017

re: above, that is not intended to be the API, its just cutpasted from when I was playing with SplitPane when learning widget-core 😄

@dylans dylans added this to the 2017.04 milestone Apr 13, 2017
@bitpshr bitpshr mentioned this issue Apr 21, 2017
3 tasks
@dylans dylans modified the milestones: 2017.04, 2017.05 Apr 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants