saltstack/salt-ui — pull request #32 by PierreR (2013-01-29 11:33:41+00:00)
Title: Update tree + cosmetic

Hi,

Could you review these two commits ?

In the first one, I propose to update the tree instead of regenerate a new one whenever we submit a command.

The second one is cosmetic.

I would like to issue a third pull request. I am not convinced that managing a "progress" state on the node is the way to go. I would simply remove the spinning attribute when it is necessary in the line of my first commit.

I believe we have two different usages here that might be nicely refactor in a x-tag mixin. The first one is to show/hide the "icon-spinner" and the other one is to spin on/off the "icon-spinner".

As a note, I am not totally convinced by x-tags. I have found the doc quite awful and [the component code](https://github.com/mozilla/x-tag-elements/tree/xtag-v0.0.22) not so pretty.

It would be nice as well to establish some convention because the "this/that" ugly trick is confusing enough ;-) So in this pull request I took the liberty to favor "inline then" with "this/that" instead of defining another method (the main motivation is not to expose these callbacks too much).

Let me know what you think. I am not totally clear on what's best at the moment ...

You might be right thinking that wiping out the children nodes is actually more flexible.

I look forward for your feedback. Thanks.