Closed Bug 392561 Opened 18 years ago Closed 17 years ago

Need to revise provider error notifications

Categories

(Calendar :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: dbo, Assigned: berend.cornelius09)

Details

Attachments

(9 files, 1 obsolete file)

Client code calling on providers should care about how to handle a specific error notified via calIOperationListener. Client code knows far better whether a specific error should be notified (e.g. in an error box) or could be ignored. E.g. I would consider every error caused by a direct user interaction to be notified in an error box while I usually won't accept error boxes during frequent agenda/alarm updates. I'd expect that a silent retry is scheduled in that case. In essence only the client code could decide on that, the provider doesn't know the overall context an operation is running in, and calIObserver::onError should generally log silently, omitting an error box.
Flags: wanted-calendar0.9+
I think a good first step to head in Daniel's proposed direction is to handle Network-errors in a "softer" way. A possible solution would be to disable the respective calendars in the calendar-pane and probably provide a tooltip. We would then also have to decide how we denote and implement resurrecting calendars (e.g. after a reload). Christian do you already have an opinion on this?
When receiving onError events via calICompositeObserver, you usually have no clue what calendar has fired the error. This patch adds a calendar parameter.
Attachment #320171 - Flags: review?(philipp)
Assignee: nobody → daniel.boelzle
Status: NEW → ASSIGNED
Comment on attachment 320171 [details] [diff] [review] [checked in] adding calendar parameter to calICalendar::onError Looks good r=philipp
Attachment #320171 - Flags: review?(philipp) → review+
Attachment #320171 - Attachment description: adding calendar parameter to calICalendar::onError → [checked in] adding calendar parameter to calICalendar::onError
Assignee: daniel.boelzle → Berend.Cornelius
Status: ASSIGNED → NEW
Attached patch patch v. #2Splinter Review
This is a second Step for the error notifications. Errors are now transferred to the error console and a tooltip above the according entry in the calendar list displays whether a calendar is readOnly or disabled. The user is no longer bothered with frequent message prompts. Christian only wanted a genera error message text.For more detailed information the user may see the error console. I invested some time in the ui changes of the calendar list to better depict the error conditions but I will file a follow-up bug for it.
Attachment #322910 - Flags: ui-review?(daniel.boelzle)
Attachment #322910 - Flags: review?(philipp)
Berend, the patch doesn't work on my Mac build. It only shows a warning in the console: Warning: There has been an error reading data for calendar: Frank Loehmann. However, this error is believed to be minor, so the program will attempt to continue. Error number:0x804a021c. Description: The user is denied access. What irritates me a bit is that it always states "... an error reading data...", even if I try to modify the calendar.
Comment on attachment 322910 [details] [diff] [review] patch v. #2 >+ var cbCol = this.treebox.columns > .getNamedColumn("calendar-list-tree-checkbox"); Indent second line correctly >+ onMouseMove: function cLTV_onMouseMove(event) { >+ var row = this.treebox.getRowAt(event.clientX, event.clientY); >+ if (row > -1) { >+ if (!this.mCalendarProps) { >+ var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"] >+ .getService(Components.interfaces.nsIStringBundleService); >+ this.mCalendarProps = sbs.createBundle("chrome://calendar/locale/calendar.properties"); >+ } Why not use calGetString() ? >+ <tooltip id="calendar-tooltip"> >+ <label value=""/> >+ </tooltip> ... >+ if (tooltipText != null) { >+ var tooltip = document.getElementById("calendar-tooltip"); >+ tooltip.firstChild.value = tooltipText; >+ treeChildren.setAttribute("tooltip", "calendar-tooltip"); >+ } else { >+ treeChildren.removeAttribute("tooltip"); >+ } >+ } >+ }, Instead, you could use the tooltiptext attribute and drop the <tooltip> element. See http://developer.mozilla.org/en/docs/XUL:tooltip >- wWatcher.openWindow(null, >- "chrome://calendar/content/calErrorPrompt.xul", >- "_blank", >- "chrome,dialog=yes,alwaysRaised=yes", >- paramBlock); Please file a follow-up bug to decide on the future error strategy, if we want to use the calErrorPrompt and such, or if we want to remove it. >+errornumber=Error number: I believe the common phrase is "Error code". Also please camelCase, i.e errorNumber and errorDescription. r=philipp
Attachment #322910 - Flags: review?(philipp) → review+
Status: NEW → ASSIGNED
Attached patch patch v. #3Splinter Review
unbitrotted last patch...
Attached patch patch v. #4Splinter Review
This patch represents my current state of the art. I ran into the following problem: When I committed a transaction on a corrupted ics calendar I could not query the error status on operationComplete" and thus implement an appropriate error handling. Daniel wanted to take care about this.
- fires additional errors to signal that reading or modification has failed. - gdata missing
Attachment #325982 - Flags: review?(philipp)
Attachment #325982 - Flags: review?(philipp) → review+
gdata, caldav untested
Attachment #325982 - Attachment is obsolete: true
Attachment #326893 - Flags: review?(philipp)
Attachment #326893 - Flags: review?(philipp) → review+
Would be good to get caldav tested. I don't currently have a caldav server running to get this tested.
Comment on attachment 326893 [details] [diff] [review] [checked in] more calIErrors, adding currentStatus property, consolidating error handling into base - checked in on HEAD and MOZILLA_1_8_BRANCH - added following to calCalendarManager.js for now, Berend will remove that block: announceError: function(aErrNo, aMessage) { // XXX swallow MODIFICATION_FAILED and READ_FAILED for now unless Berend has finished his work... switch (aErrNo) { case Components.interfaces.calIErrors.READ_FAILED: case Components.interfaces.calIErrors.MODIFICATION_FAILED: return; } - fixed one typo
Attachment #326893 - Attachment description: more calIErrors, adding currentStatus property, consolidating error handling into base → [checked in] more calIErrors, adding currentStatus property, consolidating error handling into base
Attached patch patch v. #6Splinter Review
This patch handles the error as discussed: Writing errors throw a messagebox once a the status of the calendars is displayed in a tooltip of the calendar list. In a later step we can display an icon. All errors are sent as warnings to the error console.
Attachment #327099 - Flags: review?(daniel.boelzle)
Attachment #327099 - Flags: review?(daniel.boelzle) → review?(philipp)
Comment on attachment 327099 [details] [diff] [review] patch v. #6 >+ <tooltip id="calendar-tooltip"> >+ <label value=""/> >+ </tooltip> This is probably not needed, use the tooltiptext attribute instead. http://developer.mozilla.org/en/docs/XUL:Attribute:tooltiptext >+ onmousemove="calendarListTreeView.onMouseMove(event);" > onPropertyChanged: function cMO_onPropertyChanged(aCalendar, > aName, > aValue, >- aOldValue) {}, >+ aOldValue) { >+ if (aName == "currentStatus") { >+ if (Components.isSuccessCode(aValue)) { >+ // insert 'Successful' - image implementation here >+ } else { >+ // insert 'unsuccessful' - image implementation here >+ } >+ WARN("PROEPRTY " + aName + " of calendar " + aCalendar.name + >+ "has been changed to " + aValue); >+ } >+ }, >+ Please add TODO to the comments here and remove the WARN() since its quite common that calendar props will change and we dont want a warning for each. >+errorCode=Error code: >+errorDescription=Description: These should possibly contain %1$S, since rtl languages might need it the other way around. >+errorWriting=An error occurred when writing to the calendar '%1$S'! >+tooltipCalendarDisabled=The calendar %1$S is momentarily not available >+tooltipCalendarReadOnly=The calendar %1$S is readonly Either all messages with '' or none. I prefer none, but others may think differently. r=philipp with comments considered.
Attachment #327099 - Flags: review?(philipp) → review+
I don't see these changes in last patch: calendar.properties: changeMasterPassword=Change Master Password\u00E2\u0080\u00A6 updatesItem_default=Check for Updates\u00E2\u0080\u00A6 updatesItem_defaultFallback=Check for Updates\u00E2\u0080\u00A6 updatesItem_downloading=Downloading %S\u00E2\u0080\u00A6 updatesItem_downloadingFallback=Downloading Update\u00E2\u0080\u00A6 updatesItem_resume=Resume Downloading %S\u00E2\u0080\u00A6 updatesItem_resumeFallback=Resume Downloading Update\u00E2\u0080\u00A6 updatesItem_pending=Apply Downloaded Update Now\u00E2\u0080\u00A6 updatesItem_pendingFallback=Apply Downloaded Update Now\u00E2\u0080\u00A6 updatesItem_default=Check for Updates\u00E2\u0080\u00A6 updatesItem_defaultFallback=Check for Updates\u00E2\u0080\u00A6 updatesItem_downloading=Downloading %S\u00E2\u0080\u00A6 updatesItem_downloadingFallback=Downloading Update\u00E2\u0080\u00A6 updatesItem_resume=Resume Downloading %S\u00E2\u0080\u00A6 updatesItem_resumeFallback=Resume Downloading Update\u00E2\u0080\u00A6 updatesItem_pending=Apply Downloaded Update Now\u00E2\u0080\u00A6 updatesItem_pendingFallback=Apply Downloaded Update Now\u00E2\u0080\u00A6 A mistake?
Target Milestone: --- → 0.9
>This is probably not needed, use the tooltiptext attribute instead. Yes it works with the tooltiptext attribute. The tooltip element was dispensible indeed. I did not intentionally oversaw this comment after your first review. I checked in the patch on trunk and MOZILLA_1_8_BRANCH after I addressed philipps comments and I also restored UTF-8 in calendar.properties ->
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment on attachment 322910 [details] [diff] [review] patch v. #2 Removing ui-review request because bug is closed.
Attachment #322910 - Flags: ui-review?(daniel.boelzle)
Christian, AFAIR different icons are still missing in the calendar list, so users get to know which calendar has problems in case of an error, and removing the interim error box (MODIFICATION_FAILED).
Status: RESOLVED → REOPENED
Flags: wanted-calendar0.9+ → blocking-calendar0.9+
Resolution: FIXED → ---
Assignee: Berend.Cornelius → philipp
Status: REOPENED → NEW
What is still missing in the bug and who is in charge for fixing it? The assignee is Philipp, but comment 19 seems to imply that Christian is the one, who should fix this bug. I also don't understand why this is a blocker. Daniel, can you elaborate?
There's still nothing that indicates that an error has happened except for the error console (which I assume hardly anyone is aware of). We need a different icon/indicator in the calendar list. AFAIK Christian and Philipp are already working on this.
Whiteboard: [needs patch]
Assignee: philipp → Berend.Cornelius
Attached image notification icons
Christian gave me an image with the two icons to be displayed when a) ...the calendar is readonly. He was very unhappy with the current black/white padlock that we display in the calendar-color cell, so he wanted to have this replaced. The current image "calendar-readOnly.png" will consequently be removed from the cvs repository. b) ...the calendar is not available because reading from it failed. In this case we will use an icon conforming to the standard warning symbol. When discussing the problem over we noticed the following implications. The icons should not be displayed over a colored background because they might under certain colors not being distinguishable. That's why we put the icons in a fourth tree column on the right hand side of the calendar list. So far the column we use is a "cycler column" where the user can toggle the readonly state by clicking on it. We abandoned this functionality as it is no longer perceivable in our new column that is in most of the times empty.
Attached patch patch v. #7Splinter Review
This patch hopefully resolves the demands of this issue. I will ask Andreas for testing it on Monday before giving it to review. Of course any prior comments are highly appreciated.
Comment on attachment 336059 [details] [diff] [review] patch v. #7 Codewise, I´d give this patch r+.
Attachment #336059 - Flags: review+
Berend, are you going to check this in, or is something still missing?
Status: NEW → ASSIGNED
Attachment #336059 - Flags: ui-review?(christian.jansen)
Comment on attachment 336059 [details] [diff] [review] patch v. #7 Ooops, I forgot to query for ui-review
Comment on attachment 336059 [details] [diff] [review] patch v. #7 ui=Christian
Attachment #336059 - Flags: ui-review?(christian.jansen) → ui-review+
patch checked in on trunk and MOZILLA_1_8_BRANCH -> fixed
Status: ASSIGNED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Whiteboard: [needs patch]
A visible scrollbar in the calendar list covers the read only icons.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
No longer blocks: 446002
remaining issue is not blocking 0.9 and deferred into bug 453409
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Checked in lightning build 2008090303 and sunbird 20080902 -> VERIFIED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: