evince-gesture: add support for select-and-copy via touch

Bug #674958 reported by Duncan McGreggor
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Input Framework
Won't Fix
Medium
Cody Russell

Bug Description

Use case: User selects and copies an area of the document

Link to details: http://use-case-mapper.canonical.com/specifications/0AU5sFuLRpCpBZGZra2pqY2pfMTU3MmhwbXczcWQ1/use_cases/4_5

Here are the steps defined there:
1. User taps within the boundary of the document (Initiation).
2. User immediately touches the screen following the tap. They then select the area of the document they wish to copy (Continuation).
3. User releases finger (Termination).
4. Ubuntu opens a touchpoint menu at the point of release.
5. User presses the 'copy' option.
6. Ubuntu copies the selected area of the document to the clipboard, clears the selection and closes the touchpoint menu.

Related branches

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Actually Cody, I'm going to assign this to John Lea, first. The use case isn't specific enough for an implementation.

John, I have some questions for you. Could you answer these in the ticket, and then update the use case appropriately, in the interest of clarification and explicitness?

 * In use case 4.5, is step 2 a drag?

 * If so, as the user drags, you expect immediate feedback in the form of text high-lighting, correct?

 * For step 4, do we have those menus designed somewhere? Like what they should look like?

 * Also for step 4, do we have the contents of the menu defined? Should the menu simply contain one entry, "copy"? Or did you have other menu items in mind as well? (if so, we'll need to open a new ticket for that to be done in a different branch)

Once these questions are answered, I'll reassign back to Cody.

Changed in utouch:
assignee: Cody Russell (bratsche) → John Lea (johnlea)
summary: - evince-gesture: add select-and-copy via touch
+ evince-gesture: add support for select-and-copy via touch
Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Some thoughts from John Lea on this:

"We have defined 2 fingers as generally being used to move the viewport so this will almost certainly be a two finger drag. In addition, when the most acute object is the substrate, a single finger drag will also suffice. We will also have to put some thought into detecting when a user wants to move horizontally or vertically and smoothing the movement."

description: updated
Revision history for this message
John Lea (johnlea) wrote :

Q. In use case 4.5, is step 2 a drag?
A. Yes. I have updated the spec

Q. If so, as the user drags, you expect immediate feedback in the form of text high-lighting, correct?
A. Yes. Both text high-lighting and the select 'pegs' (the two orange carets shown in the wireframe) are used to provide visual feedback.

Q. For step 4, do we have those menus designed somewhere? Like what they should look like?
A. We don't have visual designs for these menus yet, however the layout of these menus will probably follow the wireframe. There is a small possibility of the menus changing to a pie menu layout as pie menus have some advantages in a touch environment. Otto is also away on holiday until the 3rd of Jan so it will be a challenge to deliver a visual design before he gets back.

Q. Also for step 4, do we have the contents of the menu defined? Should the menu simply contain one entry, "copy"? Or did you have other menu items in mind as well? (if so, we'll need to open a new ticket for that to be done in a different branch)
A. In an environment where you can edit the text the other options on the menu would include 'Cut' and 'Paste'. In the context of the current version of Evince I cannot see any options other than "Copy" that are specifically tied to the current text selection.

Revision history for this message
Cody Russell (bratsche) wrote :

This looks like sufficient information for me to finish the implementation.

Changed in utouch:
assignee: John Lea (johnlea) → Cody Russell (bratsche)
status: New → In Progress
Revision history for this message
Cody Russell (bratsche) wrote :

Is there a way to continue previous selections? Or should there even be? For example, in Ubuntu keyboard/mouse environments you can hold down the <shift> key to modify the current selection. Do other touch environments, like iPad or whatever, have some kind of mechanism for doing this?

Revision history for this message
Duncan McGreggor (oubiwann) wrote : Re: [Bug 674958] Re: evince-gesture: add support for select-and-copy via touch

On Thu, Dec 2, 2010 at 10:54 AM, Cody Russell <email address hidden> wrote:
> Is there a way to continue previous selections?  Or should there even
> be?  For example, in Ubuntu keyboard/mouse environments you can hold
> down the <shift> key to modify the current selection.  Do other touch
> environments, like iPad or whatever, have some kind of mechanism for
> doing this?

Yes. The way the iPad does it is like this:
1) the user selects some text
2) a little "handle" appears at the end and beginning of the text
3) these handles can be dragged to increase or decrease the selection size
4) this can be hard to see/touch, so they provide a magnifying glass
effect over the touch points to make it easier

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

For that last comment, here's a capture of iBooks showing the handles I was talking about.

I don't think we need to implement something like this now, though. But please speak up if you feel differently.

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

On Thu, Dec 2, 2010 at 10:39 AM, John Lea <email address hidden> wrote:
> Q.  Also for step 4, do we have the contents of the menu defined? Should the menu simply contain one entry, "copy"? Or did you have other menu items in mind as well? (if so, we'll need to open a new ticket for that to be done in a different branch)
> A.  In an environment where you can edit the text the other options on the menu would include 'Cut' and 'Paste'.  In the context of the current version of Evince I cannot see any options other than "Copy" that are specifically tied to the current text selection.

One of the things that I have found *amazingly* useful is the ability
to perform actions on the words/selection of words in iBooks on the
iPad. I haven't used the dictionary functionality much, but I have
used the hell out of the "look up on Wikipedia" option.

So what do you think about a "Lookup..." option? Upon clicking, the
user can make a choice between the standard Ubuntu dictionary
application, Google, or Wikipedia.

Revision history for this message
John Lea (johnlea) wrote :

>So what do you think about a "Lookup..." option? Upon clicking, the
>user can make a choice between the standard Ubuntu dictionary
>application, Google, or Wikipedia.

Great idea!

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

A good start has been made here, but not finished. Cody will update the bug with a comment on what's working and what needs to be done.

Revision history for this message
Cody Russell (bratsche) wrote :

This branch should basically allow you to select text, although the begin/end positions of the selection may not be perfectly accurate so that might require a little tweaking. There is no current way to implement the requirement that an entire paragraph should be selected by doing a 3-finger tap, so that will not work.

Once the text is selected it needs to be copied to the clipboard, which means right now the user needs to either hit Ctrl-C or go to the menu and select Edit->Copy. I think we're missing some design elements to complete this part of the feature. But basically the code just needs to make a call to ev_view_copy(EvView*) to copy the text that was selected by the gesture. Or ev_view_copy() could be called at the end of ev_view_end_select() to automatically copy the text that was selected into the clipboard, but then this would deviate from the behavior that happens using a mouse.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

This is being implemented in the GTK toolkit upstream. Since we are not implementing it ourselves, I am closing this bug as won't fix.

Changed in utouch:
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.