Merge lp:~gary-wzl77/unity8/interactive_property into lp:unity8

Proposed by Gary.Wang
Status: Work in progress
Proposed branch: lp:~gary-wzl77/unity8/interactive_property
Merge into: lp:unity8
Diff against target: 67 lines (+17/-1)
2 files modified
qml/Dash/Previews/PreviewImageGallery.qml (+9/-1)
qml/Dash/Previews/PreviewZoomableImage.qml (+8/-0)
To merge this branch: bzr merge lp:~gary-wzl77/unity8/interactive_property
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Needs Information
Review via email: mp+266732@code.launchpad.net

Commit message

Add widgetData["interactive"] property for image and gallery widgets.

Define widgetData["interactive"] property to make it possible to disable image and gallery popup up overlay/slideview when clicking.

Description of the change

* Are there any related MPs required for this MP to build/function as expected? Please list.
  No related MPs for this MP.
* Did you perform an exploratory manual test run of your code change and any related functionality?
  Yes, I do.
* Did you make sure that your branch does not contain spurious tags?
  No spurious tags.
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
  No packaging changed.
* If you changed the UI, has there been a design review?
  No UI changed.

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

Hi there, what's the rationale for this?

It will confuse our users that will try to tap on the image to make it bigger and will think they found a bug.

What's the benefit of merging this?

review: Needs Information
Revision history for this message
Gary.Wang (gary-wzl77) wrote :

Personally, I think it doesn't make scene in most cases.
To take a trivial instance, weather scope. When user enter preview page,
clicking a thumbnail looks weird since there is no more detailed info user
can get when overlay layer popups.
In some practical cases, server only give us a low resolution image, so
clicking it to popup overlay layer looks terrible(image scaling) in that
case.

I think there's two cases for overlay display.
1.If image itself is big image(high-resolution), e.g photo scope. That
makes scene since user can check more details in overlay layer by
pinch/zoom-in/zoom-out.
2.showing low-resolution image in preview page and loading high-resolution
image when overlay layer popup looks more reasonable, however we can't make
sure there is always a high-resolution image url returned from server API.
It depends.

Basically I think there's no harm to add a property for this since we
didn't disable it to make it bigger to display.Developer can adjust bigger
image display in different scenario.

On Tue, Aug 4, 2015 at 10:26 PM, Albert Astals Cid <
<email address hidden>> wrote:

> Review: Needs Information
>
> Hi there, what's the rationale for this?
>
> It will confuse our users that will try to tap on the image to make it
> bigger and will think they found a bug.
>
> What's the benefit of merging this?
> --
>
> https://code.launchpad.net/~gary-wzl77/unity8/interactive_property/+merge/266732
> You are the owner of lp:~gary-wzl77/unity8/interactive_property.
>

--
Br
Gary.Wzl

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

I've passed your comments through design, they see your point but are also potentially scared of inconsistencies, they'll come back to us with a decision on this "soon".

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

I've opened a bug at https://bugs.launchpad.net/ubuntu-ux/+bug/1486071 and will set this to work in progress for the moment to clear the queue

Unmerged revisions

1900. By Gary.Wang

Add widgetData["interactive"] property for image and gallery widgets.

Define widgetData["interactive"] property to make it possible to
disable image and gallery popup up overlay/slideview when clicking.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/Dash/Previews/PreviewImageGallery.qml'
--- qml/Dash/Previews/PreviewImageGallery.qml 2015-05-06 15:05:06 +0000
+++ qml/Dash/Previews/PreviewImageGallery.qml 2015-08-03 14:36:27 +0000
@@ -20,7 +20,10 @@
2020
21/*! This preview widget shows a horizontal list of images.21/*! This preview widget shows a horizontal list of images.
22 * The URIs for the images should be an array in widgetData["sources"].22 * The URIs for the images should be an array in widgetData["sources"].
23 * Images fall back to widgetData["fallback"] if loading fails23 * Images fall back to widgetData["fallback"] if loading fails.
24 *
25 * It will popup a slideview when widgetData["interactive"] == true
26 * and it's enabled by default.
24 */27 */
2528
26PreviewWidget {29PreviewWidget {
@@ -29,6 +32,9 @@
2932
30 property Item rootItem: QuickUtils.rootItem(root)33 property Item rootItem: QuickUtils.rootItem(root)
3134
35 property bool interactive: root.widgetData["interactive"] === undefined ?
36 true: root.widgetData["interactive"];
37
32 ListView {38 ListView {
33 id: previewImageListView39 id: previewImageListView
34 objectName: "previewImageListView"40 objectName: "previewImageListView"
@@ -67,6 +73,8 @@
67 MouseArea {73 MouseArea {
68 id: mouseArea74 id: mouseArea
69 anchors.fill: parent75 anchors.fill: parent
76 enabled: root.interactive;
77
70 onClicked: {78 onClicked: {
71 previewImageListView.currentIndex = index;79 previewImageListView.currentIndex = index;
72 overlay.updateInitialItem();80 overlay.updateInitialItem();
7381
=== modified file 'qml/Dash/Previews/PreviewZoomableImage.qml'
--- qml/Dash/Previews/PreviewZoomableImage.qml 2015-05-06 15:05:06 +0000
+++ qml/Dash/Previews/PreviewZoomableImage.qml 2015-08-03 14:36:27 +0000
@@ -23,6 +23,9 @@
23 This widget shows image contained in widgetData["source"],23 This widget shows image contained in widgetData["source"],
24 and falls back to widgetData["fallback"] if loading fails24 and falls back to widgetData["fallback"] if loading fails
25 can be zoomable accordingly with widgetData["zoomable"].25 can be zoomable accordingly with widgetData["zoomable"].
26
27 It will popup a overlay when widgetData["interactive"] == true
28 and it's enabled by default.
26 */29 */
2730
28PreviewWidget {31PreviewWidget {
@@ -31,6 +34,9 @@
3134
32 property Item rootItem: QuickUtils.rootItem(root)35 property Item rootItem: QuickUtils.rootItem(root)
3336
37 property bool interactive: root.widgetData["interactive"] === undefined ?
38 true: root.widgetData["interactive"];
39
34 LazyImage {40 LazyImage {
35 id: lazyImage41 id: lazyImage
36 objectName: "lazyImage"42 objectName: "lazyImage"
@@ -48,6 +54,8 @@
48 MouseArea {54 MouseArea {
49 id: mouseArea55 id: mouseArea
50 anchors.fill: parent56 anchors.fill: parent
57 enabled: root.interactive;
58
51 onClicked: {59 onClicked: {
52 overlay.initialX = rootItem.mapFromItem(parent, 0, 0).x;60 overlay.initialX = rootItem.mapFromItem(parent, 0, 0).x;
53 overlay.initialY = rootItem.mapFromItem(parent, 0, 0).y;61 overlay.initialY = rootItem.mapFromItem(parent, 0, 0).y;

Subscribers

People subscribed via source and target branches