Closed Bug 694024 Opened 13 years ago Closed 12 years ago

Opening the invite attendees dialog displays the timeline starting at midnight, not around the time of the event

Categories

(Calendar :: Dialogs, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: liuweiran.nus)

Details

(Whiteboard: [good first bug][mentor=Fallen][lang=js])

Attachments

(2 files, 1 obsolete file)

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.
Whiteboard: [good first bug][mentor=Fallen][lang=js]
Is this suitable for a beginner to take a shot? I would like to have a try. Can u please give me some guide?
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.
Assignee: nobody → liuweiran.nus
Status: NEW → ASSIGNED
Thank u for the tip. Im gonna work on it
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.
(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.
Attached patch patch1-scroll to where the event is (obsolete) — — Splinter Review
Attachment #662869 - Flags: review?
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 ...
Attachment #662869 - Attachment is obsolete: true
Attachment #662869 - Flags: review?
Attachment #662923 - Flags: review?(philipp)
(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.
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 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.
Attachment #662923 - Flags: review?(philipp) → review+
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.
Attachment #666497 - Flags: review?(philipp)
Hi Philipp,
I did some change in scrollToCurrentTime() and now it leaves space for a previous slot. Hope this one works fine.
Comment on attachment 666497 [details] [diff] [review]
A further improvement on the scroll bar

Looks good, r=philipp
Attachment #666497 - Flags: review?(philipp) → review+
Pushed to comm-central changeset ec54df727248
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: