Closed
Bug 886211
Opened 13 years ago
Closed 13 years ago
Provider capability for number of categories supported
Categories
(Calendar :: General, defect)
Calendar
General
Tracking
(Not tracked)
RESOLVED
FIXED
2.6
People
(Reporter: Fallen, Assigned: Fallen)
References
Details
Attachments
(1 file, 2 obsolete files)
|
12.08 KB,
patch
|
Fallen
:
review+
Fallen
:
approval-calendar-aurora+
Fallen
:
approval-calendar-beta+
|
Details | Diff | Splinter Review |
Bug 316927 added multiple category support to the UI, but there is no way for a provider to specify if only one category is supported. This needs to be added.
See the capability for maximum number of alarms for an example.
| Assignee | ||
Comment 1•13 years ago
|
||
Hey Daniel, any updates? Could you take care of this bug?
Hello Philipp,
I'm sorry, I'm quite busy now and won't be able to take of this bug anytime soon.
| Assignee | ||
Comment 3•13 years ago
|
||
Ok, thanks for the update. Reassigning to nobody, but we really need someone to take care of this in the next two weeks.
Assignee: dagomez → nobody
Status: ASSIGNED → NEW
| Assignee | ||
Comment 4•13 years ago
|
||
This patch should take care and covers the following cases:
* zero categories supported: Hides the category box.
-- Calendar dropdown gets insanely large, but I wouldn't know what
to do about it right now. collapsing the box makes it look
strange, disabling seems unnatural to me too?
* one category supported: Shows no checkboxes and single-select
* Specific number of categories: when number is reached, other checkboxes
are disabled
* Any number of categories (null, or -1)
You can test this by using the ics inspector extension (version 0.7 works, it should be on the AMO other versions page until its reviewed) and right clicking on a storage calendar, then evaluate javascript and enter:
> target.setProperty("capabilities.categories.maxCount", value);
Where value is the max count to set.
I'd like to see this in Lightning 2.6, so I'd appreciate if you could give it a test run. Merge date is August 5th.
Comment 5•13 years ago
|
||
Comment on attachment 783436 [details] [diff] [review]
categories-capability.diff
Review of attachment 783436 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good overall. r=mmecca
One minor issue: with max categories > 1, if the maximum amount of categories set, then the event is saved and re-opened, one additional category can then be selected.
::: calendar/base/content/widgets/calendar-widgets.xml
@@ +50,5 @@
> <getter><![CDATA[
> let categoryListbox = document.getAnonymousElementByAttribute(this, "anonid", "categories-listbox");
> + if (this.maxCount == 1) {
> + let selectedItem = categoryListbox.selectedItem;
> + return selectedItem ? [selectedItem.getAttribute("value")] : []
missing a ';'
Also, the indentation of the javascript in this file doesn't match the rest of the file.
Attachment #783436 -
Flags: review?(matthew.mecca) → review+
| Assignee | ||
Comment 6•13 years ago
|
||
Thanks, good catch! I've also noticed UX is a bit strange when switching from a calendar with 5 allowed categories to one with 3 allowed categories: the categories are initially still selected, when you unselect them they are disabled.
This is an edge case and would probably require some l10n string as explanation, so I think its ok to leave it as is. I think most providers will probably allow 1 or any number of categories.
Attachment #783436 -
Attachment is obsolete: true
Attachment #785162 -
Flags: review+
| Assignee | ||
Comment 7•13 years ago
|
||
Ah we have some documentation in calICalendar.idl. I've updated the documentation, its formatting and also added the alarms maxCount capability which was missing.
Attachment #785162 -
Attachment is obsolete: true
Attachment #785170 -
Flags: review+
| Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
| Assignee | ||
Comment 8•13 years ago
|
||
Comment on attachment 785170 [details] [diff] [review]
Fix - v3
And we also need this on aurora so its part of Lightning 2.6
Attachment #785170 -
Flags: approval-calendar-aurora+
| Assignee | ||
Comment 9•13 years ago
|
||
Comment on attachment 785170 [details] [diff] [review]
Fix - v3
Also approving for beta since the merge has happened.
Attachment #785170 -
Flags: approval-calendar-beta+
Comment 10•13 years ago
|
||
Comment 11•13 years ago
|
||
Updated•13 years ago
|
Target Milestone: --- → 2.6
You need to log in
before you can comment on or make changes to this bug.
Description
•