Merge lp:~aacid/unity/doNotAnimateFilterGrid into lp:unity/phablet

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michał Sawicz
Approved revision: no longer in the source branch.
Merged at revision: 707
Proposed branch: lp:~aacid/unity/doNotAnimateFilterGrid
Merge into: lp:unity/phablet
Diff against target: 118 lines (+3/-25)
4 files modified
Components/FilterGrid.qml (+0/-4)
tests/qmltests/Components/tst_FilterGrid.qml (+3/-15)
tests/qmltests/Dash/People/tst_PeopleFilterGrid.qml (+0/-3)
tests/qmltests/Dash/tst_FilterGrids.qml (+0/-3)
To merge this branch: bzr merge lp:~aacid/unity/doNotAnimateFilterGrid
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michał Sawicz Approve
Review via email: mp+165886@code.launchpad.net

Commit message

Don't animate the FilterGrid

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) wrote :

Looks good, we'll bring back the transition for the proper category expansion implementation.

Let's see what CI has to say.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
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) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Components/FilterGrid.qml'
--- Components/FilterGrid.qml 2013-05-02 00:15:36 +0000
+++ Components/FilterGrid.qml 2013-05-27 13:47:29 +0000
@@ -55,9 +55,6 @@
55 readonly property alias moving: iconTileGrid.moving55 readonly property alias moving: iconTileGrid.moving
56 readonly property alias pressDelay: iconTileGrid.pressDelay56 readonly property alias pressDelay: iconTileGrid.pressDelay
5757
58 // for testing purposes
59 property alias __expansionAnimation: heightAnimation
60
61 height: childrenRect.height58 height: childrenRect.height
6259
63 ResponsiveGridView {60 ResponsiveGridView {
@@ -65,7 +62,6 @@
6562
66 anchors { left: parent.left; right: parent.right }63 anchors { left: parent.left; right: parent.right }
67 height: totalContentHeight64 height: totalContentHeight
68 Behavior on height { NumberAnimation { id: heightAnimation; duration: 200; easing.type: Easing.InOutQuad } }
69 interactive: false65 interactive: false
7066
71 minimumHorizontalSpacing: units.gu(0.5)67 minimumHorizontalSpacing: units.gu(0.5)
7268
=== modified file 'tests/qmltests/Components/tst_FilterGrid.qml'
--- tests/qmltests/Components/tst_FilterGrid.qml 2013-05-08 09:51:55 +0000
+++ tests/qmltests/Components/tst_FilterGrid.qml 2013-05-27 13:47:29 +0000
@@ -120,34 +120,26 @@
120 when: windowShown120 when: windowShown
121121
122 function test_turningFilterOffShowsAllElements() {122 function test_turningFilterOffShowsAllElements() {
123 compare(countVisibleDelegates(), 6)123 tryCompareFunction(countVisibleDelegates, 6)
124124
125 filterCheckBox.checked = false125 filterCheckBox.checked = false
126126
127 // wait for animations to complete127 tryCompareFunction(countVisibleDelegates, 12)
128 tryCompare(filterGrid.__expansionAnimation, "running", false)
129 compare(countVisibleDelegates(), 12)
130128
131 // back to initial state129 // back to initial state
132 filterCheckBox.checked = true130 filterCheckBox.checked = true
133 // wait for animations to complete
134 tryCompare(filterGrid.__expansionAnimation, "running", false)
135 }131 }
136132
137 function test_collapsedRowCount() {133 function test_collapsedRowCount() {
138 for (var i = 0; i < 4; ++i) {134 for (var i = 0; i < 4; ++i) {
139 collapsedRowCountSelector.selectedIndex = i135 collapsedRowCountSelector.selectedIndex = i
140 // wait for animations to complete
141 tryCompare(filterGrid.__expansionAnimation, "running", false)
142 // We have 3 elements per row.136 // We have 3 elements per row.
143 // row count == index + 1137 // row count == index + 1
144 compare(countVisibleDelegates(), 3*(i+1))138 tryCompareFunction(countVisibleDelegates, 3*(i+1))
145 }139 }
146140
147 // back to initial state141 // back to initial state
148 collapsedRowCountSelector.selectedIndex = 1142 collapsedRowCountSelector.selectedIndex = 1
149 // wait for animations to complete
150 tryCompare(filterGrid.__expansionAnimation, "running", false)
151 }143 }
152144
153 // Checks that the filter toggle button, the one that says "View All (xy)",145 // Checks that the filter toggle button, the one that says "View All (xy)",
@@ -157,8 +149,6 @@
157149
158 for (var i = 0; i < 4; ++i) {150 for (var i = 0; i < 4; ++i) {
159 collapsedRowCountSelector.selectedIndex = i151 collapsedRowCountSelector.selectedIndex = i
160 // wait for animations to complete
161 tryCompare(filterGrid.__expansionAnimation, "running", false)
162 // row count == index + 1152 // row count == index + 1
163 // The total number of rows is 4.153 // The total number of rows is 4.
164154
@@ -175,8 +165,6 @@
175 // back to initial state165 // back to initial state
176 collapsedRowCountSelector.selectedIndex = 1166 collapsedRowCountSelector.selectedIndex = 1
177 expandableCheckBox.checked = true167 expandableCheckBox.checked = true
178 // wait for animations to complete
179 tryCompare(filterGrid.__expansionAnimation, "running", false)
180 }168 }
181169
182 function countVisibleDelegates() {170 function countVisibleDelegates() {
183171
=== modified file 'tests/qmltests/Dash/People/tst_PeopleFilterGrid.qml'
--- tests/qmltests/Dash/People/tst_PeopleFilterGrid.qml 2013-05-02 00:15:36 +0000
+++ tests/qmltests/Dash/People/tst_PeopleFilterGrid.qml 2013-05-27 13:47:29 +0000
@@ -133,18 +133,15 @@
133 }133 }
134134
135 function test_columns() {135 function test_columns() {
136 tryCompare(peopleFilterGrid.__expansionAnimation, "running", false)
137 compare(peopleFilterGrid.columns,3)136 compare(peopleFilterGrid.columns,3)
138 }137 }
139138
140 function test_clickCell(data) {139 function test_clickCell(data) {
141 tryCompare(peopleFilterGrid.__expansionAnimation, "running", false)
142 tryCompare(peopleFilterGrid, "flicking", false)140 tryCompare(peopleFilterGrid, "flicking", false)
143 tryCompare(peopleFilterGrid, "moving", false)141 tryCompare(peopleFilterGrid, "moving", false)
144 signalSpy.clear()142 signalSpy.clear()
145 wait(peopleFilterGrid.pressDelay > 0 ? peopleFilterGrid.pressDelay : 5)143 wait(peopleFilterGrid.pressDelay > 0 ? peopleFilterGrid.pressDelay : 5)
146 mouseClick(peopleFilterGrid, data.x, data.y)144 mouseClick(peopleFilterGrid, data.x, data.y)
147 tryCompare(peopleFilterGrid.__expansionAnimation, "running", false)
148 tryCompare(peopleFilterGrid, "flicking", false)145 tryCompare(peopleFilterGrid, "flicking", false)
149 tryCompare(peopleFilterGrid, "moving", false)146 tryCompare(peopleFilterGrid, "moving", false)
150 compare(signalSpy.count, 1)147 compare(signalSpy.count, 1)
151148
=== modified file 'tests/qmltests/Dash/tst_FilterGrids.qml'
--- tests/qmltests/Dash/tst_FilterGrids.qml 2013-05-22 11:51:49 +0000
+++ tests/qmltests/Dash/tst_FilterGrids.qml 2013-05-27 13:47:29 +0000
@@ -126,9 +126,6 @@
126 gridView.forceLayout();126 gridView.forceLayout();
127 waitForRendering(gridView);127 waitForRendering(gridView);
128128
129 // Wait until the expandinganimation is finished
130 tryCompare(gridLoader.item.__expansionAnimation, "running", false)
131
132 // Click item 1129 // Click item 1
133 var tile1 = findChild(gridLoader.item, "delegate1");130 var tile1 = findChild(gridLoader.item, "delegate1");
134 verify(tile1 !== undefined, "delegate1 wasn't found");131 verify(tile1 !== undefined, "delegate1 wasn't found");

Subscribers

People subscribed via source and target branches