Merge lp:~stolowski/unity-scopes-api/new-widgets-doc-wily into lp:unity-scopes-api/devel

Proposed by Paweł Stołowski
Status: Merged
Approved by: Michi Henning
Approved revision: 622
Merged at revision: 623
Proposed branch: lp:~stolowski/unity-scopes-api/new-widgets-doc-wily
Merge into: lp:unity-scopes-api/devel
Diff against target: 76 lines (+47/-0)
1 file modified
src/scopes/PreviewWidget.cpp (+47/-0)
To merge this branch: bzr merge lp:~stolowski/unity-scopes-api/new-widgets-doc-wily
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michi Henning (community) Approve
Andrea Cimitan (community) Approve
Albert Astals Cid (community) Approve
Review via email: mp+267921@code.launchpad.net

Commit message

Added doc for comment, comment-input and icon-actions widgets

Description of the change

Added doc for comment, comment-input and icon-actions widgets.

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

LGTM

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) :
review: Needs Information
Revision history for this message
Paweł Stołowski (stolowski) wrote :

See my reply below.

Revision history for this message
Andrea Cimitan (cimi) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote :

Looks good, thanks!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
622. By Paweł Stołowski

Merged devel

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/scopes/PreviewWidget.cpp'
2--- src/scopes/PreviewWidget.cpp 2015-05-19 09:19:13 +0000
3+++ src/scopes/PreviewWidget.cpp 2015-08-20 14:48:09 +0000
4@@ -87,11 +87,14 @@
5 \arg \c gallery
6 \arg \c header
7 \arg \c actions
8+\arg \c icon-actions
9 \arg \c progress
10 \arg \c text
11 \arg \c rating-input
12 \arg \c rating-edit
13 \arg \c reviews
14+\arg \c comment-input
15+\arg \c comment
16 \arg \c expandable
17
18 \subsection audio audio widget
19@@ -242,6 +245,17 @@
20 }
21 \endcode
22
23+\subsection icon-actions icon-actions widget
24+
25+The icon-actions widget displays one or more buttons represented by icons and/or labels. It's similar to actions widget, but uses different layout.
26+Every button can provide an optional temporary icon to be displayed immediately after user taps it.
27+
28+List of attributes:
29+
30+\arg \c actions A composite attribute containing an array of tuples, where each tuple has at least
31+these fields: \c id (a mandatory string that is passed to unity::scopes::ScopeBase::activate_preview_action()),
32+\c label (optional string), \c icon (optional URI, required if label is missing), \c temporaryIcon (optional URI).
33+
34 \subsection progress progress widget
35
36 The progress widget displays the progress of an action, such as download progress.
37@@ -378,6 +392,39 @@
38 }
39 \endcode
40
41+\subsection comment-input comment-input widget
42+
43+The comment-input widget allows users to add comments. It displays an input box along with "Send" button.
44+
45+When a user presses the "Send" button, the scope receives a preview
46+action activation with the id \c "commented". The actual comment
47+can be accessed via unity::scopes::ActionMetadata::scope_data.
48+The scope data will be a VariantMap with the \c "comment" field holding
49+the text entered by the user.
50+
51+List of attributes:
52+
53+\arg \c submit-label String for the label of the submit button (optional, uses "Submit" by default).
54+
55+\code{.cpp}
56+{
57+ PreviewWidget w1("cmt", "comment-input");
58+
59+ w1.add_attribute_value("submit-label", Variant("Comment it!"));
60+ ...
61+}
62+\endcode
63+
64+\subsection comment comment widget
65+
66+The comment widget shows an avatar, author name, subtitle and a comment text.
67+
68+List of attributes:
69+\arg \c source URI for an avatar icon (optional)
70+\arg \c author A string specifying the author of the comment (mandatory)
71+\arg \c subtitle A string for the subtitle (optional)
72+\arg \c comment A string for the comment text (mandatory)
73+
74 \subsection expandable expandable widget
75
76 The expandable widget is used to group several widgets into an expandable pane.

Subscribers

People subscribed via source and target branches

to all changes: