Merge lp:~mzanetti/unity8/spread-fixes into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2685
Merged at revision: 2687
Proposed branch: lp:~mzanetti/unity8/spread-fixes
Merge into: lp:unity8
Prerequisite: lp:~mzanetti/unity8/spread-blur
Diff against target: 133 lines (+25/-9)
4 files modified
qml/Shell.qml (+2/-1)
qml/Stage/Spread/Spread.qml (+1/-1)
qml/Stage/Spread/SpreadDelegateInputArea.qml (+7/-1)
qml/Stage/Stage.qml (+15/-6)
To merge this branch: bzr merge lp:~mzanetti/unity8/spread-fixes
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) Approve
Unity8 CI Bot continuous-integration Pending
Review via email: mp+310273@code.launchpad.net

This proposal supersedes a proposal from 2016-11-07.

Commit message

Fixes in the spread after design review

- add a minimum width for the tile info to prevent it going to ...
- tiles should not be interactive any more when moving to spread
- add some resistance to the drag when an app is not closeable
- allow rotating when there is no app focused
- add a fade in animation to the icons in the spread
- fix spread looking out of place when there's only one item

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.
nope
 * Did you perform an exploratory manual test run of your code change and any related functionality?
yip yip
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
nope
 * If you changed the UI, has there been a design review?
yip yip

To post a comment you must log in.
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Nice, looks good

* 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.

Not yet, dunno why, will wait with top approval

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2680
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2471/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3258
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1865
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1865
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/1865
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3286
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3140
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/3140/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3140
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3140/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3140
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3140/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3140
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/3140/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3140
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3140/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3140
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3140/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3140
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/3140/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3140
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3140/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3140
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3140/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2471/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

CI is fine, unrelated failures, passes locally just fine

review: Approve
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

Yup, still looking good; if design wants to get these fixes in, I'm fine with it

review: Approve
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Still good after merge

review: Approve
lp:~mzanetti/unity8/spread-fixes updated
2686. By Michael Zanetti

merge prereq

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Shell.qml'
2--- qml/Shell.qml 2016-10-03 11:15:27 +0000
3+++ qml/Shell.qml 2016-11-09 14:52:38 +0000
4@@ -442,9 +442,10 @@
5 }
6
7 if (!greeter.locked && tutorial.launcherLongSwipeEnabled
8- && ApplicationManager.focusedApplicationId != "unity8-dash") {
9+ && (ApplicationManager.focusedApplicationId != "unity8-dash" || stage.spreadShown)) {
10 ApplicationManager.requestFocusApplication("unity8-dash")
11 launcher.fadeOut();
12+ stage.closeSpread();
13 }
14 }
15
16
17=== modified file 'qml/Stage/Spread/Spread.qml'
18--- qml/Stage/Spread/Spread.qml 2016-09-20 12:03:51 +0000
19+++ qml/Stage/Spread/Spread.qml 2016-11-09 14:52:38 +0000
20@@ -91,7 +91,7 @@
21
22 readonly property real visibleItemCount: (spreadWidth / spreadItemWidth) / (1 - itemOverlap)
23
24- readonly property real spreadTotalWidth: totalItemCount * spreadWidth / visibleItemCount
25+ readonly property real spreadTotalWidth: Math.max(2,totalItemCount) * spreadWidth / visibleItemCount
26
27 readonly property real centeringOffset: Math.max(spreadWidth - spreadTotalWidth ,0) / (2 * spreadWidth)
28
29
30=== modified file 'qml/Stage/Spread/SpreadDelegateInputArea.qml'
31--- qml/Stage/Spread/SpreadDelegateInputArea.qml 2016-10-11 21:48:40 +0000
32+++ qml/Stage/Spread/SpreadDelegateInputArea.qml 2016-11-09 14:52:38 +0000
33@@ -119,7 +119,13 @@
34 }
35 }
36
37- d.distance = tp.y - tp.startY - offset
38+ if (root.closeable) {
39+ d.distance = tp.y - tp.startY - offset
40+ } else {
41+ var value = tp.y - tp.startY - offset;
42+ d.distance = Math.sqrt(Math.abs(value)) * (value < 0 ? -1 : 1) * 3
43+ }
44+
45 d.pushDragEvent(tp);
46 }
47
48
49=== modified file 'qml/Stage/Stage.qml'
50--- qml/Stage/Stage.qml 2016-11-09 14:52:38 +0000
51+++ qml/Stage/Stage.qml 2016-11-09 14:52:38 +0000
52@@ -53,18 +53,18 @@
53 property real leftEdgeDragProgress: 0
54
55 // Used by the tutorial code
56- readonly property bool spreadShown: state == "spread"
57 readonly property real rightEdgeDragProgress: rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0 // How far left the stage has been dragged
58
59 // used by the snap windows (edge maximize) feature
60 readonly property alias previewRectangle: fakeRectangle
61
62+ readonly property bool spreadShown: state == "spread"
63 readonly property var mainApp: priv.focusedAppDelegate ? priv.focusedAppDelegate.application : null
64
65 // application windows never rotate independently
66 property int mainAppWindowOrientationAngle: shellOrientationAngle
67
68- property bool orientationChangesEnabled: priv.focusedAppDelegate && priv.focusedAppDelegate.orientationChangesEnabled
69+ property bool orientationChangesEnabled: !priv.focusedAppDelegate || priv.focusedAppDelegate.orientationChangesEnabled
70
71 property int supportedOrientations: {
72 if (mainApp) {
73@@ -105,9 +105,13 @@
74 edgeBarrier.push(amount);
75 }
76
77+ function closeSpread() {
78+ priv.goneToSpread = false;
79+ }
80+
81 onSpreadEnabledChanged: {
82- if (!spreadEnabled && root.state == "spread") {
83- priv.goneToSpread = false;
84+ if (!spreadEnabled && spreadShown) {
85+ closeSpread();
86 }
87 }
88
89@@ -481,7 +485,7 @@
90 }
91 },
92 Transition {
93- to: "stagedRightEdge"
94+ to: "stagedRightEdge,sideStagedRightEdge"
95 PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
96 },
97 Transition {
98@@ -1078,6 +1082,7 @@
99 showHighlight: spreadItem.highlightedIndex === index
100 darkening: spreadItem.highlightedIndex >= 0
101 anchors.topMargin: dragArea.distance
102+ interactive: false
103 }
104 PropertyChanges {
105 target: appDelegate
106@@ -1117,7 +1122,10 @@
107 scaleToPreviewSize: spreadItem.stackHeight
108 scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
109 shadowOpacity: .3
110+ interactive: false
111 }
112+ // make sure it's visible but transparent so it fades in when we transition to spread
113+ PropertyChanges { target: windowInfoItem; opacity: 0; visible: true }
114 },
115 State {
116 name: "windowedRightEdge"
117@@ -1376,6 +1384,7 @@
118 PropertyAction { target: decoratedWindow; property: "scaleToPreviewSize" }
119 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
120 UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle,scaleToPreviewProgress"; duration: priv.animationDuration }
121+ UbuntuNumberAnimation { target: windowInfoItem; properties: "opacity"; duration: priv.animationDuration }
122 },
123 Transition {
124 from: "normal,staged"; to: "stagedWithSideStage"
125@@ -1588,7 +1597,7 @@
126 maxWidth: {
127 var nextApp = appRepeater.itemAt(index + 1);
128 if (nextApp) {
129- return nextApp.x - appDelegate.x - units.gu(1)
130+ return Math.max(iconHeight, nextApp.x - appDelegate.x - units.gu(1))
131 }
132 return appDelegate.width;
133 }

Subscribers

People subscribed via source and target branches