Merge lp:~feng-kylin/unity8/TapToReturnToCall into lp:unity8

Proposed by handsome_feng
Status: Merged
Approved by: Nick Dedekind
Approved revision: 1805
Merged at revision: 1886
Proposed branch: lp:~feng-kylin/unity8/TapToReturnToCall
Merge into: lp:unity8
Diff against target: 68 lines (+21/-1)
3 files modified
qml/Panel/IndicatorsMenu.qml (+2/-1)
qml/Panel/Panel.qml (+1/-0)
tests/qmltests/Panel/tst_Panel.qml (+18/-0)
To merge this branch: bzr merge lp:~feng-kylin/unity8/TapToReturnToCall
Reviewer Review Type Date Requested Status
Nick Dedekind (community) Approve
Lukáš Tinkl (community) Needs Fixing
Review via email: mp+261461@code.launchpad.net

Commit message

Don't expand indicators when tap to return to call.

Description of the change

Don't expand indicators when tap to return to call.

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

no

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

yes
 * Did you make sure that your branch does not contain spurious tags?

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?

n/a

To post a comment you must log in.
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Looks good to me, nice work; one minor nitpick as an inline comment

review: Needs Fixing
1801. By handsome_feng

Modified the name of testing function

Revision history for this message
handsome_feng (feng-kylin) wrote :

> Looks good to me, nice work; one minor nitpick as an inline comment

Thank you for your comment! I often make mistakes in grammar. :P

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

This should only be enabled on non-touch devices. The MouseArea is a fallback for not getting touch events in the DragHandles.

If we can determine if touch is enabled, that would be best as a compound decision.
showOnClick: touchEnabled && !callHint.visible

Also, more comments attached

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

Perhaps just update the comments. we can sort out the rest later when we have more design for non-touch devices. May want open with click on "desktop mode with touch" for example.

Revision history for this message
Nick Dedekind (nick-dedekind) :
review: Needs Fixing
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

Also, can you modify your test so that is actually tests clicking on the panel doesn't open during an active call. (ie call mouseClick(...) on the panel and verify it doens't open). This tests behaviour rather than just your code changes. You're currently just testing that the area is disabled.

review: Needs Fixing
1802. By handsome_feng

merge trunk

1803. By handsome_feng

modify the test

1804. By handsome_feng

update

Revision history for this message
handsome_feng (feng-kylin) wrote :

> Also, can you modify your test so that is actually tests clicking on the panel
> doesn't open during an active call. (ie call mouseClick(...) on the panel and
> verify it doens't open). This tests behaviour rather than just your code
> changes. You're currently just testing that the area is disabled.

Done. Thank you.

1805. By handsome_feng

remove the useless objectName

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

Looks fine!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Panel/IndicatorsMenu.qml'
2--- qml/Panel/IndicatorsMenu.qml 2015-05-18 23:04:12 +0000
3+++ qml/Panel/IndicatorsMenu.qml 2015-06-29 06:21:57 +0000
4@@ -36,6 +36,7 @@
5 readonly property bool fullyClosed: unitProgress == 0
6 property bool enableHint: true
7 property bool contentEnabled: true
8+ property bool showOnClick: true
9 property color panelColor: "black"
10
11 signal showTapped(point position)
12@@ -168,7 +169,7 @@
13 anchors.left: parent.left
14 anchors.right: parent.right
15 height: minimizedPanelHeight
16- enabled: __showDragHandle.enabled
17+ enabled: __showDragHandle.enabled && showOnClick
18 onClicked: {
19 bar.selectItemAt(mouseX)
20 root.show()
21
22=== modified file 'qml/Panel/Panel.qml'
23--- qml/Panel/Panel.qml 2015-04-15 11:37:00 +0000
24+++ qml/Panel/Panel.qml 2015-06-29 06:21:57 +0000
25@@ -147,6 +147,7 @@
26 return root.width
27 }
28 enableHint: !callHint.active && !fullscreenMode
29+ showOnClick: !callHint.visible
30 panelColor: indicatorAreaBackground.color
31
32 onShowTapped: {
33
34=== modified file 'tests/qmltests/Panel/tst_Panel.qml'
35--- tests/qmltests/Panel/tst_Panel.qml 2015-04-15 11:37:00 +0000
36+++ tests/qmltests/Panel/tst_Panel.qml 2015-06-29 06:21:57 +0000
37@@ -19,6 +19,7 @@
38 import QtTest 1.0
39 import Unity.Test 0.1
40 import Ubuntu.Components 0.1
41+import Unity.Application 0.1
42 import Unity.Indicators 0.1 as Indicators
43 import Ubuntu.Telephony 0.1 as Telephony
44 import "../../../qml/Panel"
45@@ -421,6 +422,23 @@
46 verify(panel.indicators.fullyClosed);
47 }
48
49+ function test_tapToReturnCallDoesntExpandIndicators() {
50+ compare(panel.indicators.shown, false);
51+ verify(panel.indicators.fullyClosed);
52+
53+ callManager.foregroundCall = phoneCall;
54+
55+ ApplicationManager.focusApplication("unity8-dash");
56+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
57+
58+ mouseClick(panel.indicators,
59+ panel.indicators.width / 2,
60+ panel.indicators.minimizedPanelHeight / 2);
61+
62+ compare(panel.indicators.shown, false);
63+ verify(panel.indicators.fullyClosed);
64+ }
65+
66 function test_openAndClosePanelWithMouseClicks() {
67 compare(panel.indicators.shown, false);
68 verify(panel.indicators.fullyClosed);

Subscribers

People subscribed via source and target branches