Merge lp://staging/~zsombi/ubuntu-ui-toolkit/textinput-text-selection into lp://staging/ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri
Status: Superseded
Proposed branch: lp://staging/~zsombi/ubuntu-ui-toolkit/textinput-text-selection
Merge into: lp://staging/ubuntu-ui-toolkit/staging
Prerequisite: lp://staging/~zsombi/ubuntu-ui-toolkit/ubuntutestcase-extras
Diff against target: 3993 lines (+2093/-704)
25 files modified
components.api (+8/-2)
modules/Ubuntu/Components/InputHandler.qml (+315/-0)
modules/Ubuntu/Components/Pickers/Dialer.qml (+1/-1)
modules/Ubuntu/Components/Pickers/DialerHand.qml (+1/-1)
modules/Ubuntu/Components/Pickers/DialerHandGroup.qml (+1/-1)
modules/Ubuntu/Components/Pickers/PickerDelegate.qml (+1/-1)
modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml (+1/-1)
modules/Ubuntu/Components/TextArea.qml (+49/-129)
modules/Ubuntu/Components/TextField.qml (+80/-133)
modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml (+5/-5)
modules/Ubuntu/Components/plugin/plugin.cpp (+3/-0)
modules/Ubuntu/Components/plugin/ucmouse.h (+52/-11)
modules/Ubuntu/Components/plugin/ucmousefilters.cpp (+220/-84)
modules/Ubuntu/Components/qmldir (+1/-0)
modules/Ubuntu/Test/UbuntuTestCase.qml (+2/-0)
tests/resources/inputs/TextInputs.qml (+85/-0)
tests/unit_x11/tst_components/tst_textarea.qml (+320/-60)
tests/unit_x11/tst_components/tst_textarea_in_flickable.qml (+61/-37)
tests/unit_x11/tst_components/tst_textfield.qml (+314/-63)
tests/unit_x11/tst_mousefilters/ForwardComposedEvents.qml (+55/-0)
tests/unit_x11/tst_mousefilters/ForwardEventChained.qml (+51/-0)
tests/unit_x11/tst_mousefilters/HoverEvent.qml (+38/-0)
tests/unit_x11/tst_mousefilters/HoverEvent.qml.moved (+38/-0)
tests/unit_x11/tst_mousefilters/tst_mousefilters.pro (+4/-1)
tests/unit_x11/tst_mousefilters/tst_mousefilterstest.cpp (+387/-174)
To merge this branch: bzr merge lp://staging/~zsombi/ubuntu-ui-toolkit/textinput-text-selection
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Cris Dywan Approve
Review via email: mp+214928@code.staging.launchpad.net

This proposal supersedes a proposal from 2014-04-03.

This proposal has been superseded by a proposal from 2014-04-15.

Commit message

Fixes TextField and TextArea selection and scrolling behaviors.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote : Posted in a previous version of this proposal

I see the same test failure here as J locally.
> tests/unit_x11/tst_components/tst_textarea_in_flickable.qml(72)
> tryCompare(moveSpy, "count", 1, 200);
Why not moveSpy.wait(); here? That seems to fix it for me.

When using select and context menu a few times it's possible to change the selection after the menu opens but before letting go of the mouse button. So I don't get what I selected or worst case nothing.

What I manually checked is that I can select, including scrolling, get a menu, copy, paste and so on, double click to select a word, all of these seem sold aside from the above issue.

FTR toggleFlickablesInteractive looks rather hackish… I guess Repeater doesn't support it, and PropertyChanges doesn't take a list either… but let's have it as-is for now.

Should maybe selectionTimeout.interval be added to modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml:31

test_press_and_hold_over_selected_text etc. doesn't test the context menu. Especially given the above problem I found while using it, I think we need to test that it can be clicked and catches the right text. Possibly AP.

review: Needs Fixing
Revision history for this message
Zsombor Egri (zsombi) wrote : Posted in a previous version of this proposal

> I see the same test failure here as J locally.
> > tests/unit_x11/tst_components/tst_textarea_in_flickable.qml(72)
> > tryCompare(moveSpy, "count", 1, 200);
> Why not moveSpy.wait(); here? That seems to fix it for me.

Ahh, right :) I'll fix it.

>
> When using select and context menu a few times it's possible to change the
> selection after the menu opens but before letting go of the mouse button. So I
> don't get what I selected or worst case nothing.

Let's do this in a separate branch..

>
> What I manually checked is that I can select, including scrolling, get a menu,
> copy, paste and so on, double click to select a word, all of these seem sold
> aside from the above issue.
>
> FTR toggleFlickablesInteractive looks rather hackish… I guess Repeater doesn't
> support it, and PropertyChanges doesn't take a list either… but let's have it
> as-is for now.

Well, limitation of PropertyChange, maybe we propose some Change component upstream to deal with a list of targets :).

>
> Should maybe selectionTimeout.interval be added to
> modules/Ubuntu/Components/Themes/Ambiance/TextCursorStyle.qml:31

I will put this in the TextFieldStyle/TextAreaStyle components rather than the cursor style.

>
> test_press_and_hold_over_selected_text etc. doesn't test the context menu.
> Especially given the above problem I found while using it, I think we need to
> test that it can be clicked and catches the right text. Possibly AP.

Yep, but let's get this in a separate branch as well.

Revision history for this message
Cris Dywan (kalikiana) wrote : Posted in a previous version of this proposal

Filed bug 1304952 for testing the context menu.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1012
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/3/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/162
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4721
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-amd64-ci/3
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/3
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/3/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-i386-ci/3
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/155
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4304
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4304/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5875
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4074
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4850
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4850/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/3/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1014
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/5/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/166
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4728
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-amd64-ci/5
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/5
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/5/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-i386-ci/5
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/159
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4311
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4311/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5883
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4081
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4857
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4857/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/5/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

The menu now stays in place the way it should. Nice!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1015
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/10/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/174
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4738
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-amd64-ci/10
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/10
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/10/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-i386-ci/10
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/167
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4321
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4321/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5893
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4091
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4867
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4867/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/10/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-autolanding/3/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/178
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4744
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-amd64-autolanding/3
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-autolanding/3
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-autolanding/3/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-i386-autolanding/3
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/171
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4327
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4327/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5899
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4096
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4873
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4873/artifact/work/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
1016. By Zsombor Egri

intermediate steps

1017. By Zsombor Egri

prerequisite merge

1018. By Zsombor Egri

TextArea test fixes

1019. By Zsombor Egri

prerequisite merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1020. By Zsombor Egri

prereq merge

1021. By Zsombor Egri

cleanup

1022. By Zsombor Egri

more cleanup

1023. By Zsombor Egri

staging merge

1024. By Zsombor Egri

staging merge

1025. By Zsombor Egri

replace flick() with mouseDrag()

1026. By Zsombor Egri

change flick() with mouseDrag()

1027. By Zsombor Egri

versioning merge

1028. By Zsombor Egri

tests reworked for tst_textarea_in_flickable.qml

1029. By Zsombor Egri

staging merge

1030. By Zsombor Egri

staging merge

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches