I made some changes to the feature/uibase-classname branch and pushed them.
The only code change in UIBase is to go back to setting element.className instead of calling addStyles to split the list again. Mainly I added documentation to UIBase and the classList helper functions to explain how they interact. Then I added code to Jewel Button to handle its properties that toggle styles in the classList. A key point is understanding the lifecycle. Hopefully, in just about every instance, the element.className will be set once in addedtoParent and then properties can toggle styles on the classList and it will just work. We could say that you can't set className after addedToParent. That would simplify the code in Jewel Button that saves the propertyNames to be added to computeFinalClassNames. Basically, though, I think this implementation matches the scenarios. Thoughts? -Alex On 4/11/18, 2:37 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" <carlos.rov...@gmail.com on behalf of carlosrov...@apache.org> wrote: >Hi Alex, > >to resume, > >1) I agree with most of your mail. My main need is to use an API that let >me add/remove/toggle styles easily (mine and whoever wants to deal with >styling). >So if you think my changes to UIBase are not ok and you want to ensure >things are more as you have in mind, that's ok with me. But to avoid more >investing time in discussion I prefer wait for you to make the changes in >the UIBase classname branch. I assume that the way I use it though new >methods like "addStyles" will not change, and so I can continue my work >with the rest of components. So in this point I'll wait for you changes if >is ok for you. >