Merge lp:~mzanetti/unity8/fix-1219035 into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Francis Ginther
Approved revision: 294
Merged at revision: 298
Proposed branch: lp:~mzanetti/unity8/fix-1219035
Merge into: lp:unity8
Diff against target: 49 lines (+10/-3)
2 files modified
Bottombar/Bottombar.qml (+3/-1)
tests/autopilot/unity8/shell/tests/test_hud.py (+7/-2)
To merge this branch: bzr merge lp:~mzanetti/unity8/fix-1219035
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Daniel d'Andrada (community) Approve
Gerry Boland (community) Approve
Review via email: mp+183866@code.launchpad.net

Commit message

shrink size of area for revealing the HUD button and make it disappear on release again.

fixes 1219035

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) :
review: Approve
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

No tests?

review: Needs Information
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

One small thing:
I would add a comment somewhere (either inline or in the test description) stating what the test is now doing (checking if it correctly disappears when releasing outside the button). It's not obvious from the code itself that you're intently releasing outside the button.

review: Needs Fixing
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

s/somewhere on the screen/outside the hud button/

"somewhere on the screen" includes the hud button itself :)

but well, maybe I'm getting too pedantic.

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

Ran into a jenkins bug after the upgrade. I've implemented a workaround, re-approving.

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

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/390/
Executed test runs:
    SUCCESS: http://s-jenkins:8080/job/generic-cleanup-mbs/2038
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy/3113/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/673/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-saucy/1579/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-autolanding/389
        deb: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-autolanding/389/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-i386-autolanding/390
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3119
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/3119/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-saucy/2611/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/675
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/675/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/545/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/557/console

review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

Re-approving to get a clean run after today's jenkins issues.

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
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
1=== modified file 'Bottombar/Bottombar.qml'
2--- Bottombar/Bottombar.qml 2013-08-28 10:48:56 +0000
3+++ Bottombar/Bottombar.qml 2013-09-05 16:32:34 +0000
4@@ -107,7 +107,7 @@
5 height: distanceThreshold
6 anchors.bottom: parent.bottom
7
8- distanceThreshold: units.gu(8)
9+ distanceThreshold: units.gu(1)
10 enabled: !theHud.shown && bottombar.enabled && applicationIsOnForeground
11 direction: Direction.Upwards
12
13@@ -119,6 +119,8 @@
14 if (previousStatus == DirectionalDragArea.Recognized) {
15 if (hudButton.mouseOver) {
16 hudButton.clicked()
17+ } else {
18+ bottombar.state = "hidden"
19 }
20 }
21 } else if (status === DirectionalDragArea.Undecided) {
22
23=== modified file 'tests/autopilot/unity8/shell/tests/test_hud.py'
24--- tests/autopilot/unity8/shell/tests/test_hud.py 2013-07-29 22:16:04 +0000
25+++ tests/autopilot/unity8/shell/tests/test_hud.py 2013-09-05 16:32:34 +0000
26@@ -34,6 +34,8 @@
27
28 def test_show_hud_button_appears(self):
29 """Swiping up while an app is active must show the 'show hud' button.
30+ The button must disappear not opening the HUD when releasing the
31+ mouse again somewhere on the screen except on the button itself.
32
33 """
34 self.launch_unity()
35@@ -49,9 +51,12 @@
36 hud_show_button
37 )
38 self.touch.press(swipe_coords.start_x, swipe_coords.start_y)
39- self.addCleanup(self.touch.release)
40- self.touch._finger_move(swipe_coords.end_x, swipe_coords.end_y)
41+ self.addCleanup(self._maybe_release_finger)
42+ self.touch._finger_move(swipe_coords.end_x, swipe_coords.end_y + hud_show_button.height);
43 self.assertThat(hud_show_button.opacity, Eventually(Equals(1.0)))
44+ self.touch.release();
45+ self.assertThat(hud_show_button.opacity, Eventually(Equals(0.0)))
46+ self.assertThat(hud.shown, Equals(False))
47
48 def test_show_hud_appears(self):
49 """Releasing the touch on the 'show hud' button must display the hud.

Subscribers

People subscribed via source and target branches