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
=== modified file 'qml/Panel/IndicatorsMenu.qml'
--- qml/Panel/IndicatorsMenu.qml 2015-05-18 23:04:12 +0000
+++ qml/Panel/IndicatorsMenu.qml 2015-06-29 06:21:57 +0000
@@ -36,6 +36,7 @@
36 readonly property bool fullyClosed: unitProgress == 036 readonly property bool fullyClosed: unitProgress == 0
37 property bool enableHint: true37 property bool enableHint: true
38 property bool contentEnabled: true38 property bool contentEnabled: true
39 property bool showOnClick: true
39 property color panelColor: "black"40 property color panelColor: "black"
4041
41 signal showTapped(point position)42 signal showTapped(point position)
@@ -168,7 +169,7 @@
168 anchors.left: parent.left169 anchors.left: parent.left
169 anchors.right: parent.right170 anchors.right: parent.right
170 height: minimizedPanelHeight171 height: minimizedPanelHeight
171 enabled: __showDragHandle.enabled172 enabled: __showDragHandle.enabled && showOnClick
172 onClicked: {173 onClicked: {
173 bar.selectItemAt(mouseX)174 bar.selectItemAt(mouseX)
174 root.show()175 root.show()
175176
=== modified file 'qml/Panel/Panel.qml'
--- qml/Panel/Panel.qml 2015-04-15 11:37:00 +0000
+++ qml/Panel/Panel.qml 2015-06-29 06:21:57 +0000
@@ -147,6 +147,7 @@
147 return root.width147 return root.width
148 }148 }
149 enableHint: !callHint.active && !fullscreenMode149 enableHint: !callHint.active && !fullscreenMode
150 showOnClick: !callHint.visible
150 panelColor: indicatorAreaBackground.color151 panelColor: indicatorAreaBackground.color
151152
152 onShowTapped: {153 onShowTapped: {
153154
=== modified file 'tests/qmltests/Panel/tst_Panel.qml'
--- tests/qmltests/Panel/tst_Panel.qml 2015-04-15 11:37:00 +0000
+++ tests/qmltests/Panel/tst_Panel.qml 2015-06-29 06:21:57 +0000
@@ -19,6 +19,7 @@
19import QtTest 1.019import QtTest 1.0
20import Unity.Test 0.120import Unity.Test 0.1
21import Ubuntu.Components 0.121import Ubuntu.Components 0.1
22import Unity.Application 0.1
22import Unity.Indicators 0.1 as Indicators23import Unity.Indicators 0.1 as Indicators
23import Ubuntu.Telephony 0.1 as Telephony24import Ubuntu.Telephony 0.1 as Telephony
24import "../../../qml/Panel"25import "../../../qml/Panel"
@@ -421,6 +422,23 @@
421 verify(panel.indicators.fullyClosed);422 verify(panel.indicators.fullyClosed);
422 }423 }
423424
425 function test_tapToReturnCallDoesntExpandIndicators() {
426 compare(panel.indicators.shown, false);
427 verify(panel.indicators.fullyClosed);
428
429 callManager.foregroundCall = phoneCall;
430
431 ApplicationManager.focusApplication("unity8-dash");
432 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
433
434 mouseClick(panel.indicators,
435 panel.indicators.width / 2,
436 panel.indicators.minimizedPanelHeight / 2);
437
438 compare(panel.indicators.shown, false);
439 verify(panel.indicators.fullyClosed);
440 }
441
424 function test_openAndClosePanelWithMouseClicks() {442 function test_openAndClosePanelWithMouseClicks() {
425 compare(panel.indicators.shown, false);443 compare(panel.indicators.shown, false);
426 verify(panel.indicators.fullyClosed);444 verify(panel.indicators.fullyClosed);

Subscribers

People subscribed via source and target branches