Closed Bug 1140395 Opened 9 years ago Closed 9 years ago

Deprecate old keywords API

Categories

(Toolkit :: Places, defect)

defect
Not set
normal
Points:
1

Tracking

()

RESOLVED FIXED
mozilla40
Iteration:
40.3 - 11 May
Tracking Status
firefox40 --- fixed
relnote-firefox --- -

People

(Reporter: mak, Assigned: mak)

References

(Blocks 1 open bug)

Details

(Keywords: addon-compat, dev-doc-complete)

Attachments

(1 file)

we must convert keywords API consumers, and deprecate the existing API.
This is a tracking bug for that work.
Summary: Convert old keywords API consumers and deprecate them → Convert old keywords API consumers
Depends on: 1094844
Depends on: 1148457
Depends on: 1148459
Summary: Convert old keywords API consumers → Deprecate old keywords API
Depends on: 1145063
Depends on: 1148461
Depends on: 1148466
Depends on: 1148467
Depends on: 1149488
we can deprecate getURIForKeyword immediately

we can deprecate get/setPostDataForBookmark after PlacesTransactions are enabled.
http://mxr.mozilla.org/mozilla-central/search?string=postdataforbookmark

set/getKeywordForBookmark has too many consumers yet, included Sync, PlacesTransactions and some UI pieces.
http://mxr.mozilla.org/mozilla-central/search?string=keywordForBookmark

We should at least edit comments for those methods to indicate deprecation, even if we won't warn to the console for now.
Marco, should we remove this bug from "Milestone 1"? If this depends on bug 1148461 then we can't possibly deprecate the keywords API anytime soon, right?
Flags: needinfo?(mak77)
once the dependencies are done, in this bug i'll mark the "plausible" deprecations, and we'll mark it as fixed.
The fact we have 1 pending dependency is minor.
Flags: needinfo?(mak77)
I can start working on this, there's nothing blocking since for a couple APIs we can only mark deprecation in the idl javadoc.
Assignee: nobody → mak77
Points: --- → 1
Flags: qe-verify-
Flags: firefox-backlog+
Attached patch patch v1Splinter Review
Attachment #8601455 - Flags: review?(ttaubert)
Attachment #8601455 - Flags: review?(ttaubert) → review+
Status: NEW → ASSIGNED
Iteration: --- → 40.3 - 11 May
https://hg.mozilla.org/mozilla-central/rev/8ab920db907c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Release Note Request (optional, but appreciated)
[Why is this notable]: Deprecated API, consumers need to update to new API
[Suggested wording]: Places Keywords API deprecated
[Links (documentation, blog post, etc)]:

mak - I'd like to not this to gain some visibility for this change but we really need some documentation about the change including how to use the new API. Do you have a reference to documentation about the new API?
relnote-firefox: --- → ?
Flags: needinfo?(mak77)
all the documentation so far is inline:
http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/PlacesUtils.jsm#2030

I will try to create a new page on MDN for it.
this is the MDN page I created:
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Using_the_Places_keywords_API

Rethinking about this though, I'm not sure this is worth a relnote. It will be worth to relnote once we consider the bookmarks API (that includes this one) deprecated, let'say when bug 1141547 will be fixed.
The fact is the keywords feature is something very specific to Firefox, and more particularly to a single feature of the Awesomebar. I'd not expect developers to be very interested into it, unless they are working on a very specific keywords add-on (but I'd not be sure what that could do). The main access point for this API is "Add a keyword for this search" contextual option...
Flags: needinfo?(mak77)
Headsup: seems like this change created possibility to "lose" keyword in manager: Bug 1198294
not lost, unreachable. It's actually not due to the API but due to legacy code using the old API...
bug 1150678 is aimed to solve most issues.
You need to log in before you can comment on or make changes to this bug.