Merge lp:~aacid/unity8/expandable_model_not_array into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michał Sawicz
Approved revision: 1185
Merged at revision: 1195
Proposed branch: lp:~aacid/unity8/expandable_model_not_array
Merge into: lp:unity8
Diff against target: 48 lines (+15/-9)
2 files modified
qml/Dash/Previews/PreviewExpandable.qml (+3/-3)
tests/qmltests/Dash/Previews/tst_PreviewExpandable.qml (+12/-6)
To merge this branch: bzr merge lp:~aacid/unity8/expandable_model_not_array
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Paweł Stołowski (community) Approve
Andrea Cimitan (community) Approve
Review via email: mp+231708@code.launchpad.net

Commit message

PreviewExpandable: "widgets" is a model, not an array

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Andrea Cimitan (cimi) wrote :

Specs don't state whether should be an array or a model [1], so this branch is doing the same as previews with 'widgets' being a model.

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Let's wait a silo for that (requires integration), but code is fine
 * Did CI run pass? If not, please explain why.
Waiting CI

[1] https://docs.google.com/a/canonical.com/document/d/1NmiM4UCnJgf6IEawmfyTOHRNAA5ZGrqpyrPqPOibwc8/edit

review: Approve
Revision history for this message
Paweł Stołowski (stolowski) wrote :

LGTM; tested with my WIP branches of scopes api and shell plugin before and after the change, and it now works.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Y
 * Did CI run pass? If not, please explain why.
N, temporary fail in ap and known broken qml test.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/Dash/Previews/PreviewExpandable.qml'
--- qml/Dash/Previews/PreviewExpandable.qml 2014-08-13 10:29:21 +0000
+++ qml/Dash/Previews/PreviewExpandable.qml 2014-08-21 11:25:15 +0000
@@ -80,9 +80,9 @@
80 delegate: PreviewWidgetFactory {80 delegate: PreviewWidgetFactory {
81 height: visible ? implicitHeight : 081 height: visible ? implicitHeight : 0
82 width: parent.width82 width: parent.width
83 widgetId: modelData.widgetId83 widgetId: model.widgetId
84 widgetType: modelData.type84 widgetType: model.type
85 widgetData: modelData.properties85 widgetData: model.properties
86 isCurrentPreview: root.isCurrentPreview86 isCurrentPreview: root.isCurrentPreview
87 scopeStyle: root.scopeStyle87 scopeStyle: root.scopeStyle
88 anchors {88 anchors {
8989
=== modified file 'tests/qmltests/Dash/Previews/tst_PreviewExpandable.qml'
--- tests/qmltests/Dash/Previews/tst_PreviewExpandable.qml 2014-07-30 14:16:03 +0000
+++ tests/qmltests/Dash/Previews/tst_PreviewExpandable.qml 2014-08-21 11:25:15 +0000
@@ -30,15 +30,21 @@
30 property string longText2: "This is a very very very long text. 1 This is a very very very long text. 2 This is a very very very long text. 3 This is a very very very long text. 4 This is a very very very long text. 5 This is a very very very long text. 6 This is a very very very long text. 7 This is a very very very long text. 8 This is a very very very long text. 9 This is a very very very long text. 10 This is a very very very long text. 11 This is a very very very long text."30 property string longText2: "This is a very very very long text. 1 This is a very very very long text. 2 This is a very very very long text. 3 This is a very very very long text. 4 This is a very very very long text. 5 This is a very very very long text. 6 This is a very very very long text. 7 This is a very very very long text. 8 This is a very very very long text. 9 This is a very very very long text. 10 This is a very very very long text. 11 This is a very very very long text."
31 property string shortText: "This is a short text :)"31 property string shortText: "This is a short text :)"
3232
33 ListModel {
34 id: widgetsModel
35 }
36
33 property var widgetData: {37 property var widgetData: {
34 "title": "Title here",38 "title": "Title here",
35 "collapsed-widgets": 2,39 "collapsed-widgets": 2,
36 "widgets": [40 "widgets": widgetsModel
37 { "type": "text", "widgetId" : "text1", "properties" : { "text": longText } },41 }
38 { "type": "text", "widgetId" : "text2", "properties" : { "text": longText2 } },42
39 { "type": "text", "widgetId" : "text3", "properties" : { "text": shortText } },43 Component.onCompleted: {
40 { "type": "text", "widgetId" : "text4", "properties" : { "text": longText } }44 widgetsModel.append({"type": "text", "widgetId": "text1", "properties": { "text": longText }});
41 ]45 widgetsModel.append({"type": "text", "widgetId": "text2", "properties": { "text": longText2 }});
46 widgetsModel.append({"type": "text", "widgetId": "text3", "properties": { "text": shortText }});
47 widgetsModel.append({"type": "text", "widgetId": "text4", "properties": { "text": longText }});
42 }48 }
4349
44 PreviewExpandable {50 PreviewExpandable {

Subscribers

People subscribed via source and target branches