Have the token respect flags on the service. #642
Conversation
QAWith the
|
// would be to just use the service flags directly, but that's a | ||
// far-reaching change that we want to tackle at a later point. | ||
attrs.highlight = attrs.service.highlight; | ||
attrs.visible = !attrs.service.fade; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would prefer an update to the template to look in the proper place instead of making new properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the template use these properties won't work unless/until the token is updating the attributes directly. After a button click, the token is re-rendered, so the service attributes need to be set properly before that re-rendering happens. Unfortunately service attributes are updated asynchronously, in response to an event firing, which means they may not get set until after the re-render. And THAT means that we need to use local attributes for renders that follow a button click (i.e., don't override local attributes with service attributes).
Test FAILed. |
9f12ba7
to
1c49b6e
Compare
@@ -99,12 +99,24 @@ YUI.add('juju-added-service-token', function(Y) { | |||
|
|||
@method render | |||
*/ | |||
render: function() { | |||
render: function(override) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
override
attribute is missing a doc block.
I would prefer something like useServiceVisibility
as override is very generic.
Test PASSed. |
177b72e
to
3e5a329
Compare
👍 QA OK Thanks for this fix QA Notes: |
👍 QA okay, thanks! |
3e5a329
to
4c8d9de
Compare
Thanks all! |
Build failed: Attempt to land pull request failed |
Spurious failure. |
Status: merge request accepted. Url: http://ci.jujugui.org:8080/job/juju-gui-merge |
Test PASSed. |
Have the token respect flags on the service. When a token renders, it should set the toggle state of its buttons based on how flags are set in the service it wraps.
Test FAILed. |
Test PASSed. |
Test PASSed. |
When a token renders, it should set the toggle state of its buttons based on how flags are set in the service it wraps.