Merge lp://staging/~unity-2d-team/unity-2d/shortcut-hint-overlay into lp://staging/unity-2d

Proposed by Lohith D Shivamurthy
Status: Rejected
Rejected by: Albert Astals Cid
Proposed branch: lp://staging/~unity-2d-team/unity-2d/shortcut-hint-overlay
Merge into: lp://staging/unity-2d
Diff against target: 657 lines (+572/-0)
8 files modified
debian/unity-2d-shell.install.in (+1/-0)
shell/Shell.qml (+34/-0)
shell/app/shellmanager.cpp (+11/-0)
shell/app/shellmanager.h (+3/-0)
shell/shortcutoverlay/ModelElement.qml (+26/-0)
shell/shortcutoverlay/ShortcutHint.qml (+243/-0)
shell/shortcutoverlay/ShortcutHintSection.qml (+165/-0)
tests/shell/shortcut-hint-overlay-tests.rb (+89/-0)
To merge this branch: bzr merge lp://staging/~unity-2d-team/unity-2d/shortcut-hint-overlay
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Needs Fixing
Michał Sawicz Needs Information
Florian Boucault (community) Needs Fixing
Gerry Boland Pending
Review via email: mp+92747@code.staging.launchpad.net

This proposal supersedes a proposal from 2012-02-01.

Description of the change

[launcher] Shortcut list should be shown while super key is held.

To post a comment you must log in.
Revision history for this message
Lohith D Shivamurthy (dyams) wrote : Posted in a previous version of this proposal

Further details:
The List of keys to be displayed and the layout of the overlay can be found in the bug description https://bugs.launchpad.net/unity-2d/+bug/855532
It is discussed with the design team, that certain keys having multiple values in gconf, like 'Switch workspaces' should only be displayed when the keys are symmetric.

Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

u2d.tr(description) won't work since the text of the description won't be extracted by the update-unity-2d-pot script, the same for the title. And since the won't be in the .po file they won't be translatable. You'll have to move the u2d.tr to were you have the actual "text" so the text is extracted.

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote : Posted in a previous version of this proposal

Of course, we won't merge that until unity-2d-shell is merged into lp:unity-2d.

Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Please give credit to Tiago in the commit message, for working on the UI side of this MR.

Revision history for this message
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal

Hey, this looks like it could go into lp:unity-2d with minor modifications, and will reduce the diff when we actually go to merging shell into trunk, could you please have a MR against lp:unity-2d for this?

review: Needs Information
Revision history for this message
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal

> Hey, this looks like it could go into lp:unity-2d with minor modifications,
> and will reduce the diff when we actually go to merging shell into trunk,
> could you please have a MR against lp:unity-2d for this?

Actually that might not be worth it, since you don't have any fullscreen part of the UI with unity-2d, you'd have to hack up the dash to go fullscreen when the hint is supposed to show.

In that case I propose that we wait with merging this for the shell to be merged into trunk and then MR that change against trunk.

Revision history for this message
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal

The overlay needs to have a blurred background, it's unreadable when you have a terminal window behind it.

Also, I wonder if the overlay should be input-shaped? Right now you can interact with windows behind the overlay, which makes sense, for it being just an overlay, but not sure that's the designed behavior.

review: Needs Fixing
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Looks nice! Aside from above comments:
- along with blurred background, the sheen is also needed. See Background.qml
- background has unusual colour tint set. We don't have tinting just now, so should be removed.
- shell/Shell.qml - why remove "KeyNavigation.left: launcherLoader" ?
- in symmetricKey() and getShortcutKey(), GConfItem declared in Unity2D, no need to import QtQuick
- in your javascript, your notation is mixing camelCase and underscore_separator. Use camelCase please. Some spacing between arguments in the function calls would help readability too.
- symmetricKey deserves a comment to explain why it is there.
- can you check with design about using empty strings if no key is set? I think it looks confusing.
- I have a truncation for a long key combination: https://imgur.com/a/okLFf can you also check with design to see what to do?
- overlay needs to be positioned a little higher, see comparison image: https://imgur.com/xqAVf
- there are typos, and some EnglishUK spellings instead of US (see first screenshot again). Yes they're in the mockup, but check with design
- in "Switching" - the left/right cursor keys do not move focus in Metacity. Is this something that needs to be enabled, or should this listing be removed?
- Alt+Middle Mouse drag also doesn't work for me.
- Please use fontUtils.js to specify font sizes
- you have unrelated changes from tests/run-tests.rb & tests/shell/input_shaping.rb in the diff, please remove.
- recently we decided having authors names in text files was going to be a pain, so we removed them. Will you do the same?
- have you given any thought to accessibility? How will this work with Orca? Since focus is not stolen, what will Orca do? Will it be possible to have Orca read out these shortcuts in some way? Just something to think about.
- import Unity2d 1.0 /* required by GConfItem */ <- GConfItem requires Unity2D, not other way around
- qml (I know, Tiago's) could be cleaned up a little, with both x,y coordinates & anchors being used, lots of unnecessary margin:0 scattered about for example.

review: Needs Fixing
Revision history for this message
Lohith D Shivamurthy (dyams) wrote : Posted in a previous version of this proposal

> The overlay needs to have a blurred background, it's unreadable when you have
> a terminal window behind it.
>
I checked with design and have done what they said.

> Also, I wonder if the overlay should be input-shaped? Right now you can
> interact with windows behind the overlay, which makes sense, for it being just
> an overlay, but not sure that's the designed behavior.
Yes you can interact with windows behind it.

Revision history for this message
Lohith D Shivamurthy (dyams) wrote : Posted in a previous version of this proposal

> Looks nice! Aside from above comments:
> - along with blurred background, the sheen is also needed. See Background.qml
> - background has unusual colour tint set. We don't have tinting just now, so
> should be removed.
I checked with design, this is the conversation:
dyams rosie: should we need to have a background for overlay hint?
dyams rosie: if the overlay is displayed on a white background for ex: gedit window, the shortcuts are hardly visible
rosie dyams: there is a 35% #5e2750 layer and a -80% (-150% - 150%) brightness layer

> - shell/Shell.qml - why remove "KeyNavigation.left: launcherLoader" ?
The only difference i see in Shell.qml is
30 + Loader {
31 + id: shortcutHintLoader
32 + anchors.centerIn: parent
33 + }
34 +

> - in symmetricKey() and getShortcutKey(), GConfItem declared in Unity2D, no
> need to import QtQuick
Are you sure? FYI, i get this '[WARNING] ShortcutHint.qml:22:1: Item is not a type'
> - in your javascript, your notation is mixing camelCase and
> underscore_separator. Use camelCase please. Some spacing between arguments in
> the function calls would help readability too.
> - symmetricKey deserves a comment to explain why it is there.
Done.
> - can you check with design about using empty strings if no key is set? I
> think it looks confusing.
true, but its design decision.

> - I have a truncation for a long key combination: https://imgur.com/a/okLFf
> can you also check with design to see what to do?
Design changed a bit, I have updated the same.

> - overlay needs to be positioned a little higher, see comparison image:
> https://imgur.com/xqAVf
It is positioned to the center. I doubt we need to adjust it again.

> - there are typos, and some EnglishUK spellings instead of US (see first
> screenshot again). Yes they're in the mockup, but check with design
Done

> - in "Switching" - the left/right cursor keys do not move focus in Metacity.
> Is this something that needs to be enabled, or should this listing be removed?
No, It works

> - Alt+Middle Mouse drag also doesn't work for me.
No, It works

> - Please use fontUtils.js to specify font sizes
Done.

> - you have unrelated changes from tests/run-tests.rb &
> tests/shell/input_shaping.rb in the diff, please remove.
Is it? but they are not listed under the 'differences' here.

> - recently we decided having authors names in text files was going to be a
> pain, so we removed them. Will you do the same?
Done.

> - have you given any thought to accessibility? How will this work with Orca?
> Since focus is not stolen, what will Orca do? Will it be possible to have Orca
> read out these shortcuts in some way? Just something to think about.
No.

> - import Unity2d 1.0 /* required by GConfItem */ <- GConfItem requires
> Unity2D, not other way around
Yes I know.

> - qml (I know, Tiago's) could be cleaned up a little, with both x,y
> coordinates & anchors being used, lots of unnecessary margin:0 scattered about
> for example.
Done.

Revision history for this message
Florian Boucault (fboucault) wrote : Posted in a previous version of this proposal

Please resubmit the MR against lp:unity-2d

Revision history for this message
Florian Boucault (fboucault) wrote : Posted in a previous version of this proposal

Maybe I am out of line here but I don't see how the overlay belongs to the launcher.

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

No need to expose GConfItem through our plugin, just:

import gconf 1.0

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

The shortcut overlay needs a blurred background, per design

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

The borders are wrong, they look like a small image stretched

Revision history for this message
Florian Boucault (fboucault) wrote :

shell/launcher/LauncherLoader.qml refers to declarativeView.dashActive which should never be done from QML. Use Dash.qml's dash.active instead

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

shell/launcher/LauncherLoader.qml refers to shortcutHintLoader which is not defined anywhere in shell/launcher/LauncherLoader.qml; that is bad practice that breaks encapsulation (ie. shell/launcher/LauncherLoader.qml cannot be run on its own)

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

Why giving a different:
- file name: ShortcutHint.qml
- id: main
- and objectName: "shortcutHintOverlay"
to the same thing?

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

Why is it not part of the png for the border?

    Rectangle {
        id: totalArea
        color: Qt.lighter("#5e275023", -0.8)
        radius: 8
        smooth: true
        anchors.fill: parent
        anchors.margins: 10

Where is that color coming from?

Revision history for this message
Florian Boucault (fboucault) wrote :

Please use TextCustom and its fontSize property instead of Text.

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

Is the interface translatable? Did you act on Albert's comment:

"u2d.tr(description) won't work since the text of the description won't be extracted by the update-unity-2d-pot script, the same for the title. And since the won't be in the .po file they won't be translatable. You'll have to move the u2d.tr to were you have the actual "text" so the text is extracted."

review: Needs Fixing
965. By Lohith D Shivamurthy

Directly import gconf 0.1

966. By Lohith D Shivamurthy

keep object id same as objectname

967. By Lohith D Shivamurthy

Add a FIXME for i18n of display strings

968. By Lohith D Shivamurthy

Remove background color

969. By Lohith D Shivamurthy

Use TextCustom instead of Text element

970. By Lohith D Shivamurthy

Fix missing parent object

971. By Lohith D Shivamurthy

Apply blur background

972. By Lohith D Shivamurthy

Activate/Deactivate overlay in shell.qml

973. By Lohith D Shivamurthy

Deactivate the overlay on tapping launcher tile shortcuts

Revision history for this message
Albert Astals Cid (aacid) wrote :

I don't think having untranslatable strings is acceptable.

If we can't have
ListElement { defaultKey: "Super (Press)"; description: u2d.tr("Open Launcher, displays shortcuts."); gconfKey: "" }
because of that Qt bug i suggest we do this

Switch can to using
text: u2d.tr(description)
and then add somewhere in the file
    function dummyFunction() {
        u2d.tr("Open Launcher, displays shortcuts.")
        ...
        ...
    }
This way we trick po/update-unity-2d-pot to extract the descriptions into the .pot file and things are translatable again

review: Needs Fixing
974. By Lohith D Shivamurthy

Add a dummy function and call u2d.tr on all display strings

Revision history for this message
Albert Astals Cid (aacid) wrote :

I'm happy enough with the translation stuff, i'll let Florian decided if his other concerns are fixed

Revision history for this message
Michał Sawicz (saviq) wrote :

Wouldn't http://developer.qt.nokia.com/doc/qt-4.8/qml-item.html#data-prop be a good place to have those translation strings?

review: Needs Information
975. By Lohith D Shivamurthy

Improve background

976. By Lohith D Shivamurthy

Use workaround mentioned in the bugreport

977. By Lohith D Shivamurthy

Use regExp to replace case-insensitively

978. By Lohith D Shivamurthy

Replace Shft with Shift

979. By Lohith D Shivamurthy

Add missing file ModelElement.qml

980. By Lohith D Shivamurthy

merge

981. By Lohith D Shivamurthy

Remove extra field from ModelElement.qml

982. By Lohith D Shivamurthy

deactivate overlay when view looses focus

983. By Lohith D Shivamurthy

Apply black background with 70% opacity

984. By Tiago Salem Herrmann

merge trunk

985. By Tiago Salem Herrmann

onSuperKeyHeldChanged was moved to shellManager

986. By Tiago Salem Herrmann

remove debug

987. By Tiago Salem Herrmann

Force string object for the key. In some cases key is a object so replace() and substring fail

988. By Tiago Salem Herrmann

fix white spaces

989. By Tiago Salem Herrmann

ignore <Primary> string

990. By Tiago Salem Herrmann

merge trunk

991. By Tiago Salem Herrmann

add MultiMonitor support
Use the same trick as Dash to update the blurred background

992. By Gerry Boland

Replace 'KP_' with 'Num' in gconf string. Needed for Numpad keys

993. By Gerry Boland

QtQuick1.0 not needed to read gconf values

994. By Gerry Boland

Add basic RTL support

995. By Gerry Boland

[debian] Install shortcut overlay QML files

Revision history for this message
Albert Astals Cid (aacid) wrote :

The "Alt (Tap) shows HUD" is missing

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

The focus is not returned to the previous app once the super key is released

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

the onDashActiveChanged code for declarativeView is wrong and needs to be merged with the existing onDashActiveChanged for the shellManager

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

Key descriptions (e.g. "Cursors Keys") need to be translatable

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

symmetricKey also needs i18n work, it prepends "Cursors" in some cases

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

Don't we need

install(DIRECTORY shortcutoverlay
    DESTINATION ${UNITY_2D_DIR}/shell
    )

in shell/CMakelists.txt?

review: Needs Fixing

Unmerged revisions

995. By Gerry Boland

[debian] Install shortcut overlay QML files

994. By Gerry Boland

Add basic RTL support

993. By Gerry Boland

QtQuick1.0 not needed to read gconf values

992. By Gerry Boland

Replace 'KP_' with 'Num' in gconf string. Needed for Numpad keys

991. By Tiago Salem Herrmann

add MultiMonitor support
Use the same trick as Dash to update the blurred background

990. By Tiago Salem Herrmann

merge trunk

989. By Tiago Salem Herrmann

ignore <Primary> string

988. By Tiago Salem Herrmann

fix white spaces

987. By Tiago Salem Herrmann

Force string object for the key. In some cases key is a object so replace() and substring fail

986. By Tiago Salem Herrmann

remove debug

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