Last Comment Bug 694024 - Opening the invite attendees dialog displays the timeline starting at midnight, not around the time of the event
: Opening the invite attendees dialog displays the timeline starting at midnigh...
Status: RESOLVED FIXED
[good first bug][mentor=Fallen][lang=js]
:
Product: Calendar
Classification: Client Software
Component: Dialogs (show other bugs)
: Trunk
: All All
: -- normal (vote)
: 2.1
Assigned To: Liu
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-12 08:25 PDT by Mark Banner (:standard8)
Modified: 2012-10-21 07:44 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch1-scroll to where the event is (1.21 KB, patch)
2012-09-20 03:18 PDT, Liu
no flags Details | Diff | Review
patch1-scroll the bar to where the event is (1.25 KB, patch)
2012-09-20 03:46 PDT, Liu
philipp: review+
Details | Diff | Review
A further improvement on the scroll bar (1.85 KB, patch)
2012-10-01 04:07 PDT, Liu
philipp: review+
Details | Diff | Review

Description Mark Banner (:standard8) 2011-10-12 08:25:56 PDT
STR:

1) Create an event starting at say 3pm in the afternoon.
2) Select Invite Attendees

Actual results:

- Attendees dialog comes up, timeline shows starting at half hour before midnight on the day of the event.

Expected results:

- Timeline showing a period which includes the event.

If I hit next slot, then the timeline jumps to the right place.
Comment 1 Liu 2012-08-18 08:14:45 PDT
Is this suitable for a beginner to take a shot? I would like to have a try. Can u please give me some guide?
Comment 2 Philipp Kewisch [:Fallen] 2012-08-18 15:32:52 PDT
There are a few files related to the attendees dialog here: 

http://mxr.mozilla.org/comm-central/source/calendar/base/content/dialogs/

You likely have to go through the initialization code and find out what is not being initialized correctly and then add some code there. I haven't debugged through this myself, so I can't really say in detail whats wrong. I'm sure you'll be able to complete it if you read through the code a bit though.
Comment 3 Liu 2012-08-18 19:01:12 PDT
Thank u for the tip. Im gonna work on it
Comment 4 Liu 2012-08-30 04:50:38 PDT
Hi Philipp,
I tried to reproduce the bug but I am not sure whether what I saw is the problem:
Say I create an event from 2012/8/30 3:00pm to 7:00pm, and I select invite attendees.Now the time line shows from 2012/8/30 12:00am, and there is no slot (a period of time presented by a blue square). Now I hit "next slot", the line jump
into a period starts from 4:00pm (not 3pm) and ends on 8:00pm.If I hit "previous slot", the timeline will jump back to a period from 3pm to 7pm(finally the correct slot). Is there any difference from what I observe to the problem? 
And if I fix this, after select "invite attendees" the time line should directly be at 3:00pm - 7:00pm, without any further operation, is it?


(In reply to Philipp Kewisch [:Fallen] from comment #2)
> There are a few files related to the attendees dialog here: 
> 
> http://mxr.mozilla.org/comm-central/source/calendar/base/content/dialogs/
> 
> You likely have to go through the initialization code and find out what is
> not being initialized correctly and then add some code there. I haven't
> debugged through this myself, so I can't really say in detail whats wrong.
> I'm sure you'll be able to complete it if you read through the code a bit
> though.
Comment 5 Philipp Kewisch [:Fallen] 2012-08-31 12:17:02 PDT
(In reply to Liu from comment #4)
> Hi Philipp,
> I tried to reproduce the bug but I am not sure whether what I saw is the
> problem:
> Say I create an event from 2012/8/30 3:00pm to 7:00pm, and I select invite
> attendees.Now the time line shows from 2012/8/30 12:00am, and there is no
> slot (a period of time presented by a blue square). Now I hit "next slot",
> the line jump
> into a period starts from 4:00pm (not 3pm) and ends on 8:00pm.If I hit
> "previous slot", the timeline will jump back to a period from 3pm to
> 7pm(finally the correct slot). Is there any difference from what I observe
> to the problem? 
No difference, these are all manifestations of this bug. 

> And if I fix this, after select "invite attendees" the time line should
> directly be at 3:00pm - 7:00pm, without any further operation, is it?

This would be an option, yes. I could imagine it makes more sense to show a bit more time though (i.e 2 or more slots in each direction, if you have 1hr slots, then 1pm - 9pm), so that the user can see if it makes sense to put the meeting earlier or later.
Comment 6 Liu 2012-09-20 03:18:49 PDT
Created attachment 662869 [details] [diff] [review]
patch1-scroll to where the event is
Comment 7 Felix Möller 2012-09-20 03:21:07 PDT
Comment on attachment 662869 [details] [diff] [review]
patch1-scroll to where the event is

I think something went wrong with your patch, you are adding two empty lines ...
Comment 8 Liu 2012-09-20 03:46:37 PDT
Created attachment 662923 [details] [diff] [review]
patch1-scroll the bar to where the event is
Comment 9 Liu 2012-09-20 03:47:58 PDT
(In reply to Felix Möller from comment #7)
> Comment on attachment 662869 [details] [diff] [review]
> patch1-scroll to where the event is
> 
> I think something went wrong with your patch, you are adding two empty lines
> ...

Yes, there was something wrong when I create the patch. I've resubmit one.
Comment 10 Liu 2012-09-20 03:54:10 PDT
Hi Fallen
This is my first patch for this bug. I found out that the function scrollToCurrentTime() works fine with its ratio, and I call it from 
the initialization stage, so that the event will be shown right after 
we hit "invite attendees". Please check this patch
Comment 11 Philipp Kewisch [:Fallen] 2012-09-21 08:37:57 PDT
Comment on attachment 662923 [details] [diff] [review]
patch1-scroll the bar to where the event is

This looks pretty good, sometimes it can be so simple. One more thing I think would fit in well though:

Opening the dialog (and clicking on the slot buttons) causes the green time bar to be at the very left of the visible space. Maybe you can make it appear so that there is at least one hour room before (so it's at ~ 25% of the visbile space).

Would you be interested in fixing that? Its probably a small change in scrollToCurrentTime().

r=philipp for the current patch since it fixes the issue, please let me know if you want to take care of the extra step.
Comment 12 Liu 2012-09-21 12:15:29 PDT
Sure, why not, I also agree leaving some space ahead is a better design. I will try to get this done, and I would ask for your help through IRC if necessary :)  

(In reply to Philipp Kewisch [:Fallen] from comment #11)
> Comment on attachment 662923 [details] [diff] [review]
> patch1-scroll the bar to where the event is
> 
> This looks pretty good, sometimes it can be so simple. One more thing I
> think would fit in well though:
> 
> Opening the dialog (and clicking on the slot buttons) causes the green time
> bar to be at the very left of the visible space. Maybe you can make it
> appear so that there is at least one hour room before (so it's at ~ 25% of
> the visbile space).
> 
> Would you be interested in fixing that? Its probably a small change in
> scrollToCurrentTime().
> 
> r=philipp for the current patch since it fixes the issue, please let me know
> if you want to take care of the extra step.
Comment 13 Liu 2012-10-01 04:07:50 PDT
Created attachment 666497 [details] [diff] [review]
A further improvement on the scroll bar
Comment 14 Liu 2012-10-01 04:09:22 PDT
Hi Philipp,
I did some change in scrollToCurrentTime() and now it leaves space for a previous slot. Hope this one works fine.
Comment 15 Philipp Kewisch [:Fallen] 2012-10-21 07:43:07 PDT
Comment on attachment 666497 [details] [diff] [review]
A further improvement on the scroll bar

Looks good, r=philipp
Comment 16 Philipp Kewisch [:Fallen] 2012-10-21 07:44:38 PDT
Pushed to comm-central changeset ec54df727248

Note You need to log in before you can comment on or make changes to this bug.