Merge lp:~mihirsoni/ubuntu-calendar-app/1308001 into lp:ubuntu-calendar-app
- 1308001
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Kunal Parmar | ||||
Approved revision: | 269 | ||||
Merged at revision: | 268 | ||||
Proposed branch: | lp:~mihirsoni/ubuntu-calendar-app/1308001 | ||||
Merge into: | lp:ubuntu-calendar-app | ||||
Diff against target: |
79 lines (+19/-14) 1 file modified
EventBubble.qml (+19/-14) |
||||
To merge this branch: | bzr merge lp:~mihirsoni/ubuntu-calendar-app/1308001 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kunal Parmar | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Alan Pope πΊπ§π± π¦ (community) | Approve | ||
David Planella | Needs Fixing | ||
Review via email: mp+217683@code.launchpad.net |
Commit message
Event bubble height issue
Description of the change
Bug #1308001
Event bubble height issues.
Mihir Soni (mihirsoni) wrote : | # |
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:258
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Kunal Parmar (pkunal-parmar) wrote : | # |
We need to apply margin on top and bottom as well. From image it looks like its missing
Kunal Parmar (pkunal-parmar) wrote : | # |
+ x:units.gu(1)
Please use anchors for alighments
Kunal Parmar (pkunal-parmar) wrote : | # |
64 + property int hourHeight: units.gu(12)
why we are changing the hourHeight ?
And if you change here I believe there are other place as well where we need to make changes related to this.
Mihir Soni (mihirsoni) wrote : | # |
> 64 + property int hourHeight: units.gu(12)
>
> why we are changing the hourHeight ?
>
> And if you change here I believe there are other place as well where we need
> to make changes related to this.
Hi Kunal,It is being used to define the minimum height of the bubble. if you see the rest of the code where hourHeight is being used.
There is no other impact as far as I tested.
Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
Comparing this merge with the design image from dpm in the linked bug.
This merge: https:/
Design from dpm: https:/
* The dot is too close to the edge
* There's insufficient border around the text
* The location is displayed
Kunal Parmar (pkunal-parmar) wrote : | # |
> > 64 + property int hourHeight: units.gu(12)
> >
> > why we are changing the hourHeight ?
> >
> > And if you change here I believe there are other place as well where we need
> > to make changes related to this.
>
> Hi Kunal,It is being used to define the minimum height of the bubble. if you
> see the rest of the code where hourHeight is being used.
>
> There is no other impact as far as I tested.
hourHeight is height of strip. Not event bubble.
Event bubble height is decided by following logic
var durationMin = (event.
durationMin += (event.
var height = (durationMin * hourHeight )/ 60;
Mihir Soni (mihirsoni) wrote : | # |
This is how it looks like now,
http://
Kunal, i have reverted the changes in Timelinebase.qml file.
Would appreciate your feedback.
- 259. By Mihir Soni
-
Description will be visible only if is fit to event bubble
- 260. By Mihir Soni
-
Resolved typo in color
David Planella (dpm) wrote : | # |
Mihir, great work on that! One thing I've noticed is that the dot should have the same spacing to the top and to the right edges as the text. Now it seems that the dot is closer to the edges than the text
- 261. By Mihir Soni
-
Same margin as text
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:260
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:261
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
Still seems *slightly* off.
Doesn't look uniformly distant from top and right edge of event bubble?
- 262. By Mihir Soni
-
slight margin issues
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:262
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
Looks great!
Kunal Parmar (pkunal-parmar) wrote : | # |
9 + if( event.description && descriptionLabe
10 descriptionLabe
Can you explain the logic, why description should be set only when description label's height is grater then height of bubble ?
Mihir Soni (mihirsoni) wrote : | # |
> 9 + if( event.description && descriptionLabe
> height) //If content is too much don't display.
> 10 descriptionLabe
>
> Can you explain the logic, why description should be set only when description
> label's height is grater then height of bubble ?
Hi kunal,
it was suggested by David , you can find it in description of bug #1308001
Kunal Parmar (pkunal-parmar) wrote : | # |
> > 9 + if( event.description && descriptionLabe
> > height) //If content is too much don't display.
> > 10 descriptionLabe
> >
> > Can you explain the logic, why description should be set only when
> description
> > label's height is grater then height of bubble ?
>
> Hi kunal,
>
> it was suggested by David , you can find it in description of bug #1308001
Yes but, in that case height of description should be less then height of bubble. And not otherwise.
Mihir Soni (mihirsoni) wrote : | # |
Kunal like this ?
if (event.description && height > descriptionLabe
Mihir Soni (mihirsoni) wrote : | # |
> > > 9 + if( event.description && descriptionLabe
> >
> > > height) //If content is too much don't display.
> > > 10 descriptionLabe
> > >
> > > Can you explain the logic, why description should be set only when
> > description
> > > label's height is grater then height of bubble ?
> >
> > Hi kunal,
> >
> > it was suggested by David , you can find it in description of bug #1308001
>
> Yes but, in that case height of description should be less then height of
> bubble. And not otherwise.
If you try otherwise , it is showing event description if it is not able to fit in event bubble.
Kunal Parmar (pkunal-parmar) wrote : | # |
> > > > 9 + if( event.description &&
> descriptionLabe
> > >
> > > > height) //If content is too much don't display.
> > > > 10 descriptionLabe
> > > >
> > > > Can you explain the logic, why description should be set only when
> > > description
> > > > label's height is grater then height of bubble ?
> > >
> > > Hi kunal,
> > >
> > > it was suggested by David , you can find it in description of bug #1308001
> >
> > Yes but, in that case height of description should be less then height of
> > bubble. And not otherwise.
>
> If you try otherwise , it is showing event description if it is not able to
> fit in event bubble.
You will need to consider y position as well, just checking height will not help.
Mihir Soni (mihirsoni) wrote : | # |
Hi Kunal,
sorry for more question , but i am misunderstanding your comment.
if( event.description && height > descriptionLabe
I did try above statement and it gave me same output as before with no change.
Kunal Parmar (pkunal-parmar) wrote : | # |
> Hi Kunal,
>
> sorry for more question , but i am misunderstanding your comment.
>
> if( event.description && height > descriptionLabe
> descriptionLabe
>
> I did try above statement and it gave me same output as before with no change.
.
As far as I understand, you need to check descriptionLabel.y + descriptionLabe
Or you can check total height of column and compare that to height of bubble to decide if description label should be visible or not.
Mihir Soni (mihirsoni) wrote : | # |
Hi Kunal,
I did try as you suggested but it is not working as expected like :
I have event with huge description , which shouldn't display but it is displaying if i use following condition
if( event.description && descriptionLabel.y + descriptionLabe
Kunal Parmar (pkunal-parmar) wrote : | # |
Pls print the values and see what vlaues are coming and check if those are same with what you expect.
- 263. By Mihir Soni
-
modfied the condition
- 264. By Mihir Soni
-
merge with trunk
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:264
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Kunal Parmar (pkunal-parmar) wrote : | # |
25 + Item{
26 id: detailsColumn
27 width: parent.width
I think we dont need this new Item, you can directly assign margin to column element.
Kunal Parmar (pkunal-parmar) wrote : | # |
31 + Column{
32 width: parent.width
You have put anchors.fill: parent, so we dont need to assign width, we can just remove above statement
Kunal Parmar (pkunal-parmar) wrote : | # |
45 + anchors.fill: parent
46 + anchors.topMargin: units.gu(0.5)
47 + anchors.leftMargin: units.gu(1)
Why topMargin and leftMargin is not similar ? For symmetry I would expect it to be same.
Kunal Parmar (pkunal-parmar) wrote : | # |
46 + anchors.topMargin: units.gu(0.5)
47 + anchors.leftMargin: units.gu(1)
We can put rightMargin as well here and simplify below statement. (- units.gu(0.5) won't be necessary)
54 + color:"gray"
55 + width: parent.width - rect.width - units.gu(0.5)
- 265. By Mihir Soni
-
modification as per review comments
- 266. By Mihir Soni
-
Merge with trunk
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:266
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Kunal Parmar (pkunal-parmar) wrote : | # |
I meant something like this
- 267. By Mihir Soni
-
changes as per review comments
- 268. By Mihir Soni
-
Merge from trunk
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:268
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Kunal Parmar (pkunal-parmar) wrote : | # |
64 + anchors.bottom: parent.Bottom
65 +
Can you check if we need this ?
- 269. By Mihir Soni
-
Removed anchors
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:269
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Kunal Parmar (pkunal-parmar) wrote : | # |
looks good, thanks
Preview Diff
1 | === modified file 'EventBubble.qml' |
2 | --- EventBubble.qml 2014-03-26 14:29:37 +0000 |
3 | +++ EventBubble.qml 2014-05-09 07:52:55 +0000 |
4 | @@ -56,9 +56,14 @@ |
5 | |
6 | if( event.displayLabel) |
7 | titleLabel.text = event.displayLabel; |
8 | - |
9 | if( event.description) |
10 | + { |
11 | descriptionLabel.text = event.description |
12 | + //If content is too much don't display. |
13 | + if( height < descriptionLabel.height + descriptionLabel.y){ |
14 | + descriptionLabel.text = "" |
15 | + } |
16 | + } |
17 | } else { |
18 | //narrow type shows only time and title |
19 | timeLabel.text = startTime |
20 | @@ -103,31 +108,31 @@ |
21 | |
22 | Column{ |
23 | id: detailsColumn |
24 | - width: parent.width |
25 | + |
26 | + anchors.fill: parent |
27 | + anchors.topMargin: units.gu(1) |
28 | + anchors.leftMargin: units.gu(1) |
29 | + anchors.rightMargin: units.gu(1) |
30 | |
31 | Row{ |
32 | width: parent.width |
33 | |
34 | + Label{ |
35 | + id: timeLabel |
36 | + fontSize:"small"; |
37 | + color:"gray" |
38 | + width: parent.width - rect.width |
39 | + } |
40 | Rectangle{ |
41 | + id:rect |
42 | width: units.gu(1) |
43 | radius: width/2 |
44 | height: width |
45 | color: "#715772" |
46 | - anchors.verticalCenter: parent.verticalCenter |
47 | - antialiasing: true |
48 | - } |
49 | - |
50 | - Label{ |
51 | - id: timeLabel |
52 | - fontSize:"small"; |
53 | - color:"gray" |
54 | - width: parent.width |
55 | } |
56 | } |
57 | - |
58 | Label{ |
59 | id: titleLabel |
60 | - x: units.gu(1) |
61 | fontSize:"small"; |
62 | color:"black" |
63 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere |
64 | @@ -136,7 +141,6 @@ |
65 | |
66 | Label{ |
67 | id: descriptionLabel |
68 | - x: units.gu(1) |
69 | fontSize:"small"; |
70 | color:"gray" |
71 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere |
72 | @@ -145,6 +149,7 @@ |
73 | } |
74 | } |
75 | |
76 | + |
77 | MouseArea{ |
78 | anchors.fill: parent |
79 | onClicked: { |
It looks like :- http:// imgur.com/ yhzbElj