Merge lp:~rpadovani/reminders-app/new-notes-design into lp:~notes-app-dev/reminders-app/new-design

Proposed by Riccardo Padovani
Status: Merged
Merged at revision: 101
Proposed branch: lp:~rpadovani/reminders-app/new-notes-design
Merge into: lp:~notes-app-dev/reminders-app/new-design
Diff against target: 131 lines (+73/-33)
1 file modified
src/app/qml/components/NotesDelegate.qml (+73/-33)
To merge this branch: bzr merge lp:~rpadovani/reminders-app/new-notes-design
Reviewer Review Type Date Requested Status
David Planella Needs Fixing
Michael Zanetti (community) Needs Fixing
Review via email: mp+218505@code.launchpad.net

Commit message

Implement notesDelegate according to new design

Description of the change

To post a comment you must log in.
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Screenshot: http://i.imgur.com/bVfOSo0.png

* The delegate height is too small
* The color bar at the top is too thick
* The Note title is too big
* The text color doesn't seem to match (not sure if the spec is a bit buggy there. I had issues too in the notebook delegate)
* The left/right margins are too small
* The chevron interferes with the text
* Can you try adding the gradient?

Please also align color values, font sizes etc with the notebookdelegates where they look the same in the spec

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote :

60 + anchors.fill: parent

You should not use anchors.fill on items inside a layout. As the parent is a RowLayout, just use "Layout.fillHeight: true" to make it span the whole height, and use "Layout.fillWidth: true" on the cell you want to use all the available space after placing other items in the row.

Same for all the other items. You should not use anchors inside layouts. Only use absolute width/height values or, better, use Layout.fillWidth: true in a smart way to let the layout do the job for you.

===

104 + source: Qt.resolvedUrl('../images/arrowRight.png') // TODO: Improve this image. Seriously. It's horrible.

lol. I agree.

review: Needs Fixing
98. By Riccardo Padovani

Fixed some sizes

99. By Riccardo Padovani

Fixed layout and anchors

100. By Riccardo Padovani

Added gradient

Revision history for this message
Michael Zanetti (mzanetti) wrote :

77 + anchors { top: colorRectangle.bottom; bottom: parent.bottom }

Theres still anchors inside a columnLayout :)

===

I would try it like this (pseudo-code - might not work as is)

ColumnLayout {
   anchors { fill: parent; leftMargin: units.gu(1.5); rightMargin: units.gu(1.5) }

    Rectangle {
        Layout.fillWidth: true
        height: units.gu(3)
        color: colorForNotebook(note.notebookGui)
    }
    Label {
        Layout.fillWidth: true
        text: note.title
    }
    Label {
        Layout.fillWidth: true
        Layout.fillHeight: true
        text: note.plaintextContent
        fontSize: "small"
        maximumLineCount: 2
    }
    Label {
        Layout.fillWidth: true
        text: note.date
        fontSize: "small"
        horizontalAlignment: Text.AlignRight
    }
}

and that's it.

for the arrow, use "Base" instead of "Empty" and set "progression: true"

Revision history for this message
Michael Zanetti (mzanetti) wrote :

Forgot about the gradient:

For that, put a Rectangle on top with anchors.fill: parent and set a gradient similar to this:

Gradient {
    GradientStop{ position: 0.9; color: "white" }
    GradientStop{ position: 1.0; color: "#d9d9d9" }
}

Revision history for this message
David Planella (dpm) wrote :

Wow, this is starting to look really nice!

http://i.imgur.com/Gyfu0FK.png

A couple of notes having compared the original design with the implementation:

http://i.imgur.com/DVSQ86L.png

- The left and right margins between note entry and edges need to be slightly smaller
- There needs to be a top margin (perhaps this will be solved when grouping the notes by month?)
- The shadow gradient looks much softer in the original designs
- The shadow gradient should not cover image previews
- The date format should be Dayname, time
- The Notes tab should be dark gray, not white

Apart from this, it looks really cool, thanks!

review: Needs Fixing
101. By Riccardo Padovani

Rewrite ALL! :D

Revision history for this message
Michael Zanetti (mzanetti) wrote :

lookin' goooood!

Especially the code. For the visual, I think there are some margins and spacings wrong still at top and bottom. Also clicking seems to be broken. I think you need to forward the clicked signal from the inner ListItem to the outer.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/qml/components/NotesDelegate.qml'
2--- src/app/qml/components/NotesDelegate.qml 2014-05-05 17:46:10 +0000
3+++ src/app/qml/components/NotesDelegate.qml 2014-05-07 17:16:59 +0000
4@@ -17,51 +17,91 @@
5 */
6
7 import QtQuick 2.0
8+import QtQuick.Layouts 1.0
9 import Ubuntu.Components 0.1
10 import Ubuntu.Components.ListItems 0.1
11
12 Empty {
13 id: root
14- height: units.gu(9)
15+ height: units.gu(12)
16
17 property string title
18 property date creationDate
19 property string content
20 property string resource
21- property color notebookColor
22-
23- Column {
24- id: contentColumn
25- spacing: units.gu(1)
26- anchors {
27- top: parent.top
28- topMargin: units.gu(1)
29- left: parent.left
30- leftMargin: units.gu(2)
31- right: resourceImage.left
32- rightMargin: units.gu(2)
33- }
34- Label {
35- anchors { left: parent.left; right: parent.right }
36- text: root.title
37- font.bold: true
38- elide: Text.ElideRight
39+ property string notebookColor: preferences.colorForNotebook(model.guid)
40+
41+ showDivider: false;
42+
43+ ColumnLayout {
44+ anchors { fill: parent; leftMargin: units.gu(1); rightMargin: units.gu(1) }
45+ spacing: 0
46+
47+ Rectangle {
48+ Layout.fillWidth: true
49+ height: units.gu(0.4)
50 color: root.notebookColor
51 }
52- Label {
53- anchors { left: parent.left; right: parent.right }
54- text: "<font color=\"#dd4814\">"+ Qt.formatDate(root.creationDate) + "</font> " + root.content
55- wrapMode: Text.WordWrap
56- textFormat: Text.StyledText
57- maximumLineCount: 2
58- fontSize: "small"
59+
60+ Rectangle {
61+ Layout.fillWidth: true
62+ Layout.fillHeight: true
63+ color: "white"
64+
65+ RowLayout {
66+ anchors.fill: parent
67+
68+ Rectangle {
69+ Layout.fillWidth: true
70+ Layout.fillHeight: true
71+
72+ gradient: Gradient {
73+ GradientStop{ position: 0.9; color: "transparent" }
74+ GradientStop{ position: 1; color: "#d9d9d9" }
75+ }
76+
77+ Base {
78+ anchors.fill: parent
79+ progression: true
80+
81+ ColumnLayout {
82+ anchors { fill: parent; bottomMargin: units.gu(0.5) }
83+
84+ Label {
85+ Layout.fillWidth: true
86+ text: root.title
87+ font.weight: Font.Light
88+ elide: Text.ElideRight
89+ color: root.notebookColor
90+ }
91+
92+ Label {
93+ Layout.fillWidth: true
94+ Layout.fillHeight: true
95+ text: root.content
96+ wrapMode: Text.WordWrap
97+ textFormat: Text.StyledText
98+ maximumLineCount: 2
99+ fontSize: "small"
100+ color: "black"
101+ }
102+
103+ Label {
104+ Layout.fillWidth: true
105+ text: Qt.formatDate(root.creationDate)
106+ color: "#b3b3b3"
107+ fontSize: "small"
108+ horizontalAlignment: Text.AlignRight
109+ }
110+ }
111+ }
112+ }
113+
114+ Image {
115+ source: root.resource
116+ sourceSize.height: units.gu(11.6)
117+ }
118+ }
119 }
120 }
121-
122- Image {
123- id: resourceImage
124- anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
125- source: root.resource
126- sourceSize.height: height
127- }
128 }
129
130=== added file 'src/app/qml/images/arrowRight.png'
131Binary files src/app/qml/images/arrowRight.png 1970-01-01 00:00:00 +0000 and src/app/qml/images/arrowRight.png 2014-05-07 17:16:59 +0000 differ

Subscribers

People subscribed via source and target branches