Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Convert request-series viewlet into a Y.View #146

Merged
merged 3 commits into from Feb 26, 2014

Conversation

hatched
Copy link
Contributor

@hatched hatched commented Feb 25, 2014

To QA
Drag a local charm to the canvas, you should be able to deploy it, and cancel the deploy as before.

name: file.name,
size: file.size,
defaultSeries: env.get('defaultSeries')
requestSeries: new Y.juju.viewlets.RequestSeries({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this is only a single view we don't need to have a shared model

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but what about destroying it later?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the viewlet manager is destroyed it cleans up all of it's views and viewlet events https://github.com/juju/juju-gui/blob/develop/app/views/viewlet-manager.js#L691

@jujugui
Copy link
Contributor

jujugui commented Feb 26, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/472/

size: file.size,
defaultSeries: this.get('env').get('defaultSeries')
}));
// So that we can call render multiple times.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment is that we don't call render multiple times but do you mean _bindUI? How would render get called multiple times? Can the events in bindUI just be normal YUI view events {} object?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To the first part: just a precaution so that we don't get double events and have to track down some obscure bug.
To the second: See the function details below....which you already did :)

@mitechie
Copy link
Contributor

👍 just would like to see where the View gets cleaned up. I'd also love to see the View destructor make sure that the viewlet manager is also destroyed as a matter of course so that if the button isn't directly clicked we can still be sure clean up is done.

@hatched
Copy link
Contributor Author

hatched commented Feb 26, 2014

  • I addressed the concern about the view's being cleaned up.
  • You would have to try REALLY hard to destroy the view instance without going through the viewlet manager destructor in this instance so that might be overkill. I'm going to land this as-is but we can chat in the am about the comments above.

Thanks a lot for the review!

:shipit:

@jujugui
Copy link
Contributor

jujugui commented Feb 26, 2014

Status: merge request accepted. Url: http://ci.jujugui.org:8080/job/juju-gui-merge

jujugui added a commit that referenced this pull request Feb 26, 2014
__To QA__
Drag a local charm to the canvas, you should be able to deploy it, and cancel the deploy as before.
@jujugui jujugui merged commit 7ca2a0b into juju:develop Feb 26, 2014
@hatched hatched deleted the request-series-to-view branch February 26, 2014 14:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants