Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#1888 closed defect (fixed)

Open action in the clipboard menu not working

Reported by: Zack Owned by: tomeu
Priority: normal Milestone: Trial-2
Component: sugar Version:
Keywords: Cc: marco, eben, Zack, uwog
Blocked By: Blocking:
Deployments affected: Action Needed:
Verified: yes

Description

I was in the developer console copying tracebacks to paste into bug reports. I noticed that clipboard objects created there correctly were of the 'Text' type, and had three context menu entries: Remove, Open, Add to Journal.

Remove works, but Open and Add to Journal each do nothing.

Change History (28)

comment:1 Changed 7 years ago by tomeu

  • Owner changed from dcbw to tomeu

comment:2 Changed 7 years ago by Zack

Is this relevant?

STDERR - Traceback (most recent call last):

File "/usr/share/sugar/shell/view/clipboardicon.py", line 165, in _popup_action_cb

self._save_to_journal()

File "/usr/share/sugar/shell/view/clipboardicon.py", line 207, in _save_to_journal

os.write(f, datadata?)

KeyError: 'data'

comment:3 Changed 7 years ago by Zack

Maybe this too...

WARNING - sugar.presence.presenceservice: Unable to retrieve activity handle for dbus.String(u'd86b34839b1d76ca1af4f1dfce0bd1c60f47a36d') from presence service: org.laptop.Sugar.Presence.NotFound: Traceback (most recent call last):

File "/usr/lib/python2.5/site-packages/dbus/service.py", line 498, in _message_cb

retval = candidate_method(self, *args, keywords)

File "/usr/share/sugar-presence-service/presenceservice.py", line 569, in GetActivityById

raise NotFoundError("The activity was not found.")

NotFoundError: org.laptop.Sugar.Presence.NotFound: The activity was not found.

comment:4 Changed 7 years ago by kimquirk

  • Priority changed from normal to high

comment:5 Changed 7 years ago by jfuhrer

As of build 485, Add to Journal works. It will add an entry to the journal entitled "Clipboard selection." Open is still broken, though.

comment:6 Changed 7 years ago by tomeu

  • Summary changed from Clipboard context menu entries 'Open' and 'Add to Journal' do nothing. to Cannot open text snippets from the clipboard menu

Please open new tickets for other kinds of data.

comment:7 Changed 7 years ago by tomeu

  • Cc Eben added
  • Priority changed from high to low

"Add to journal" should be working now.

Eben, the HIG doesn't mention this "Open" action, and I think we put it there temporarily for opening pdfs and installing bundles when we didn't had the Journal yet.

Do you think it is worth implementing? or it's enough with "Copy to journal" and then "Resume" from the journal?

I'm lowering the priority as the only defect remaining provides redundant functionality.

comment:8 Changed 7 years ago by Eben

  • Priority changed from low to high
  • Summary changed from Cannot open text snippets from the clipboard menu to Missing actions in clipboard

Well, "Open" is certainly a lower priority, though I think the functionality would be quite useful. It is redundant, but it can make the process much quicker, providing it from anywhere rather than solely from the journal. Perhaps I copy an image from the web. I could then jump to the clipboard and pull up some "open with" functionality to pull it right into Draw, for instance. This is actually better than the more general "Save to Journal", since it automatically associates the object with the activity I care about.

That said, there is a much more glaring omission here. This is a visual clipboard, and yet there's no mention of a "Paste" action. This should be available whenever the current view supports pasting, and I would put this as a high priority item. We can't assume shortcuts will be learned up front, and not everyone can manage drag'n'drop operations easily.

Finally, once we have support for it, we may want some other actions such as "Send" to friend, "Print", and "Post" to bboard, but those are also low priority for now.

comment:9 Changed 7 years ago by Eben

  • Priority changed from high to low

I've separated the "Paste" action out into a new ticket #1954. This one will remain open with lower priority for the "Open" action.

comment:10 Changed 7 years ago by tomeu

  • Cc Eben removed
  • Summary changed from Missing actions in clipboard to Open action in the clipboard menu not working

comment:11 Changed 7 years ago by marco

  • Priority changed from low to normal

comment:12 Changed 7 years ago by tomeu

  • Resolution set to fixed
  • Status changed from new to closed

Pushed a fix, please test in the next image after 496.

comment:13 Changed 7 years ago by Zack

  • Resolution fixed deleted
  • Status changed from closed to reopened

Copied text to the clipboard from Write via Ctrl-C; closed Write; selected Open on the clipboard object. Nothing happens.

comment:14 Changed 7 years ago by Zack

Still broken in 502.

comment:15 follow-up: Changed 7 years ago by Zack

Should I file bugs on the fact that 'Stop Download' appears in the context menu, as does some sort of large white oval thing (possibly a nonworking text entry)?

comment:16 Changed 7 years ago by Zack

Also, Add to Journal -> Resume from Journal on a text object copied from Write opens the clip in... Web.

comment:17 in reply to: ↑ 15 Changed 7 years ago by tomeu

Replying to Zack:

Should I file bugs on the fact that 'Stop Download' appears in the context menu, as does some sort of large white oval thing (possibly a nonworking text entry)?

Yes, please open bugs about everything that looks wrong. If you are not sure if something is wrong or not (but looks confusing to you), then ask Eben after consulting the Human Interface Guidelines in the wiki.

But please please, open separate tickets for separate issues and check before there is not already a ticket about that.

comment:18 Changed 7 years ago by Zack

Will do tomeu, just getting a feel for how you like to work (I'm glad you wanted separate tickets ;)

comment:19 Changed 7 years ago by tomeu

  • Cc eben marco added

Have tested in jhbuild and Browse is opened. We have a problem here, as Write offers copied text as UTF8_STRING, STRING, text/html, TEXT, text/rtf, COMPOUND_TEXT, application/rtf, text/plain, application/xhtml+xml.

The algorithm for choosing one data type is choosing the first text/*, that in this case is text/html.

In this case choosing text/plain or application/rtf looks more appropriate, but this algorithm perhaps should not know anything about Write or abiword.

Eben, Marco: should we add a rule to the HIG or whatever that says something like "activities that offer editable text should offer text/plain and optionally application/rtf"?

comment:20 Changed 7 years ago by marco

I tend to think the simplest solution for Trial-2 is to not allow to Open clipboard objects (except downloads). It opens a particularly complicated can of worms...

comment:21 Changed 7 years ago by tomeu

  • Cc uwog added

Perhaps a fix equally simple and more effective would be for Write to not offer html targets when copying or dragging text out. What do you think, Marc?

And also note that we have this exact problem when copying clipboard items to the journal (we have to choose one target as the most significant one).

comment:22 Changed 7 years ago by marco

I'm not sure that's the right solution and it's probably an invasive change.
Favoring rtf over html in the algo might make sense though.

comment:23 Changed 7 years ago by tomeu

  • Resolution set to fixed
  • Status changed from reopened to closed

We have lowered the priority for text/plain and text/html, so it chooses now the right format. Will be in after 511.

Note that you'll have to close the first instance of Write before trying to open it due to #2176.

comment:24 Changed 7 years ago by Zack

  • Resolution fixed deleted
  • Status changed from closed to reopened

This isn't working even if I close Write before attempting to Open, in 514.

comment:25 Changed 7 years ago by tomeu

  • Resolution set to fixed
  • Status changed from reopened to closed

It just worked for me in 526.

comment:26 Changed 7 years ago by coderanger

Adding reporter to CC list

comment:27 Changed 7 years ago by coderanger

  • Cc Zack added

Adding reporter to CC list

comment:28 Changed 7 years ago by Zack

  • Verified set
Note: See TracTickets for help on using tickets.