Closed Bug 333052 Opened 18 years ago Closed 18 years ago

places toolbar view should observe changes to titles generated by microsummary service

Categories

(Firefox Graveyard :: Microsummaries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 2 alpha2

People

(Reporter: myk, Assigned: myk)

Details

Attachments

(1 file, 1 obsolete file)

The places toolbar view should observe changes to titles generated by the microsummary service (and any other services that want to set bookmark titles) and update itself when the generated title changes.
Target Milestone: Firefox 2 alpha1 → Firefox 2 alpha2
Here's a patch that makes the places toolbar view observe changes to the "generatedTitle" annotation and update bookmark labels accordingly.

Design issues to consider in review:

1. Is "generatedTitle" the right name for this annotation?

2. I implemented a generic annotation observer that manages annotation-specific
   observers (of which there is currently just one: the generatedTitle
   annotation observer).  The generic observer will reduce code duplication
   if the view ever starts observing another annotation, and it might be useful
   for extensions that want to make the view observe other annotations,
   but perhaps it's overkill.
Attachment #217491 - Flags: superreview?(bugs)
Attachment #217491 - Flags: review?(annie.sullivan)
Some comments:

I think we should use "bookmarks/generatedTitle" as the annotation name. I'm trying to get everybody to namespace their annotations, so we should set a good example.

I was wondering if we should change the annotation observer API so you can specify which annotations you are interested in. I think this would also be helpful for the annotation service.
Comment on attachment 217491 [details] [diff] [review]
patch v1: makes toolbar view observe changes to generated title annotation

r=annie.sullivan@gmail.com, with the condition that you change generatedTitle to bookmarks/generatedTitle
Attachment #217491 - Flags: review?(annie.sullivan) → review+
> I think we should use "bookmarks/generatedTitle" as the annotation name. 
> I'm trying to get everybody to namespace their annotations, so we should set 
> a good example.

> r=annie.sullivan@gmail.com, with the condition that you change generatedTitle
> to bookmarks/generatedTitle

Makes sense.  I've made the change in this patch.


> I was wondering if we should change the annotation observer API so you can
> specify which annotations you are interested in. I think this would also be
> helpful for the annotation service.

Yeah, that may well be a better long-term solution.
Attachment #217491 - Attachment is obsolete: true
Attachment #217491 - Flags: superreview?(bugs)
Attachment #217598 - Flags: superreview?(bugs)
Comment on attachment 217598 [details] [diff] [review]
patch v2: generatedTitle -> bookmarks/generatedTitle

sr=ben@mozilla.org
Attachment #217598 - Flags: superreview?(bugs) → superreview+
Thanks all.  Fix checked in to trunk and 1.8 branch.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Component: Places → Microsummaries
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: