Merge lp:~pkunal-parmar/ubuntu-calendar-app/WeekView-ScrollToToday into lp:ubuntu-calendar-app

Proposed by Kunal Parmar
Status: Merged
Approved by: Kunal Parmar
Approved revision: 571
Merged at revision: 581
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/WeekView-ScrollToToday
Merge into: lp:ubuntu-calendar-app
Prerequisite: lp:~pkunal-parmar/ubuntu-calendar-app/NewDayView-Final
Diff against target: 94 lines (+35/-1)
3 files modified
TimeLineBaseComponent.qml (+18/-0)
WeekView.qml (+15/-0)
tests/autopilot/calendar_app/__init__.py (+2/-1)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/WeekView-ScrollToToday
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Mihir Soni Approve
Review via email: mp+243664@code.launchpad.net

Commit message

Scroll to current day in case of week is current week or today is pressed

Description of the change

Scroll to current day in case of week is current week or today is pressed

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

This fails seems to be caused by new design changes,

I tried to fix it

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Mihir Soni (mihirsoni) wrote :

Looks good to me !!
Thanks kunal.

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cerisara (acerisara) wrote :

Kunal, could you try to merge my branch to see if the situation improves?

570. By Kunal Parmar

merge from trunk

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cerisara (acerisara) wrote :

Kunal, could you try again with my branch? It is not in trunk yet. (or, otherwise, try with x_pad set to 0.08).

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

> Kunal, could you try again with my branch? It is not in trunk yet. (or,
> otherwise, try with x_pad set to 0.08).

ohh, I thought code was merged to my branch, will try agian. Thanks

571. By Kunal Parmar

reducing xpad for swipe

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'TimeLineBaseComponent.qml'
--- TimeLineBaseComponent.qml 2014-12-18 19:00:07 +0000
+++ TimeLineBaseComponent.qml 2015-02-17 05:43:06 +0000
@@ -52,6 +52,24 @@
52 }52 }
53 }53 }
5454
55 function scrollTocurrentDate() {
56 if ( type != ViewType.ViewTypeWeek ){
57 return;
58 }
59
60 var today = DateExt.today();
61 var startOfWeek = today.weekStart(Qt.locale().firstDayOfWeek);
62 var weekDay = today.getDay();
63 if( startOfWeek.isSameDay(startDay) && weekDay > 2) {
64 timeLineView.contentX = (weekDay * timeLineView.delegateWidth);
65 if( timeLineView.contentX > (timeLineView.contentWidth - timeLineView.width) ) {
66 timeLineView.contentX = timeLineView.contentWidth - timeLineView.width
67 }
68 } else {
69 timeLineView.contentX = 0;
70 }
71 }
72
55 Connections{73 Connections{
56 target: keyboardEventProvider74 target: keyboardEventProvider
57 onScrollUp:{75 onScrollUp:{
5876
=== modified file 'WeekView.qml'
--- WeekView.qml 2014-11-04 18:32:16 +0000
+++ WeekView.qml 2015-02-17 05:43:06 +0000
@@ -88,6 +88,7 @@
88 }88 }
8989
90 delegate: Loader {90 delegate: Loader {
91 id: timelineLoader
91 width: parent.width92 width: parent.width
92 height: parent.height93 height: parent.height
93 asynchronous: !weekViewPath.isCurrentItem94 asynchronous: !weekViewPath.isCurrentItem
@@ -108,18 +109,32 @@
108 Component.onCompleted: {109 Component.onCompleted: {
109 if(weekViewPage.isCurrentPage){110 if(weekViewPage.isCurrentPage){
110 timeLineView.scrollToCurrentTime();111 timeLineView.scrollToCurrentTime();
112 timeLineView.scrollTocurrentDate();
111 }113 }
112 }114 }
113115
116 onIsActiveChanged: {
117 timeLineView.scrollTocurrentDate();
118 }
119
114 onDateSelected: {120 onDateSelected: {
115 weekViewPage.dateSelected(date);121 weekViewPage.dateSelected(date);
116 }122 }
117123
118 Connections{124 Connections{
125 target: calendarTodayAction
126 onTriggered:{
127 if( isActive )
128 timeLineView.scrollTocurrentDate();
129 }
130 }
131
132 Connections{
119 target: weekViewPage133 target: weekViewPage
120 onIsCurrentPageChanged:{134 onIsCurrentPageChanged:{
121 if(weekViewPage.isCurrentPage){135 if(weekViewPage.isCurrentPage){
122 timeLineView.scrollToCurrentTime();136 timeLineView.scrollToCurrentTime();
137 timeLineView.scrollTocurrentDate();
123 }138 }
124 }139 }
125 }140 }
126141
=== modified file 'tests/autopilot/calendar_app/__init__.py'
--- tests/autopilot/calendar_app/__init__.py 2014-12-18 16:00:08 +0000
+++ tests/autopilot/calendar_app/__init__.py 2015-02-17 05:43:06 +0000
@@ -214,7 +214,7 @@
214 sleep(1)214 sleep(1)
215 timeout += 1215 timeout += 1
216216
217 def swipe_view(self, direction, view, x_pad=0.15):217 def swipe_view(self, direction, view, x_pad=0.08):
218 """Swipe the given view to left or right.218 """Swipe the given view to left or right.
219219
220 Args:220 Args:
@@ -400,6 +400,7 @@
400 for event in event_bubbles:400 for event in event_bubbles:
401 # Event-bubbles objects are recycled, only show visible ones.401 # Event-bubbles objects are recycled, only show visible ones.
402 temp = "<b>"+event_name+"</b>"402 temp = "<b>"+event_name+"</b>"
403 print(temp + "-----" + event.get_name())
403 if event.get_name() == temp:404 if event.get_name() == temp:
404 if (visible and event.visible) or not visible:405 if (visible and event.visible) or not visible:
405 matched_event = event406 matched_event = event

Subscribers

People subscribed via source and target branches

to status/vote changes: