Merge lp:~aacid/unity8/dashPreviewTableFixed1stColumnWidth into lp:unity8
- dashPreviewTableFixed1stColumnWidth
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Andrea Cimitan |
Approved revision: | 2666 |
Merged at revision: | 2683 |
Proposed branch: | lp:~aacid/unity8/dashPreviewTableFixed1stColumnWidth |
Merge into: | lp:unity8 |
Prerequisite: | lp:~unity-team/unity8/previews_fonts-update |
Diff against target: |
65 lines (+28/-2) 2 files modified
qml/Dash/Previews/PreviewTable.qml (+6/-1) tests/qmltests/Dash/Previews/tst_PreviewTable.qml (+22/-1) |
To merge this branch: | bzr merge lp:~aacid/unity8/dashPreviewTableFixed1stColumnWidth |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrea Cimitan (community) | Approve | ||
Unity8 CI Bot | continuous-integration | Needs Fixing | |
Review via email: mp+308499@code.launchpad.net |
This proposal supersedes a proposal from 2016-10-07.
Commit message
Fix first column of the preview table to be 25%
This way two consecutive tables have the second column start at the same X coordinate
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?
Design driven change
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
Andrea Cimitan (cimi) wrote : Posted in a previous version of this proposal | # |
http://
wondering what to do in this case...
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal | # |
Are you wondering about the "we could give more space to the first column" or "the first column wrapping looks ugly"?
Andrea Cimitan (cimi) wrote : Posted in a previous version of this proposal | # |
> Are you wondering about the "we could give more space to the first column" or
> "the first column wrapping looks ugly"?
Both issues... for the spacing between columns ok, the wrapping is tricky
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal | # |
Added a workaround for the wrapping looking bad in Qt 5.4
About "knowing we could give more space to the 1st column", it's complicated, you'd have to recalculate everything for every other table on the preview column and check how long is the second column and etc, i understood this simple solution is what we wanted?
Andrea Cimitan (cimi) wrote : Posted in a previous version of this proposal | # |
* Did you perform an exploratory manual test run of the code change and any related functionality?
y
* Did CI run pass? If not, please explain why.
y
+1 for the test summary :)
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2658
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2660. By Albert Astals Cid
-
Add a minimum height, design wants more breathing space in the table
- 2661. By Albert Astals Cid
-
less min height
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2659
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2661
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2662. By Albert Astals Cid
-
remerge
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2662
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2663. By Albert Astals Cid
-
More merging
Andrea Cimitan (cimi) : | # |
Albert Astals Cid (aacid) : | # |
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2663
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2664. By Albert Astals Cid
-
use implicitHeight for this now since we force a minimumHeight the old test was failing
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2664
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2664
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Albert Astals Cid (aacid) wrote : | # |
This seems to not be working on vivid, needs more work-arounds i guess :/
Albert Astals Cid (aacid) wrote : | # |
See how the first row of http://
- 2665. By Albert Astals Cid
-
Try to make the vivid qt happy
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2665
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2666. By Albert Astals Cid
-
Give the first column some more breathing space
Andrea Cimitan (cimi) wrote : | # |
* 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.
launcher
Preview Diff
1 | === modified file 'qml/Dash/Previews/PreviewTable.qml' |
2 | --- qml/Dash/Previews/PreviewTable.qml 2016-10-21 11:28:58 +0000 |
3 | +++ qml/Dash/Previews/PreviewTable.qml 2016-10-21 11:28:58 +0000 |
4 | @@ -77,7 +77,12 @@ |
5 | font.weight: index == 0 ? Font.Normal : Font.Light |
6 | wrapMode: Text.Wrap |
7 | Layout.alignment: Qt.AlignTop |
8 | - Layout.maximumWidth: column.width - x |
9 | + Layout.minimumHeight: Math.max(units.gu(2.75), contentHeight) // FIXME Reevaluate if we need this once we move away from Qt 5.4 |
10 | + Layout.maximumWidth: index == 0 ? column.width / 3 : column.width - x |
11 | + Layout.minimumWidth: index == 0 ? column.width / 3 : -1 |
12 | + height: -1 // FIXME Qt 5.4 needs this otherwise wrapped columns |
13 | + // get the height wrong and the next row looks weird |
14 | + // remove once we stop supporting Qt 5.4 (if 5.5 doesn't need it) |
15 | } |
16 | } |
17 | } |
18 | |
19 | === modified file 'tests/qmltests/Dash/Previews/tst_PreviewTable.qml' |
20 | --- tests/qmltests/Dash/Previews/tst_PreviewTable.qml 2015-07-15 15:07:19 +0000 |
21 | +++ tests/qmltests/Dash/Previews/tst_PreviewTable.qml 2016-10-21 11:28:58 +0000 |
22 | @@ -31,6 +31,11 @@ |
23 | "values": [ [ "Long Label 1", "Long Value 1 Long Value 2 Long Value 3 Long Value 4 Long Value 5 Long Value 6 Long Value 2 Long Value 2 Long Value 2 Long Value 2"], [ "Label 2", "Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2"], [ "Label 3", "Value 3"], [ "Label 4", "Value 4"], [ "Label 5", "Value 5"] ] |
24 | } |
25 | |
26 | + property var widgetDataComplete2: { |
27 | + "title": "Short Title here", |
28 | + "values": [ [ "Publisher/Creator", "Unity8 team" ], [ "Label A", "Long Value 1 Long Value 2 Long Value 3 Long Value 4 Long Value 5 Long Value 6 Long Value 2 Long Value 2 Long Value 2 Long Value 2"], [ "Author", "Best 3v3r"], [ "Summary", "If i knew how to write summaries i'd be working somewhere else"] ] |
29 | + } |
30 | + |
31 | property var widgetDataNoTitle: { |
32 | "values": [ [ "Long Label 1", "Long Value 1 Long Value 2 Long Value 3 Long Value 4 Long Value 5 Long Value 6 Long Value 2 Long Value 2 Long Value 2 Long Value 2"], [ "Label 2", "Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2 Long Value 2"], [ "Label 3", "Value 3"], [ "Label 4", "Value 4"], [ "Label 5", "Value 5"] ] |
33 | } |
34 | @@ -51,6 +56,22 @@ |
35 | } |
36 | } |
37 | |
38 | + PreviewWidgetFactory { |
39 | + id: previewTable2 |
40 | + anchors { left: parent.left; right: parent.right; top: previewTable.bottom; topMargin: units.gu(4) } |
41 | + widgetType: "table" |
42 | + |
43 | + Rectangle { |
44 | + color: "red" |
45 | + anchors.fill: parent |
46 | + opacity: 0.5 |
47 | + } |
48 | + |
49 | + Component.onCompleted: { |
50 | + previewTable2.widgetData = widgetDataComplete2 |
51 | + } |
52 | + } |
53 | + |
54 | UT.UnityTestCase { |
55 | name: "PreviewTableTest" |
56 | when: windowShown |
57 | @@ -62,7 +83,7 @@ |
58 | function test_label_heights() { |
59 | verify(findChild(previewTable, "label00").height == findChild(previewTable, "label10").height); |
60 | verify(findChild(previewTable, "label01").height == findChild(previewTable, "label11").height); |
61 | - verify(findChild(previewTable, "label01").height > findChild(previewTable, "label00").height * 3); |
62 | + verify(findChild(previewTable, "label01").contentHeight > findChild(previewTable, "label00").contentHeight * 3); |
63 | verify(findChild(previewTable, "label00").height == findChild(previewTable, "label20").height); |
64 | verify(findChild(previewTable, "label20").height == findChild(previewTable, "label21").height); |
65 | } |
PASSED: Continuous integration, rev:2657 /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/2340/ /unity8- jenkins. ubuntu. com/job/ build/3080 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= vivid+overlay, testname= qmluitests. sh/1726 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= xenial+ overlay, testname= qmluitests. sh/1726 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= yakkety, testname= qmluitests. sh/1726 /unity8- jenkins. ubuntu. com/job/ build-0- fetch/3108 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 2965 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 2965/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 2965 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 2965/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 2965 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 2965/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 2965 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 2965/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 2965 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 2965/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 2965 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 2965/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 2965 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 2965/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 2965 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 2965/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= yakkety/ 2965 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= yakkety/ 2965/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/2340/ rebuild
https:/