Merge lp:~tpeeters/ubuntu-ui-toolkit/fixPopoverPointer into lp:ubuntu-ui-toolkit/staging

Proposed by Tim Peeters
Status: Merged
Approved by: Cris Dywan
Approved revision: 1043
Merged at revision: 1040
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/fixPopoverPointer
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 48 lines (+16/-8)
2 files modified
modules/Ubuntu/Components/Popups/internalPopupUtils.js (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml (+15/-7)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/fixPopoverPointer
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Cris Dywan Approve
Review via email: mp+218677@code.launchpad.net

Commit message

Fix the positioning of a popover pointer on a small screen in portrait mode.

Description of the change

Fix the positioning of a popover pointer on a small screen in portrait mode.

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

Works very well. As agreed on IRC it's unfortunate we have no tests so bug 1317226 accounts for that. Manual testing is possible by either checking the popover example in the gallery on a phone, or making the window very small on the desktop, and observing the position of the arrow - it should stay on the bottom, without the fix is moves to the top.

review: Approve
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/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-autolanding/62/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/74
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/64/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-autolanding/6
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-autolanding/6
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-autolanding/6/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-autolanding/6
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/582
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/184
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/184/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/6904
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/63/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/91
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/91/artifact/work/output/*zip*/output.zip

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

FAILED: Continuous integration, rev:1042
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/185/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/81
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/70
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/17
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/17
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/17/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/17
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/590
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/196
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/196/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/6919
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/67
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/102
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/102/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/185/rebuild

review: Needs Fixing (continuous-integration)
1043. By Tim Peeters

empty commit to see what jenkins does

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:1043
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/186/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/89
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/78
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/18
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/18
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/18/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/18
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/601
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/220
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/220/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/6945
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/74
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/118
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/118/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/186/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/Popups/internalPopupUtils.js'
2--- modules/Ubuntu/Components/Popups/internalPopupUtils.js 2013-07-13 03:11:26 +0000
3+++ modules/Ubuntu/Components/Popups/internalPopupUtils.js 2014-05-08 08:50:44 +0000
4@@ -154,7 +154,7 @@
5 if (simplePos.checkVerticalPosition(foreground, ycoord, 0, area.height/4)) {
6 foreground.y = ycoord;
7 pointer.direction = "up";
8- pointer.y = this.above(null, callerMargins, caller);
9+ pointer.y = this.below(null, callerMargins, caller);
10 pointer.x = this.closestToHorizontalCenter(pointerTarget, pointer.horizontalMargin);
11 return;
12 }
13
14=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml'
15--- modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2014-04-23 08:50:20 +0000
16+++ modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2014-05-08 08:50:44 +0000
17@@ -137,16 +137,24 @@
18 id: arrow
19
20 visible: bubbleShape.direction != "none"
21- property var directionToRotation: {"down": 0,
22- "up": 180,
23- "left": 90,
24- "right": -90,
25- "none": 0
26- }
27+
28+ function directionToRotation(direction) {
29+ switch (direction) {
30+ case "up":
31+ return 180;
32+ case "left":
33+ return 90;
34+ case "right":
35+ return -90;
36+ default: // "down" or "none"
37+ return 0;
38+ }
39+ }
40+
41 x: -width / 2.0
42 y: -height
43 transformOrigin: Item.Bottom
44- rotation: directionToRotation[bubbleShape.direction]
45+ rotation: directionToRotation(bubbleShape.direction)
46 source: "artwork/bubble_arrow.png"
47 }
48 }

Subscribers

People subscribed via source and target branches