Merge lp:~gerboland/unity8/window-width-height-changes-acted-upon-always into lp:unity8

Proposed by Gerry Boland on 2016-02-19
Status: Superseded
Proposed branch: lp:~gerboland/unity8/window-width-height-changes-acted-upon-always
Merge into: lp:unity8
Diff against target: 28 lines (+3/-4)
2 files modified
qml/Rotation/NinetyRotationAnimation.qml (+2/-2)
qml/Shell.qml (+1/-2)
To merge this branch: bzr merge lp:~gerboland/unity8/window-width-height-changes-acted-upon-always
Reviewer Review Type Date Requested Status
Daniel d'Andrada (community) Needs Fixing on 2016-04-25
Unity8 CI Bot continuous-integration Needs Fixing on 2016-03-24
Albert Astals Cid (community) 2016-02-19 Approve on 2016-03-22
PS Jenkins bot continuous-integration Needs Fixing on 2016-02-19
Review via email: mp+286665@code.launchpad.net

This proposal has been superseded by a proposal from 2016-04-28.

Commit Message

Shell and Stage sizing fixes

1. Always bind Shell width/height to OrientedShell width/height, fixes issues with window resize after orientation change
2. Use anchors instead of width/height binding for Stages container, avoids a binding loop on width which fixes Stages resizing

To post a comment you must log in.
Gerry Boland (gerboland) wrote :

To repro bug:
1. boot phone with silo10
2. launch browser
3. rotate phone to landscape
4. plug phone into display
You should shell not fullscreen on display

Daniel d'Andrada (dandrader) wrote :

Commit message: add a newline after the short summary?

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2205
http://jenkins.qa.ubuntu.com/job/unity8-ci/7371/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6571
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/786/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/2076
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/779
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1971
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1971
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/778
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/777
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/5004
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6582
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6582/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27767
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/405/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/784
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/784/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27766

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7371/rebuild

review: Needs Fixing (continuous-integration)
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2205
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/436/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/590
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay/185
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial/185
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/613
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/633
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/633
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/629
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/629/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/629
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/629/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/629
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/629/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/629
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/629/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/629
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/629/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/629
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/629/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

Why are the changes on qml/Shell.qml needed? I mean what we have is also a binding, no?

review: Needs Information
Gerry Boland (gerboland) wrote :

> Why are the changes on qml/Shell.qml needed? I mean what we have is also a
> binding, no?

Hmm, I can't quite remember now. What is there should not misbehave. I probably switched it since anchors.fill usually better to use.

Albert Astals Cid (aacid) wrote :

> > Why are the changes on qml/Shell.qml needed? I mean what we have is also a
> > binding, no?
>
> Hmm, I can't quite remember now. What is there should not misbehave. I
> probably switched it since anchors.fill usually better to use.

I find it makes code more complicated to understand (and maybe even break?) since with this code we're setting both anchors.fill and width/height bindings for the Shell {} item.

Isn't it better to just set one of those so it's clearer what is applying?

review: Needs Information
Gerry Boland (gerboland) wrote :

Oh, my commit message explained why I did it:
"Use anchors instead of width/height binding for Stages container, avoids a binding loop on width which fixes Stages resizing"
I didn't dig into why a binding loop appeared.

I'm not setting both anchors & width/height for Shell{}. I set width/height of Shell{}, and then ensure the Stages container fills its parent (which is Shell{}'s root item)

Albert Astals Cid (aacid) wrote :

> I'm not setting both anchors & width/height for Shell{}. I set width/height of
> Shell{}, and then ensure the Stages container fills its parent (which is
> Shell{}'s root item)

Ah right, sorry, missed that.

Albert Astals Cid (aacid) wrote :

Is this something we can autotest?

review: Needs Information
Albert Astals Cid (aacid) wrote :

Please add the checklist

review: Needs Fixing
Gerry Boland (gerboland) wrote :

 * Are there any related MPs required for this MP to build/function as expected? Please list.
N
 * Did you perform an exploratory manual test run of your code change and any related functionality?
Y
 * Did you make sure that your branch does not contain spurious tags?
Y
 * 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

Albert Astals Cid (aacid) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Not really a manual test, but it is clear we need the binding

 * Did CI run pass? If not, please explain why.
unstable btu doesn't really look related.

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

review: Approve
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2205
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/830/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1077
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1095
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1095
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1093
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1093/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1093/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1093
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1093/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1093/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1093
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1093/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1093/console

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

review: Needs Fixing (continuous-integration)
Daniel d'Andrada (dandrader) wrote :

- The qml/Rotation/NinetyRotationAnimation.qml change is incomplete. It's missing the y binding.
- HalfLoopRotationAnimation still leaves Shell geometry with static assignments.

And it also looks more like a workaround the issue that RotationStates wasn't designed to support geometry changes OrientedShell than a proper fix.

*All* geometry properties (x, y, width, height, transformOriginX and transformOriginY) should have bindings assigned to then while shell is static (ie, not under a rotation animation) in order to properly support OrientedShell resizes.

Let me try to come up with a comprehensive solution for that.

review: Needs Fixing

Unmerged revisions

2205. By Gerry Boland on 2016-02-19

Use anchors instead of width/height binding for Stages, avoids a binding loop and fixes Stages resizing on window resize

2204. By Gerry Boland on 2016-02-19

Always bind Shell width/height to OrientedShell width/height, fixes issues with window resize

2203. By Launchpad Translations on behalf of unity-team on 2016-02-19

Launchpad automatic translations update.

2202. By Launchpad Translations on behalf of unity-team on 2016-02-18

Launchpad automatic translations update.

2201. By Launchpad Translations on behalf of unity-team on 2016-02-17

Launchpad automatic translations update.

2200. By Launchpad Translations on behalf of unity-team on 2016-02-16

Launchpad automatic translations update.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Rotation/NinetyRotationAnimation.qml'
2--- qml/Rotation/NinetyRotationAnimation.qml 2015-07-15 15:07:19 +0000
3+++ qml/Rotation/NinetyRotationAnimation.qml 2016-02-19 14:23:24 +0000
4@@ -34,8 +34,8 @@
5 windowScreenshot.visible = true;
6 shell.orientationAngle = root.toAngle;
7 shell.x = 0;
8- shell.width = flipShellDimensions ? orientedShell.height : orientedShell.width;
9- shell.height = flipShellDimensions ? orientedShell.width : orientedShell.height;
10+ shell.width = Qt.binding( function() { return flipShellDimensions ? orientedShell.height : orientedShell.width; } );
11+ shell.height = Qt.binding( function() { return flipShellDimensions ? orientedShell.width : orientedShell.height; } );
12 shell.transformOriginX = orientedShell.width / 2;
13 shell.transformOriginY = orientedShell.width / 2;
14 shell.updateFocusedAppOrientation();
15
16=== modified file 'qml/Shell.qml'
17--- qml/Shell.qml 2016-01-28 18:25:14 +0000
18+++ qml/Shell.qml 2016-02-19 14:23:24 +0000
19@@ -190,8 +190,7 @@
20 Item {
21 id: stages
22 objectName: "stages"
23- width: parent.width
24- height: parent.height
25+ anchors.fill: parent
26
27 Connections {
28 target: ApplicationManager

Subscribers

People subscribed via source and target branches