Closed Bug 387748 Opened 17 years ago Closed 17 years ago

add a tag column in the organizer center pane, for tagged items

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3 alpha8

People

(Reporter: dietrich, Assigned: christineyen+bugs)

References

()

Details

(Whiteboard: [places-ui])

Attachments

(2 files, 2 obsolete files)

see the bug URL for mockups and notes. should display the list of tags for the item, ellipsis-ized for long lists. tooltip could display full list?
Assignee: nobody → cyen
Depends on: 387485
Attached patch wip patch (obsolete) (deleted) — Splinter Review
Using Mano's tagging back-end service, just displaying the tags as a node property... unless we want to embed an editor element into the tree.

Also depending on the patch for bug 387746, the finder pane UI bug
Depends on: 387746
> unless we want to embed an editor element into the tree.

from http://developer.mozilla.org/en/docs/Firefox_3_for_developers#Tree_Improvements

trees now support editing of individual cells. Double-clicking on an editable cell will display a text field in which the user can edit the contents of the cell. 

see bug #201499 and http://wiki.mozilla.org/XUL:Tree
yeah, well, text-field != editor, I don't think this can be done without significant back-end changes to nsTree*.
 
Attached patch reads out tag back-end (obsolete) (deleted) — Splinter Review
Managed to leave off the actually adding-the-column-to-XUL bits last time, pretty ready to plug in once there is the ability to add tags via the UI...

At this point only read-only, unless we desperately want the editor element in there (despite Mano's comment 3 above). Also depends on the finder pane (bug 387746) to deal with setting columns.
Attachment #273203 - Attachment is obsolete: true
Attachment #273669 - Flags: review?(mano)
Comment on attachment 273669 [details] [diff] [review]
reads out tag back-end

per IRC.
Attachment #273669 - Flags: review?(mano) → review-
Attached patch patch (deleted) — Splinter Review
Attachment #273669 - Attachment is obsolete: true
Attachment #273855 - Flags: review?(mano)
Comment on attachment 273855 [details] [diff] [review]
patch

>Index: treeView.js
>===================================================================
>RCS file: /cvsroot/mozilla/browser/components/places/content/treeView.js,v
>retrieving revision 1.13
>diff -u -8 -p -r1.13 treeView.js
>--- treeView.js	11 Jul 2007 09:58:00 -0000	1.13
>+++ treeView.js	25 Jul 2007 21:16:02 -0000
>@@ -420,16 +420,17 @@ PlacesTreeView.prototype = {
>   COLUMN_TYPE_TITLE: 1,
>   COLUMN_TYPE_URI: 2,
>   COLUMN_TYPE_DATE: 3,
>   COLUMN_TYPE_VISITCOUNT: 4,
>   COLUMN_TYPE_KEYWORD: 5,
>   COLUMN_TYPE_DESCRIPTION: 6,
>   COLUMN_TYPE_DATEADDED: 7,
>   COLUMN_TYPE_LASTMODIFIED: 8,
>+  COLUMN_TYPE_TAGS: 9,
> 
>   _getColumnType: function PTV__getColumnType(aColumn) {
>     switch (aColumn.id) {
>       case "title":
>         return this.COLUMN_TYPE_TITLE;
>       case "url":
>         return this.COLUMN_TYPE_URI;
>       case "date":
>@@ -439,16 +440,18 @@ PlacesTreeView.prototype = {
>       case "keyword":
>         return this.COLUMN_TYPE_KEYWORD;
>       case "description":
>         return this.COLUMN_TYPE_DESCRIPTION;
>       case "dateAdded":
>         return this.COLUMN_TYPE_DATEADDED;
>       case "lastModified":
>         return this.COLUMN_TYPE_LASTMODIFIED;
>+      case "tags":
>+        return this.COLUMN_TYPE_TAGS;
>     }
>     return this.COLUMN_TYPE_UNKNOWN;
>   },
> 
>   _sortTypeToColumnType: function PTV__sortTypeToColumnType(aSortType) {
>     switch(aSortType) {
>       case Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING:
>         return [this.COLUMN_TYPE_TITLE, false];
>@@ -1013,16 +1016,24 @@ PlacesTreeView.prototype = {
>       case this.COLUMN_TYPE_TITLE:
>         // normally, this is just the title, but we don't want empty items in
>         // the tree view so return a special string if the title is empty.
>         // Do it here so that callers can still get at the 0 length title
>         // if they go through the "result" API.
>         if (PlacesUtils.nodeIsSeparator(node))
>           return "";
>         return node.title || PlacesUtils.getString("noTitle");
>+      case this.COLUMN_TYPE_TAGS:
>+        if (PlacesUtils.nodeIsURI(node)) {
>+          var tagsvc = PlacesUtils.tagging;
>+          var uri = PlacesUtils._uri(node.uri);
>+          var tags = tagsvc.getTagsForURI(uri, {});
>+          return tags.join(", ");
>+        }
>+        return "";
>       case this.COLUMN_TYPE_URI:
>         if (PlacesUtils.nodeIsURI(node))
>           return node.uri;
>         return "";
>       case this.COLUMN_TYPE_DATE:
>         if (node.time == 0 || !PlacesUtils.nodeIsURI(node)) {
>           // hosts and days shouldn't have a value for the date column.
>           // Actually, you could argue this point, but looking at the
>@@ -1097,16 +1108,20 @@ PlacesTreeView.prototype = {
>     }
> 
>     node.containerOpen = !node.containerOpen;
>   },
> 
>   cycleHeader: function PTV_cycleHeader(aColumn) {
>     if (!this._result)
>       throw Cr.NS_ERROR_UNEXPECTED;
>+    

nit: trailing spaces

>+    // Currently - don't want to allow sorting by tags

eh, cannot ;)

r=mano otherwise, this should land only once the add-bookmarks does though.
Attachment #273855 - Flags: review?(mano) → review+
Target Milestone: --- → Firefox 3 M8
Whiteboard: [swag:review+] [places-ui]
Checking in browser/components/places/content/places.xul;
/cvsroot/mozilla/browser/components/places/content/places.xul,v  <--  places.xul
new revision: 1.78; previous revision: 1.77
done
Checking in browser/components/places/content/treeView.js;
/cvsroot/mozilla/browser/components/places/content/treeView.js,v  <--  treeView.js
new revision: 1.15; previous revision: 1.14
done
Checking in browser/locales/en-US/chrome/browser/places/places.dtd;
/cvsroot/mozilla/browser/locales/en-US/chrome/browser/places/places.dtd,v  <--  places.dtd
new revision: 1.27; previous revision: 1.26
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [swag:review+] [places-ui] → [places-ui]
Attached patch as checked in (deleted) — Splinter Review
No longer depends on: 387485, 387746
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a8pre) Gecko/2007091322 Minefield/3.0a8pre ID:2007091322

VERIFIED
verified with - Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a8pre) Gecko/2007091304 Minefield/3.0a8pre
Group: security
Status: RESOLVED → VERIFIED
Group: security
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

Creator:
Created:
Updated:
Size: