-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added ability to toggle the visibility of happy-split-views #9
base: master
Are you sure you want to change the base?
Conversation
Just found a bug with it to do with glimmer re-applying properties on re-render causing the widths of the containers to get out of whack. Working on it now. EDIT: this might be a deeper problem since the component is modifying splitPercentage internally and it is also passed in externally. Since it breaks the actions-up data down mentality i can see why the property is being overwritten by glimmer. |
There are two way to solve this problem. I'd like your input on which way is best.
I'd prefer #1 because it doesn't quite seem to break ember's flow. It does introduce an unexpected gotcha though. |
I haven't had a chance to review this yet, but based on your description it seems like the ideal solution is to leave splitPercentage as a property that gets passed in externally, but then copy its value for use internally (say, internalSplitPercentage or _splitPecentage). That way consumers can set the value as they see fit and the component would never touch it. There's a larger unresolved issue of how components communicate with each other (especially in a parent/child relationship) that keeps getting pushed off by the ember team (and rightly so, given the impacts). See the second half of emberjs/ember.js#11170 (comment) for a deeper discussion of that issue. |
I've thought about the internal value holder for I know the 'ember-way' of doing things would involve an action fired up anytime the splitter is resized and then a new I have been following the |
# Conflicts: # addon/components/happy-split-view.js # package.json # tests/dummy/app/templates/index.hbs
As referenced by this feature. #8