Merge lp:~aacid/unity8/pullToRefreshColorChangeWhenNeeded into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Terry
Approved revision: 2596
Merged at revision: 2629
Proposed branch: lp:~aacid/unity8/pullToRefreshColorChangeWhenNeeded
Merge into: lp:unity8
Diff against target: 43 lines (+4/-0)
3 files modified
qml/Dash/DashPageHeader.qml (+2/-0)
qml/Dash/GenericScopeView.qml (+1/-0)
qml/Dash/PullToRefreshScopeStyle.qml (+1/-0)
To merge this branch: bzr merge lp:~aacid/unity8/pullToRefreshColorChangeWhenNeeded
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Michael Terry Approve
Review via email: mp+303025@code.launchpad.net

Commit message

Show "Pull to refresh" in white when overlaid in low luminance colors

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * 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?
I understand the change is obvious enough to not need a review.

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2595
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1965/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2564
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1388
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1388/console
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1388
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2592
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2472
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2472
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2472
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2466
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2466/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2466
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2466/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2466
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2466/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2466
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2466/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2466
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2466/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2466
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2466/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2466
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2466/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2466
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2466/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2466
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2466/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

+ color: styledItem.headerDividerLuminance < 0.3 ? "white" : theme.palette.normal.baseText

So this is what ButtonStyle.qml from our SDK does:
  textColor: ColorUtils.luminance(button.color) <= 0.85 && !(stroke && !button.pressed) ? "#FFFFFF" : "#888888"

That's a very different threshold value. Do you have an opinion on 0.3 vs 0.85?

I also am a little leery of mixing hard-coded colors and theme colors (especially in this case, where if we ever let the user switch the shell theme, the text may not be as dark as we expect). I'd prefer if we did ("white" : "black") or (UbuntuColors.porcelain : UbuntuColors.ash) or something.

review: Needs Information
Revision history for this message
Albert Astals Cid (aacid) wrote :

I used 0.3 because we're using 0.7 in CardCreator and i reversed the >

I don't have an idea why we used 0.7 there to be honest as compared to the 0.15 that seems to be used for the buttons in the uitk, but i think it was better to have in-dash concordancy than with the uitk.

I agree that using the palette feels a bit weird since noone guarantees the theme.palette.normal.baseText will actually be dark, so i can change it to so fixed UbuntuColors if you prefer

2596. By Albert Astals Cid

Use UbuntuColors instead of white and palette color

Doesn't make much sense using theme.palette.normal.baseText since we don't know it'll be dark,
so use UbuntuColors.jet that is the color that was being used before this branch. For the light color
use UbuntuColors.porcelain

Revision history for this message
Michael Terry (mterry) wrote :

LGTM!

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2596
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2120/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2788
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1543
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1543
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1543
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2816
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2676/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2676
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2676/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/DashPageHeader.qml'
2--- qml/Dash/DashPageHeader.qml 2016-08-03 15:51:32 +0000
3+++ qml/Dash/DashPageHeader.qml 2016-08-24 14:09:29 +0000
4@@ -18,6 +18,7 @@
5 import Ubuntu.Components 1.3
6 import Ubuntu.Components.Popups 1.3
7 import Ubuntu.Components.ListItems 1.3
8+import Utils 0.1
9 import "../Components"
10
11 Item {
12@@ -25,6 +26,7 @@
13 objectName: "pageHeader"
14 implicitHeight: headerContainer.height + signatureLineHeight
15 readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
16+ readonly property real headerDividerLuminance: Style.luminance(bottomBorder.color)
17
18 property int activeFiltersCount: 0
19 property bool scopeHasFilters: false
20
21=== modified file 'qml/Dash/GenericScopeView.qml'
22--- qml/Dash/GenericScopeView.qml 2016-08-11 06:23:42 +0000
23+++ qml/Dash/GenericScopeView.qml 2016-08-24 14:09:29 +0000
24@@ -722,6 +722,7 @@
25 target: categoryView
26
27 readonly property real contentY: categoryView.contentY - categoryView.originY
28+ readonly property real headerDividerLuminance: categoryView.pageHeader.headerDividerLuminance
29 y: -contentY - units.gu(5)
30
31 onRefresh: {
32
33=== modified file 'qml/Dash/PullToRefreshScopeStyle.qml'
34--- qml/Dash/PullToRefreshScopeStyle.qml 2016-06-07 19:22:13 +0000
35+++ qml/Dash/PullToRefreshScopeStyle.qml 2016-08-24 14:09:29 +0000
36@@ -48,6 +48,7 @@
37 anchors.horizontalCenter: parent.horizontalCenter
38 horizontalAlignment: Text.AlignHCenter
39 verticalAlignment: Text.AlignVCenter
40+ color: styledItem.headerDividerLuminance < 0.3 ? UbuntuColors.porcelain : UbuntuColors.jet
41 states: [
42 State {
43 name: "pulling"

Subscribers

People subscribed via source and target branches