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
1=== modified file 'qml/Dash/Previews/PreviewImageGallery.qml'
2--- qml/Dash/Previews/PreviewImageGallery.qml 2015-05-06 15:05:06 +0000
3+++ qml/Dash/Previews/PreviewImageGallery.qml 2015-08-03 14:36:27 +0000
4@@ -20,7 +20,10 @@
5
6 /*! This preview widget shows a horizontal list of images.
7 * The URIs for the images should be an array in widgetData["sources"].
8- * Images fall back to widgetData["fallback"] if loading fails
9+ * Images fall back to widgetData["fallback"] if loading fails.
10+ *
11+ * It will popup a slideview when widgetData["interactive"] == true
12+ * and it's enabled by default.
13 */
14
15 PreviewWidget {
16@@ -29,6 +32,9 @@
17
18 property Item rootItem: QuickUtils.rootItem(root)
19
20+ property bool interactive: root.widgetData["interactive"] === undefined ?
21+ true: root.widgetData["interactive"];
22+
23 ListView {
24 id: previewImageListView
25 objectName: "previewImageListView"
26@@ -67,6 +73,8 @@
27 MouseArea {
28 id: mouseArea
29 anchors.fill: parent
30+ enabled: root.interactive;
31+
32 onClicked: {
33 previewImageListView.currentIndex = index;
34 overlay.updateInitialItem();
35
36=== modified file 'qml/Dash/Previews/PreviewZoomableImage.qml'
37--- qml/Dash/Previews/PreviewZoomableImage.qml 2015-05-06 15:05:06 +0000
38+++ qml/Dash/Previews/PreviewZoomableImage.qml 2015-08-03 14:36:27 +0000
39@@ -23,6 +23,9 @@
40 This widget shows image contained in widgetData["source"],
41 and falls back to widgetData["fallback"] if loading fails
42 can be zoomable accordingly with widgetData["zoomable"].
43+
44+ It will popup a overlay when widgetData["interactive"] == true
45+ and it's enabled by default.
46 */
47
48 PreviewWidget {
49@@ -31,6 +34,9 @@
50
51 property Item rootItem: QuickUtils.rootItem(root)
52
53+ property bool interactive: root.widgetData["interactive"] === undefined ?
54+ true: root.widgetData["interactive"];
55+
56 LazyImage {
57 id: lazyImage
58 objectName: "lazyImage"
59@@ -48,6 +54,8 @@
60 MouseArea {
61 id: mouseArea
62 anchors.fill: parent
63+ enabled: root.interactive;
64+
65 onClicked: {
66 overlay.initialX = rootItem.mapFromItem(parent, 0, 0).x;
67 overlay.initialY = rootItem.mapFromItem(parent, 0, 0).y;

Subscribers

People subscribed via source and target branches