Giter Site home page Giter Site logo

ember-split-view's People

Contributors

acorncom avatar aureliosaraiva avatar bryancrotaz avatar bryanhunt avatar bryanhuntnv avatar gnapse avatar jrhe avatar juanpin avatar srvance avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ember-split-view's Issues

Add unit tests

This addon is very lacking in the unit test department.

Unit tests are failing

The split-view component test fails at:

_setStyle: function() {
  var style = this.get('element').style;

this.get('element') is returning null. This comes from:

Ember.run.next(this, function() {
  this._setStyle();
});

I don't understand yet why the element is null. _setStyle() is called prior to this and the element is not null. I see the same call stacks in the dummy app, but element is never null.

prefer binding to style attribute over setting width/height from observers

observers are low level concepts, writing straight to the DOM at this point and time can result in many wasteful draws/writes and also make your view prone to race conditions.

Utilizing a bindableAttribute to bind style attribute directly with the needed dimensions will result in a much better experience as it lets embers binding system and rendering system do the work only once and at a much more optimal time.

Borders do not render correctly on Chrome

When you drag the sash, the border on the left (vertical sash) or top (horizontal sash) will not render correctly. You end up with artifacts of the border that are not erased. This problem does not occur with Safari or Firefox.

embersplitviewdemo

Nested split view doesn't handle window resize correctly

I've got this setup:

  {{#split-view isVertical=true splitPosition=initialVerticalSplit}}
    {{#split-child}}
      {{#split-view isVertical=false splitPosition=initialHorizontalSplit }}
        {{#split-child}}
          <div></div>
        {{/split-child}}
        {{split-sash}}
        {{#split-child}}
          <div></div>
        {{/split-child}}
      {{/split-view}}
    {{/split-child}}
    {{split-sash}}
    {{#split-child}}
      <div></div>
    {{/split-child}}
  {{/split-view}}

So, basically two columns, with the first having two rows. When I resize the window horizontally (or diagonally), all panes get resized correctly. However, when I resize vertically, the bottom of the top row on the left column moves too far up, becoming separated from the sash and bottom row which stay fixed to the bottom of the window.

When I then resize the window horizontally, the bottom of the top row on the left column snaps back into position at the top of the sash.

Has anyone had this issue? I tried making a JSBin but am not sure how to add ember-split-view as a component.

Ember 1.7.0-beta2 breaks ember-split-view

Tried using ember-split-view with Ember 1.7.0-beta5 last night but kept getting errors. The error was in the SplitViewChild#updateMovableSide because movableSide was null. I tracked this back to changes between beta 1 and 2.

Pre beta 2, SplitViewComponent#updateOrientation sets movableSide. After beta 2 this doesn't get called as SplitSashComponent#didInsertElement changes its parentView.sash attribute which triggers SplitView#constrainSplit. SplitView#constrainSplit subsequently changes splitPercentage which is aliased to SplitChildComponent#splitPercentage and triggers SplitViewChild#updateMovableSide without calling updateOrientation to set movableSide.

After discussion with rwjblue on IRC it seems this change in behaviour is because ember now lazily evaluates aliases.

Heres a rough trace for both versions using console.log statements.

Pre beta 2:
SplitViewComponent#didInsertElement
SplitChildComponent#didInsertElement
SplitViewComponent#addChildView
SplitSashComponent#didInsertElement
SplitViewComponent#constrainSplit
SplitSashComponent#updateWidth
SplitChildComponent#didInsertElement
SplitViewComponent#addChildView
SplitViewComponent#updateOrientation - this sets movableSide
SplitViewChild#updateMovableSide
SplitViewChild#updateMovableSide

Beta 2 and after:
SplitViewComponent#didInsertElement
SplitChildComponent#didInsertElement
SplitViewComponent#addChildView
SplitSashComponent#didInsertElement
SplitView#constrainSplit
SplitViewChild#updateMovableSide

Haven't really had chance to look at how this can be fixed yet.

Appears to be broken on Ember 3.x

loader.js:247 Uncaught Error: Could not find module `ember` imported from `ember-resize/services/resize`
    at missingModule (loader.js:247)
    at findModule (loader.js:258)
    at Module.findDeps (loader.js:168)
    at findModule (loader.js:262)
    at Module.findDeps (loader.js:168)
    at findModule (loader.js:262)
    at requireModule (loader.js:24)
    at resolveInitializer (index.js:34)
    at registerInitializers (index.js:47)
    at exports.default (index.js:28)
...
Uncaught TypeError: Cannot read property 'listeners' of undefined
    at window.onerror 
...

Sash not displayed with Ember 2.14.0

I've upgraded Ember in the ember-2.14 branch. The sash is not displayed between the child views. I'm guessing it is a problem with the flex layout in the dummy test app. If anyone has time to look at this, help would be appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.