Closed
Bug 393464
Opened 17 years ago
Closed 17 years ago
Bookmarks manager doesn't search in tags field
Categories
(Firefox :: Bookmarks & History, defect)
Firefox
Bookmarks & History
Tracking
()
VERIFIED
FIXED
Firefox 3 beta1
People
(Reporter: D-Kalck, Assigned: dietrich)
References
Details
Attachments
(3 files, 2 obsolete files)
10.60 KB,
patch
|
moco
:
review+
mconnor
:
approval1.9+
|
Details | Diff | Splinter Review |
53.84 KB,
image/png
|
Details | |
6.96 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a8pre) Gecko/2007082305 Minefield/3.0a8pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a8pre) Gecko/2007082305 Minefield/3.0a8pre
I added a page to my bookmarks and tagged it, when I go to Bookmarks manager I see the tags in the column, but if I use 'Search in Bookmarks' of the download manager and type one of the tag I used for the page, it doesn't find it.
Reproducible: Always
Steps to Reproduce:
1.Tag a page with for example "computer"
2.Type "computer" in the search of the Bookmarks manager
Actual Results:
The page does not appear in the results
Expected Results:
The page should appear in the results
Reporter | ||
Updated•17 years ago
|
Version: unspecified → Trunk
Assignee | ||
Updated•17 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Summary: Bookmarks manager don't search in tag field → Bookmarks manager doesn't search in tag field
Target Milestone: --- → Firefox 3 M9
Version: Trunk → unspecified
Reporter | ||
Updated•17 years ago
|
Summary: Bookmarks manager doesn't search in tag field → Bookmarks manager doesn't search in tags field
Reporter | ||
Updated•17 years ago
|
OS: All → Windows XP
Hardware: All → PC
Version: unspecified → Trunk
Reporter | ||
Updated•17 years ago
|
OS: Windows XP → All
Hardware: PC → All
Reporter | ||
Updated•17 years ago
|
Version: Trunk → unspecified
Comment 1•17 years ago
|
||
see also bug #393584
Depends on: 393584
Flags: blocking-firefox3?
Target Milestone: Firefox 3 M9 → ---
Version: unspecified → Trunk
Assignee | ||
Updated•17 years ago
|
Assignee: nobody → dietrich
Assignee | ||
Comment 3•17 years ago
|
||
ugh, there must be a better way to get those tags from nsIVariant array.
Attachment #279877 -
Flags: review?(sspitzer)
Assignee | ||
Comment 4•17 years ago
|
||
Comment on attachment 279877 [details] [diff] [review]
v1
needs to be exact tag match, as in location bar.
Attachment #279877 -
Flags: review?(sspitzer)
Comment 5•17 years ago
|
||
> needs to be exact tag match, as in location bar.
I think it should be a case insensitive exact match.
Comment 6•17 years ago
|
||
some comments
1) as we discussed in irc, move the call to GetTagsForURI() until as late as possible
2) consider changing GetTagsForURI() to be URIHasTag()
that method would take a nsIURI and your search term (the string) and return a bool.
then in URIHasTag(), you'd get the nsIVariant (the array of tags). for each tag, see if it exactly matches your search term (but do a case insensitive compare). this would prevent creating the string array and copying the strings.
note, as we discussed over irc, because the tagging service returns the tags as sorted, you could do a binary search instead of a linear one.
Assignee | ||
Comment 7•17 years ago
|
||
fixes comments, broadens tests
Attachment #279877 -
Attachment is obsolete: true
Attachment #279942 -
Flags: review?(sspitzer)
Comment 8•17 years ago
|
||
Comment on attachment 279942 [details] [diff] [review]
v2
1)
+// nsITaggingService
+#define TAGGING_SERVICE_CID "@mozilla.org/browser/tagging-service;1"
+
I'd recommend moving that #define to the tagging service idl, like this:
%{C++
#define TAGGING_SERVICE_CID "@mozilla.org/browser/tagging-service;1"
%}
(See lxr for other examples of where we do this, like toolkit\components\startup\public\nsIUserInfo.idl)
2) binary search, nice!
a) can add a comment about how you can use this because tags are sorted?
b) overkill: for your linear search again since tags are sorted, if position > 0, you can stop searching.
c) hmm, concern: tags are sorted, but are they sorted by the tagging service in a case insensitive way? (They may not be, in which case we need to fix that.)
d) hmm, the binary search searches the tags on a given uri. while the user may have lots of tags, do we expect them to have tons of tags on a single uri?
If not, I still like URIHasTag(), but maybe I've lead you down the wrong path, and we should just do a linear complete search, and not even worry about doing a case insensitive sort in the tagging service.
3)
+ * Contributor(s):
+ * Seth Spitzer <sspitzer@mozilla.com>
you, not me.
Assignee | ||
Comment 9•17 years ago
|
||
comments fixed
Attachment #279942 -
Attachment is obsolete: true
Attachment #279950 -
Flags: review?(sspitzer)
Attachment #279942 -
Flags: review?(sspitzer)
Comment 10•17 years ago
|
||
Comment on attachment 279950 [details] [diff] [review]
v3
r=sspitzer, nice.
sorry about misleading you down the binary search pre-optimization path.
Attachment #279950 -
Flags: review?(sspitzer) → review+
Assignee | ||
Comment 11•17 years ago
|
||
Comment on attachment 279950 [details] [diff] [review]
v3
requesting approval: this patch enables searching over tags in the bookmarks sidebar, organizer, and smart folders (saved searches). risk is fairly low. it's got accompanying tests, and the rest of the places test suite would have caught regressions.
Attachment #279950 -
Flags: approval1.9?
Updated•17 years ago
|
Attachment #279950 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 12•17 years ago
|
||
Checking in toolkit/components/places/public/nsITaggingService.idl;
/cvsroot/mozilla/toolkit/components/places/public/nsITaggingService.idl,v <-- nsITaggingService.idl
new revision: 1.4; previous revision: 1.3
done
Checking in toolkit/components/places/src/nsNavHistory.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.cpp,v <-- nsNavHistory.cpp
new revision: 1.167; previous revision: 1.166
done
Checking in toolkit/components/places/src/nsNavHistory.h;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.h,v <-- nsNavHistory.h
new revision: 1.96; previous revision: 1.95
done
RCS file: /cvsroot/mozilla/toolkit/components/places/tests/bookmarks/test_395101.js,v
done
Checking in toolkit/components/places/tests/bookmarks/test_395101.js;
/cvsroot/mozilla/toolkit/components/places/tests/bookmarks/test_395101.js,v <-- test_395101.js
initial revision: 1.1
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 13•17 years ago
|
||
I tested this using Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a8pre) Gecko/2007090704 Minefield/3.0a8pre. I get two entries when I try to tag a page. See attached screenshot for a sample of what happens when I try to tag any page and then search for it in organize bookmarks.
Comment 14•17 years ago
|
||
This is what I get when I tag the espn.go.com home page with "sports" and then search for "sports" in organize bookmarks. This happens when I tagged other sites as well - I always seem to get two entries that come up. Not sure whether this is expected.
Assignee | ||
Comment 15•17 years ago
|
||
(In reply to comment #14)
> Created an attachment (id=280075) [details]
> Screenshot of issue
>
> This is what I get when I tag the espn.go.com home page with "sports" and then
> search for "sports" in organize bookmarks. This happens when I tagged other
> sites as well - I always seem to get two entries that come up. Not sure whether
> this is expected.
>
no, not expected. looking into it.
Comment 16•17 years ago
|
||
Just by way of information I get the same behavior with both a new profile and an existing one (used only for Minefield).
Comment 17•17 years ago
|
||
This has been thus since tags hit the trunk. I saw it when I searched bookmarks for "/" to see the infamous invisible "all bookmarks". You get one "no title" entry per tag, plus the titled original. The untitleds show up in the bookmarks table, as I recall, as children of the tags, one row per child.
I just assumed it was due to the lack of UI at the time, and they'd be hidden from view once tags were functional, so I didn't file a bug.
Assignee | ||
Comment 18•17 years ago
|
||
reverting until we fix search-in-folders so that the tag entries themselves won't show up in results.
Checking in toolkit/components/places/public/nsITaggingService.idl;
/cvsroot/mozilla/toolkit/components/places/public/nsITaggingService.idl,v <-- nsITaggingService.idl
new revision: 1.5; previous revision: 1.4
done
Checking in toolkit/components/places/src/nsNavHistory.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.cpp,v <-- nsNavHistory.cpp
new revision: 1.169; previous revision: 1.168
done
Checking in toolkit/components/places/src/nsNavHistory.h;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.h,v <-- nsNavHistory.h
new revision: 1.99; previous revision: 1.98
done
Checking in toolkit/components/places/tests/bookmarks/test_395101.js;
/cvsroot/mozilla/toolkit/components/places/tests/bookmarks/test_395101.js,v <-- test_395101.js
new revision: 1.2; previous revision: 1.1
done
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 19•17 years ago
|
||
Assignee | ||
Updated•17 years ago
|
Target Milestone: --- → Firefox 3 M9
Comment 20•17 years ago
|
||
Re-landed so I can land search-in-folders support, and then fix the issues raised here (in follow-ups).
mozilla/toolkit/components/places/public/nsITaggingService.idl 1.6
mozilla/toolkit/components/places/src/nsNavHistory.cpp 1.170
mozilla/toolkit/components/places/src/nsNavHistory.h 1.100
mozilla/toolkit/components/places/tests/bookmarks/test_395101.js 1.3
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Flags: blocking-firefox3? → blocking-firefox3+
Comment 21•17 years ago
|
||
> Re-landed so I can land search-in-folders support, and then fix the issues
> raised here (in follow-ups)
mano / dietrich: besides marcia's comment #14 (logged as bug #397453), what
other follow ups where there?
Assignee | ||
Comment 22•17 years ago
|
||
(In reply to comment #21)
> > Re-landed so I can land search-in-folders support, and then fix the issues
> > raised here (in follow-ups)
>
> mano / dietrich: besides marcia's comment #14 (logged as bug #397453), what
> other follow ups where there?
>
comment #14 is bug 397165, so bug 397453 seems like a dupe.
Comment 23•17 years ago
|
||
> comment #14 is bug 397165, so bug 397453 seems like a dupe.
you're right, thanks dietrich. my tree was stale.
Comment 24•17 years ago
|
||
Verified on
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9) Gecko/2008053008 Firefox/3.0
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008060309 Firefox/3.0
Status: RESOLVED → VERIFIED
Comment 25•15 years ago
|
||
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.
Description
•