Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#365 closed defect (fixed)

Exposing shortcut for view source in the UI

Reported by: erikos Owned by: eben
Priority: Unspecified by Maintainer Milestone:
Component: design Version: 0.83.x
Severity: Blocker Keywords: r+
Cc: garycmartin, tomeu Distribution/OS: Unspecified
Bug Status: Resolved

Description

We need to exposing shortcut for view source in the UI. One idea was the activity toolbar - but that is a bit crowded already. So Tomeu had the idea to add it to the activity palette in the frame.

Currently we are only able to show the source of an activity so for the moment having it in the palette would be enough.

Use Case: You are in an activity and want to show the source: Reveal frame and hit the show source menu item

How does that sound?

Attachments (1)

view_source.png (14.1 KB) - added by erikos 12 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 12 years ago by eben

Yes, the activity palette is a logical place, for sure. The activity toolbar, of course, is another. I think that both are appropriate, and we should probably deal with the activity toolbar at some point.

Most importantly, the sharing controls take up a lot of space, and aren't really intuitive anyway. The reason that a popup menu like this was used is because in the early days Ivan wanted the system to draw up the popup menu, instead of the activity, to keep the sharing action secure. I think we would likely be better off with a share palette-button which reveals a palette containing the sharing options.

comment:2 Changed 12 years ago by erikos

Exposing it in the activity palette has following issues:

The design part:

  • open activity a and activity b
  • while activity b is open use the view source option in the palette of activity a
  • should activity a be resumed and the view source alert be displayed?

Technical part:

def __view_source__cb(self, menu_item):
    import globalkey.viewsource
    globalkey.viewsource.handle_key_press('')

I can not import in the palette module directly. Not sure which is the right thing to do.

comment:3 Changed 12 years ago by erikos

  • Bug Status changed from Unconfimed to Assigned
  • Version changed from Unspecified to 0.83.x

Changed 12 years ago by erikos

comment:4 Changed 12 years ago by erikos

  • Keywords r? added
  • Severity changed from Critical to Blocker

Is the above screenshot what we want? Or only icon and shortcut?

comment:5 follow-up: Changed 12 years ago by eben

Including the accelerator is fine, but that doesn't look to spec. The accel should be right aligned, distinctly separate from the title. Also, they are supposed to use open and closed diamonds for alt/ctrl (to match the keyboard), which will look much better and consume much less space.

Also, please remove the separator between resume and view source. The separator between these functions and the stop item is because the stop item is a destructive action, and needs to be kept distinct. We should also have items for keep and share in the palette too, and now that we're adding view source it's a good time to get them up to spec.

Finally, the source window should be modal to the activity. Selecting view source for an activity which isn't currently shown should first focus that activity window, so the source is seen in the context of the correct activity.

comment:6 follow-up: Changed 12 years ago by garycmartin

Kind'a scary that this is exposed so highly in the UI (I almost want to suggest removing 'resume' as it's redundant UI as the price of adding another menu item), but I'll be brave and hope it's a Good Thing (TM) ;-) Only minor/trivial comment would be does the keyboard shortcut change to "Fn + SPACE" for XO users? :-p

comment:7 in reply to: ↑ 5 Changed 12 years ago by erikos

Replying to eben:

Including the accelerator is fine, but that doesn't look to spec.

Which exact spec? Can you point me to a mockup? Also is i was not sure about the parentheses. I guess a spec or mockup would be best.

The accel should be right aligned, distinctly separate from the title. Also, they are supposed to use open and closed diamonds for alt/ctrl (to match the keyboard), which will look much better and consume much less space.

The diamonds have only seen on the XO keyboard so far. Is this something that is generally used as a symbol?

Also, please remove the separator between resume and view source. The separator between these functions and the stop item is because the stop item is a destructive action, and needs to be kept distinct. We should also have items for keep and share in the palette too, and now that we're adding view source it's a good time to get them up to spec.

Ohh, ok - removed the separator.

Finally, the source window should be modal to the activity. Selecting view source for an activity which isn't currently shown should first focus that activity window, so the source is seen in the context of the correct activity.

Yup, it makes sense.

comment:8 in reply to: ↑ 6 Changed 12 years ago by erikos

Replying to garycmartin:

Kind'a scary that this is exposed so highly in the UI (I almost want to suggest removing 'resume' as it's redundant UI as the price of adding another menu item), but I'll be brave and hope it's a Good Thing (TM) ;-)

So, the only other place we can put it is the activity toolbar. But as this is already crowded, we thought to put it here. Re resume: I think it is good to have redundancy in the UI to some extent, since different users are looking for different ways to do things.

Only minor/trivial comment would be does the keyboard shortcut change to "Fn + SPACE" for XO users? :-p

It would be good to have some easy way to add shortcuts by different users or distributions. AFAIK that is not there yet. It can be easily done by patching http://git.sugarlabs.org/projects/sugar/repos/mainline/blobs/master/extensions/globalkey/viewsource.py though.

comment:9 Changed 12 years ago by erikos

  • Bug Status changed from Assigned to Resolved
  • Keywords r+ added; r? removed
  • Resolution set to fixed
  • Status changed from new to closed

That got into 0.83.7

comment:10 Changed 8 years ago by godiard

  • Milestone 0.84 deleted

Milestone 0.84 deleted

Note: See TracTickets for help on using tickets.