jupyter / declarativewidgets

[RETIRED] Jupyter Declarative Widget Extension
http://jupyter.org/declarativewidgets/docs.html
Other
120 stars 38 forks source link

Improve urth-core-behaviors/error-display-behavior #555

Open haobibo opened 7 years ago

haobibo commented 7 years ago

Before: error message append into After: error message append after .

This is particularly useful when users write <urth-core-function><buton>invoke</button></urth-core-function>. Before this improvements, when users click on the error message, the function will be invoked again (click event broadcast to error message). After this improvement, this issue is fixed.

lbustelo commented 7 years ago

I think this is fine... there are other elements that end up mixing in this behavior... @haobibo did you do a sniff test around all the other elements to make sure there is no obvious issues with writing outside the element's context?

haobibo commented 7 years ago

@lbustelo It seems a lot work to do if we test error display behavior because many elements use this behavior. Can we just do this improvement to urth-core-funciton? This commit ( 0d453b4 ) will only change the behavior for urth-core-function.

lbustelo commented 7 years ago

@haobibo I don't think it is ok for a behavior to have explicit knowledge of elements that may mix-in the code. error-display-behavior should know know anything about the existence of urth-core-function.

haobibo commented 7 years ago

@lbustelo the latest commit allow urth-core-function to listen click events only for its children elements instead of itself. However, the build tests failed with bower ECONFLICT Unable to find suitable version for test-fixture .

lbustelo commented 7 years ago

Sounds to me like dependency hell... Some dependency somewhere needs to be temporarily pegged or the tests need to be updated to support new versions.