Replace application view with a Vue object#405
Conversation
Codecov Report
@@ Coverage Diff @@
## switch_to_vue #405 +/- ##
==============================================
Coverage 95.15% 95.15%
==============================================
Files 94 94
Lines 4047 4047
Branches 254 254
==============================================
Hits 3851 3851
Misses 143 143
Partials 53 53Continue to review full report at Codecov.
|
| }); | ||
|
|
||
| require([ | ||
| "home/init", |
There was a problem hiding this comment.
Remove handlebars from bower
| application_view) { | ||
| "use strict"; | ||
|
|
||
| var ga = gamodule.init(); |
There was a problem hiding this comment.
you can extract a separate view specifically for ga events, and respond to model changes by sending ga events.
| dialogs.webapi_error_dialog(error); | ||
| }); | ||
| }; | ||
| var app_list_view = new application_list_view.ApplicationListView(); |
There was a problem hiding this comment.
try to see why it's not working.
| var app_view = new application_view.ApplicationView(); | ||
|
|
||
| $.when(model.update()).done(function () { | ||
| app_list_view.loading = false; |
There was a problem hiding this comment.
move the loading to the model. loading is part of the state of the model.
| app_list_view.model = model; | ||
|
|
||
| app_view.render(false, 200); | ||
| app_list_view.model = model; |
There was a problem hiding this comment.
move this outside and remove the done() reaction. Just call model.update()
| return image.ui_name? image.ui_name: image.name; | ||
| } | ||
| } | ||
| filters: utils.filters |
There was a problem hiding this comment.
you can register filters globally.
| @@ -1,170 +1,91 @@ | |||
| define([ | |||
| "jquery", | |||
| 'jquery', | |||
|
|
||
| data: function() { | ||
| return { | ||
| model: { app_list: [], selected_index: null } |
There was a problem hiding this comment.
probably, like the other one, is irrelevant, because you pass the model from outside.
| return output; | ||
| }, | ||
| iframe_size: function() { | ||
| return utils.max_iframe_size(); |
There was a problem hiding this comment.
this is not a dependent property so it gets cached forever.
You need a method.
| eventLabel: current_app.app_data.image.name | ||
| }); | ||
|
|
||
| this.model.update_idx(selected_index) |
There was a problem hiding this comment.
Not now, but the model should really do this operation.
Configurables is still using it
No description provided.