Closed Bug 373502 Opened 18 years ago Closed 18 years ago

Implement Fx2 style microsummary picker in the properties dialog

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3 alpha4

People

(Reporter: asaf, Assigned: asaf)

References

Details

Attachments

(1 file, 3 obsolete files)

Implement Fx2 style microsummary picker in the properties dialog.
Attached patch patch (obsolete) (deleted) — Splinter Review
Droppable it is! Other than that: * Make sure we list the currently set microsummary for a bookmark synchronously if any. I will file a follow up on also using the current generatedTitle until we get a fresh, live, title. * Don't rebuild the menu-list for each microsummary change. * Some code cleanup in the microsummary service; in particular, do not expose setters for attributes marked readonly in the interfaces. * Add equivalence-test method for microsummaries.
Attachment #258967 - Flags: review?(myk)
Attachment #258967 - Flags: review?(dietrich)
Comment on attachment 258967 [details] [diff] [review] patch after applying the patch, i was no longer able to install microsummaries. after installing one, the ms file on disk was empty, and i got this error: ************************************************************ * Call to xpconnect wrapped JSObject produced this error: * [Exception... "'[JavaScript Error: "setting a property that has only a getter" {file: "file:///Users/dayala/moz/newplaces/build-dbg/dist/MinefieldDebug.app/Contents/MacOS/components/nsMicrosummaryService.js" line: 1320}]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "<unknown>" data: yes] ************************************************************ the microsummary i used was: http://dietrich.ganx4.com/mozilla/test-microsummary.xml and the test content for it is: http://dietrich.ganx4.com/mozilla/test-microsummary-content.php (which is just a script that changes the microsummarized content each time it loads)
Attachment #258967 - Flags: review?(dietrich) → review-
Attached patch patch (obsolete) (deleted) — Splinter Review
This also stops setting per-object fields in the prototype.
Attachment #258967 - Attachment is obsolete: true
Attachment #259160 - Flags: review?(dietrich)
Attachment #258967 - Flags: review?(myk)
Comment on attachment 259160 [details] [diff] [review] patch so, this breaks microsummary installation on non-places-bookmarks builds (works fine for places-bookmarks). this check fails: if (typeof window.sidebar == "object" && typeof window.sidebar.addMicrosummaryGenerator == "function") no errors in the console. the page is stuck at "Loading...". a couple of nits: > microsummaries.AppendElement(microsummary); > } > } > >+ // If a bookmark identifier has been provided, list its microsummary >+ // synchronously if any >+ if (bookmarkID && this.hasMicrosummary(bookmarkID)) { >+ var currentMicrosummary = this.getMicrosummary(bookmarkID); >+ if (!microsummaries.hasItemForMicrosummary(currentMicrosummary)) >+ microsummaries.AppendElement(currentMicrosummary); >+ } >+ the "if any" comment looks like an unfinished sentence... >+ /** >+ * Determines whether the given microsumary is already represented in the >+ * set. >+ */ >+ hasItemForMicrosummary: function MSSet_hasMicrosummary(aMicrosummary) { >+ for (var i = 0; i < this._elements.length; i++) { >+ if (this._elements[i].equals(aMicrosummary)) >+ return true; >+ } >+ return false; >+ }, >+ nit: weird property name, wouldn't |hasMicrosummary| do (like you have in the function name..)? also, the property name and function name should match.
Attachment #259160 - Flags: review?(dietrich) → review-
(In reply to comment #4) > (From update of attachment 259160 [details] [diff] [review]) > so, this breaks microsummary installation on non-places-bookmarks builds (works > fine for places-bookmarks). this check fails: > > if (typeof window.sidebar == "object" && > typeof window.sidebar.addMicrosummaryGenerator == "function") > > no errors in the console. the page is stuck at "Loading...". fyi: i tried this in a trunk nightly, and the problem does not occur.
Comment on attachment 259160 [details] [diff] [review] patch After the check-in of bug 373362, this works fine. Sorry for the confusion.
Attachment #259160 - Flags: review- → review+
Attached patch for checkin (obsolete) (deleted) — Splinter Review
Attachment #259160 - Attachment is obsolete: true
Target Milestone: Firefox 3 alpha3 → Firefox 3 alpha4
Attached patch for checkin (deleted) — Splinter Review
Attachment #259318 - Attachment is obsolete: true
mozilla/browser/components/microsummaries/public/nsIMicrosummaryService.idl 1. mozilla/browser/components/microsummaries/src/nsMicrosummaryService.js 1.59 mozilla/browser/components/places/content/bookmarkProperties.js 1.38 mozilla/browser/components/places/content/bookmarkProperties.xul 1.20 mozilla/browser/locales/en-US/chrome/browser/places/bookmarkProperties.dtd 1.11 mozilla/browser/themes/pinstripe/browser/places/bookmarkProperties.css 1.6 mozilla/browser/themes/winstripe/browser/places/bookmarkProperties.css 1.6
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
1.7 for nsIMicrosummaryService.idl.
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h". In Thunderbird 3.0b, you do that as follows: Tools | Message Filters Make sure the correct account is selected. Click "New" Conditions: Body contains places-to-b-and-h Change the action to "Delete Message". Select "Manually Run" from the dropdown at the top. Click OK. Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter. Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: