Merge lp:~paulliu/unity8/noninteractive20140804 into lp:unity8

Proposed by Ying-Chun Liu
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1129
Merged at revision: 1387
Proposed branch: lp:~paulliu/unity8/noninteractive20140804
Merge into: lp:unity8
Diff against target: 158 lines (+51/-2)
9 files modified
plugins/Dash/CardCreator.js (+3/-1)
tests/plugins/Dash/cardcreator/1.res (+2/-0)
tests/plugins/Dash/cardcreator/2.res (+2/-0)
tests/plugins/Dash/cardcreator/3.res (+2/-0)
tests/plugins/Dash/cardcreator/4.res (+2/-0)
tests/plugins/Dash/cardcreator/5.res (+3/-1)
tests/plugins/Dash/cardcreator/6.res (+2/-0)
tests/plugins/Dash/cardcreator/7.res (+2/-0)
tests/qmltests/Dash/tst_GenericScopeView.qml (+33/-0)
To merge this branch: bzr merge lp:~paulliu/unity8/noninteractive20140804
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Albert Astals Cid (community) Approve
Review via email: mp+231746@code.launchpad.net

Commit message

Add non-interactive code into GenericScopeView.

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.

 * 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.
1118. By Ying-Chun Liu

Merge trunk.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

What's this for? Can you please link at the spec/use for this flag?

review: Needs Information
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in qml/Dash/GenericScopeView.qml
Text conflict in tests/plugins/Dash/cardcreator/1.res
Text conflict in tests/plugins/Dash/cardcreator/3.res
Text conflict in tests/plugins/Dash/cardcreator/5.res
4 conflicts encountered.

1119. By Ying-Chun Liu

merge trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in tests/plugins/Dash/cardcreator/1.res
Text conflict in tests/plugins/Dash/cardcreator/2.res
Text conflict in tests/plugins/Dash/cardcreator/3.res
Text conflict in tests/plugins/Dash/cardcreator/4.res
Text conflict in tests/plugins/Dash/cardcreator/5.res
Text conflict in tests/plugins/Dash/cardcreator/6.res
Text conflict in tests/plugins/Dash/cardcreator/7.res
Text conflict in tests/qmltests/Dash/tst_GenericScopeView.qml
8 conflicts encountered.

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :
1120. By Ying-Chun Liu

merge trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Paul, there's something weird in your tests/plugins/Dash/cardcreator/*.res diffs, you hardly changed anything on CardCreator.js but there's lots of changes in this diff, can you check why and remove them if not really needed?

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
1121. By Ying-Chun Liu

Fix results

1122. By Ying-Chun Liu

remove empty lines

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Wouldn't it be easier to just set the enabled property of the button to false?

review: Needs Information
1123. By Ying-Chun Liu

merge trunk

1124. By Ying-Chun Liu

Use enabled property

1125. By Ying-Chun Liu

Fix card result

Revision history for this message
Ying-Chun Liu (paulliu) wrote :

Seems using enabled property of the AbstractButton not working as expected.

Inside the AbstractButton, there's MouseArea. And it only looks private __acceptEvents for accepting or not. Not the enabled property inherit from ActionItem.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

> Seems using enabled property of the AbstractButton not working as expected.
>
> Inside the AbstractButton, there's MouseArea. And it only looks private
> __acceptEvents for accepting or not. Not the enabled property inherit from
> ActionItem.

That's strange i just did an AbstractButton and set it to disabled and it's internal mouse area is also disabled.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1126. By Ying-Chun Liu

Fix unit tests

1127. By Ying-Chun Liu

Merge trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Do we need the change for "visible:" in CardCreator? Since the card is never enabled root.pressed should never be true, so i think we don't really need that change, no?

review: Needs Information
1128. By Ying-Chun Liu

Don't modify touchdown visible

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1129. By Ying-Chun Liu

Save objectName for rendererLoader.

Revision history for this message
Albert Astals Cid (aacid) :
review: Approve
Revision history for this message
Albert Astals Cid (aacid) wrote :

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

 * Did CI run pass? If not, please explain why.
No, unrelated

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

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1130. By Ying-Chun Liu

Merge trunk

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/Dash/CardCreator.js'
--- plugins/Dash/CardCreator.js 2014-10-10 11:13:26 +0000
+++ plugins/Dash/CardCreator.js 2014-10-27 13:45:30 +0000
@@ -313,7 +313,9 @@
313 readonly property string title: cardData && cardData["title"] || ""; \n\313 readonly property string title: cardData && cardData["title"] || ""; \n\
314 property bool asynchronous: true; \n\314 property bool asynchronous: true; \n\
315 property bool showHeader: true; \n\315 property bool showHeader: true; \n\
316 implicitWidth: childrenRect.width; \n';316 implicitWidth: childrenRect.width; \n\
317 enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true); \n\
318 \n';
317319
318 var hasArt = components["art"] && components["art"]["field"] || false;320 var hasArt = components["art"] && components["art"]["field"] || false;
319 var hasSummary = components["summary"] || false;321 var hasSummary = components["summary"] || false;
320322
=== modified file 'tests/plugins/Dash/cardcreator/1.res'
--- tests/plugins/Dash/cardcreator/1.res 2014-10-06 08:01:08 +0000
+++ tests/plugins/Dash/cardcreator/1.res 2014-10-27 13:45:30 +0000
@@ -13,6 +13,8 @@
13 property bool asynchronous: true; 13 property bool asynchronous: true;
14 property bool showHeader: true; 14 property bool showHeader: true;
15 implicitWidth: childrenRect.width; 15 implicitWidth: childrenRect.width;
16 enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
17
16onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } 18onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
17readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);19readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
18Item { 20Item {
1921
=== modified file 'tests/plugins/Dash/cardcreator/2.res'
--- tests/plugins/Dash/cardcreator/2.res 2014-10-10 11:13:26 +0000
+++ tests/plugins/Dash/cardcreator/2.res 2014-10-27 13:45:30 +0000
@@ -13,6 +13,8 @@
13 property bool asynchronous: true; 13 property bool asynchronous: true;
14 property bool showHeader: true; 14 property bool showHeader: true;
15 implicitWidth: childrenRect.width; 15 implicitWidth: childrenRect.width;
16 enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
17
16Loader {18Loader {
17 id: backgroundLoader; 19 id: backgroundLoader;
18 objectName: "backgroundLoader"; 20 objectName: "backgroundLoader";
1921
=== modified file 'tests/plugins/Dash/cardcreator/3.res'
--- tests/plugins/Dash/cardcreator/3.res 2014-10-06 08:01:08 +0000
+++ tests/plugins/Dash/cardcreator/3.res 2014-10-27 13:45:30 +0000
@@ -13,6 +13,8 @@
13 property bool asynchronous: true; 13 property bool asynchronous: true;
14 property bool showHeader: true; 14 property bool showHeader: true;
15 implicitWidth: childrenRect.width; 15 implicitWidth: childrenRect.width;
16 enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
17
16onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } 18onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
17readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);19readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
18Item { 20Item {
1921
=== modified file 'tests/plugins/Dash/cardcreator/4.res'
--- tests/plugins/Dash/cardcreator/4.res 2014-10-06 08:01:08 +0000
+++ tests/plugins/Dash/cardcreator/4.res 2014-10-27 13:45:30 +0000
@@ -13,6 +13,8 @@
13 property bool asynchronous: true; 13 property bool asynchronous: true;
14 property bool showHeader: true; 14 property bool showHeader: true;
15 implicitWidth: childrenRect.width; 15 implicitWidth: childrenRect.width;
16 enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
17
16readonly property size artShapeSize: Qt.size(-1, -1);18readonly property size artShapeSize: Qt.size(-1, -1);
17readonly property int headerHeight: row.height;19readonly property int headerHeight: row.height;
18Row { 20Row {
1921
=== modified file 'tests/plugins/Dash/cardcreator/5.res'
--- tests/plugins/Dash/cardcreator/5.res 2014-10-10 11:13:26 +0000
+++ tests/plugins/Dash/cardcreator/5.res 2014-10-27 13:45:30 +0000
@@ -13,6 +13,8 @@
13 property bool asynchronous: true; 13 property bool asynchronous: true;
14 property bool showHeader: true; 14 property bool showHeader: true;
15 implicitWidth: childrenRect.width; 15 implicitWidth: childrenRect.width;
16 enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
17
16onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; } 18onArtShapeBorderSourceChanged: { if (artShapeBorderSource !== undefined && artShapeLoader.item) artShapeLoader.item.borderSource = artShapeBorderSource; }
17readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);19readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
18Item { 20Item {
@@ -143,7 +145,7 @@
143 id: touchdown; 145 id: touchdown;
144 objectName: "touchdown"; 146 objectName: "touchdown";
145 anchors { fill: artShapeHolder } 147 anchors { fill: artShapeHolder }
146 visible: root.pressed; 148 visible: root.pressed;
147 radius: "medium"; 149 radius: "medium";
148 borderSource: "radius_pressed.sci" 150 borderSource: "radius_pressed.sci"
149}151}
150152
=== modified file 'tests/plugins/Dash/cardcreator/6.res'
--- tests/plugins/Dash/cardcreator/6.res 2014-09-29 08:19:06 +0000
+++ tests/plugins/Dash/cardcreator/6.res 2014-10-27 13:45:30 +0000
@@ -13,6 +13,8 @@
13 property bool asynchronous: true;13 property bool asynchronous: true;
14 property bool showHeader: true;14 property bool showHeader: true;
15 implicitWidth: childrenRect.width;15 implicitWidth: childrenRect.width;
16 enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
17
16Loader {18Loader {
17 id: backgroundLoader; 19 id: backgroundLoader;
18 objectName: "backgroundLoader"; 20 objectName: "backgroundLoader";
1921
=== modified file 'tests/plugins/Dash/cardcreator/7.res'
--- tests/plugins/Dash/cardcreator/7.res 2014-10-10 11:13:26 +0000
+++ tests/plugins/Dash/cardcreator/7.res 2014-10-27 13:45:30 +0000
@@ -13,6 +13,8 @@
13 property bool asynchronous: true; 13 property bool asynchronous: true;
14 property bool showHeader: true; 14 property bool showHeader: true;
15 implicitWidth: childrenRect.width; 15 implicitWidth: childrenRect.width;
16 enabled: root.template == null ? true : (root.template["non-interactive"] !== undefined ? !root.template["non-interactive"] : true);
17
16Loader {18Loader {
17 id: backgroundLoader; 19 id: backgroundLoader;
18 objectName: "backgroundLoader"; 20 objectName: "backgroundLoader";
1921
=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
--- tests/qmltests/Dash/tst_GenericScopeView.qml 2014-10-10 11:13:26 +0000
+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2014-10-27 13:45:30 +0000
@@ -603,6 +603,39 @@
603 spy.wait()603 spy.wait()
604 compare(spy.count, 1)604 compare(spy.count, 1)
605 }605 }
606
607 function test_item_noninteractive() {
608 waitForRendering(genericScopeView);
609
610 var categoryListView = findChild(genericScopeView, "categoryListView");
611 waitForRendering(categoryListView);
612
613 var category0 = findChild(categoryListView, "dashCategory0");
614 waitForRendering(category0);
615
616 var cardTool = findChild(category0, "cardTool");
617 var cardGrid = category0.item;
618
619 cardTool.template["non-interactive"] = true;
620 compare(cardGrid.cardTool.template["non-interactive"], true);
621
622 var item0 = findChild(cardGrid, "delegate0");
623 waitForRendering(item0);
624 item0.template = cardTool.template;
625 compare(item0.template["non-interactive"], true);
626 compare(item0.enabled, false);
627 var touchdown = findChild(item0, "touchdown");
628
629 compare(touchdown.visible, false);
630 mouseClick(item0, item0.width / 2, item0.height / 2);
631 compare(touchdown.visible, false);
632
633 cardTool.template["non-interactive"] = false;
634 compare(cardGrid.cardTool.template["non-interactive"], false);
635 item0.template = cardTool.template;
636 compare(item0.template["non-interactive"], false);
637 compare(item0.enabled, true);
638 }
606 }639 }
607 }640 }
608}641}

Subscribers

People subscribed via source and target branches