Closed Bug 295146 Opened 19 years ago Closed 19 years ago

Mouseover preview of repeated event shows original start datetime instead of time of occurrence

Categories

(Calendar :: Sunbird Only, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gekacheka, Assigned: mostafah)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: 20050505 + (trunk calendar.jar)

Mouseover preview of an occurrence of a repeated event gives the original start
datetime instead of time of occurrence.

Reproducible: Always

Steps to Reproduce:
1. New Event, title "repeat occurrences"
2. Give a start date in the past, not today, 
   say yesterday 21 May 2005 16:00--17:00
  (today's date is abeviated to time, so problem won't appear until tomorrow)
3. In Recurrence tab: repeat, every 2 days, for 3 times.
4. click ok.
5. Mouseover each occurrence in any view, say month view.

Actual Results:  
Mouseover "repeat occurrences" on Sat 21 May 2005:  
  Date: Sat 21 May 2005 16:00--17:00 (OK)
Mouseover "repeat occurrences" on Mon 23 May 2005:  
  Date: Sat 21 May 2005 16:00--17:00 (BAD)
Mouseover "repeat occurrences" on Wed 25 May 2005:  
  Date: Sat 21 May 2005 16:00--17:00 (BAD)

Expected Results:  
Mouseover "repeat occurrences" on Sat 21 May 2005:  
  Date: 16:00--17:00 
  (month date known from grid context, repeating it would add clutter.)
Mouseover "repeat occurrences" on Mon 23 May 2005:  
  Date: 16:00--17:00 
  (month date known from grid context, repeating it would add clutter.)
Mouseover "repeat occurrences" on Wed 25 May 2005:  
  Date: 16:00--17:00 
  (month date known from grid context, repeating it would add clutter.)
Keywords: regression
(patch -l -p 2 -i file.patch)

Old was using start date rather than occurrence date.
(regression since 0.2).

CHANGES:

Each view (day, week, multiweek, month) now sets eventbox.occurrence
to the itemOccurrence so it is available for the mouseover preview.

For grid occurrence tooltips, now onMouseOverGridOccurrence 
gets the occurrence dates and passes them to getPreviewForEvent
(and to getPreviewForTask, though recurring tasks don't work yet).

Tooltips renamed --- they are children of views, not specialized by content.
(So tasks in a grid view or sorted list should still use the same tooltip
as events in the same view, not the tooltip of a different view.)
  eventTooltip	       --> gridOccurrenceTooltip
  taskTooltip	       --> taskTreeTooltip
  eventTreeListTooltip --> eventTreeTooltip

Reorganized tooltip generation 
* share more tooltip code (setToolTipContent) between the three cases 
  (grid occurrence tooltip, event list tooltip, and task list tooltip)
* eliminate need for global variable 'gShowToolTip' and function
  checkToolTip, was used to return boolean value whether tooltip was
  successfully generated, but onMouseoverXXX method can return value.

A. event grid occurrence
  Old:
    eventbox onmouseover
      getEventToolTip
	(code to remove old tool tip content)
	getPreviewForEvent
	(code to add new tool tip content)

  New:
    eventbox onmouseover
      onMouseOverGridOccurrence (returns boolean)
	getPreviewForEvent or getPreviewForTask
	setTooltipContent	      

B. event list tooltip generation
  Old:
    tooltip onpopupshowing
      changeToolTipTextForEvent
	getCalendarEventFromEvent
	(code to remove old tool tip content)
	getPreviewForEvent
	(code to add new tool tip content)
      checkToolTip

  New:
    tooltip onpopupshowing
      onMouseOverEventTree (returns boolean)
	getCalendarEventFromEvent
	getPreviewForEvent or getPreviewForTask
	setToolTipContent

C. task list tooltip generation
  Old:
    tooltip onpopupshowing
      changeToolTipTextForToDo
	getToDoFromEvent
	(code to remove old tool tip content)
	getPreviewForTask
	(code to add new tool tip content)
      checkToolTip

  New:
    tooltip onpopupshowing
      onMouseOverTaskTree (returns boolean)
	getToDoFromEvent
	getPreviewForTask or getPreviewForEvent
	setToolTipContent


TESTING:

Tested on build20050505 + trunk20050522 calendar.jar + patch

* Mousing over task in task list produces tooltips.
* Mousing over event in event list produces tooltips.
* In each grid view (month, multiweek, week, day) mousing over an occurrence
  of a single day repeating event produces tooltip with time, not datetime of
  initial occurrence.
* In each grid view (month, multiweek, week, day) mousing over an occurrence
  of a multiday day repeating event produces tooltip with occurrence
  start and end datetimes, not start and end datetimes of initial occurrence.
Attachment #184277 - Flags: first-review?(mvl)
Please don't mix behaviour changes with cleanup patches. This is way harder to
review...
(patch -l -p 2 -i file.patch)
(patch was simplified by splitting into several as requested, 
 so this patch depends on patches at bug 295412, bug 295418, bug 295424.)

grid views:
  add eventBox.occurrence
  rename "getEventTooltip" to "onMouseOverGridOccurrence"
    (it doesn't return anything, so "getEventToolTip" is a bad name.
     "onMouseOverGridOccurrence" makes clear it is a handler.)

mouseoverPreviews.js:
  replace getEventTooltip with onMouseOverGridOccurrence.
  Occurrence dates now come from itemOccurrence object, not 
    display dates set on display object.

Fix: when events span multiple days, should still use occurrence dates.

Testing:  behaves as expected in bug description.

* In each grid view (month, multiweek, week, day) mousing over an occurrence
  of a single day repeating event produces tooltip with time, not datetime of
  initial occurrence.
* In each grid view (month, multiweek, week, day) mousing over an occurrence
  of a multiday day repeating event produces tooltip with occurrence
  start and end datetimes, not start and end datetimes of initial occurrence.
Attachment #184277 - Attachment is obsolete: true
Depends on: 295424
Blocks: 262811
Attachment #184277 - Flags: first-review?(mvl)
Comment on attachment 184465 [details] [diff] [review]
provide occurrence dates for grid mouseovers + cleanup gridMouseovers only

(Updated patch is remainder after splitting off bug 295412, bug 295418, bug
295424 from this bug.  Also part added to patch for bug 262811.  Hope this is
easier to review.)
Attachment #184465 - Flags: first-review?(mvl)
Attachment #184465 - Flags: first-review?(mvl) → first-review+
patch checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
QA Contact: gurganbl → sunbird
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: