better bookmarking
clarkbw opened this issue · comments
If we're going to continue doing auto-bookmarking of shares we should improve our bookmarking system to accommodate the different accounts we'll be implementing.
Some options:
- Keep tagging and improve the tagging system
- Stop dynamic tagging and only tag "f1", "shared"
- Stop tagging all together
- Stop bookmarking, pack up and go home
To improve the dynamic tagging we need some better data from the returned data object. Currently we are getting domain, username, userid and each service uses them a bit differently so we can't just grab the username from every share. Likewise the domain is useful for a number of sites except "google.com" which really was GMail.
Some example data we're getting back in the data object
// data {
// username : jeanreilly
// userid : 78972387
// domain : twitter.com
// }
// data {
// username : jn.rlly
// userid : jn.rlly@gmail.com
// domain : google.com
// }
Our success function which processes the bookmarks.
success: function (data) {
this.updateStatus(0);
// XXX we should work out a better bookmarking system
if (ffshare.prefs.bookmarking) {
var tags = ['shared', 'f1'];
if (data.domain === 'twitter.com') {
tags.push("twitter");
}
if (data.domain === 'facebook.com') {
tags.push("facebook");
}
var nsiuri = Services.io.newURI(gBrowser.currentURI.spec, null, null);
Services.bookmarks.insertBookmark(Services.bookmarks.unfiledBookmarksFolder,
nsiuri, Services.bookmarks.DEFAULT_INDEX,
this.getPageTitle().trim());
PlacesUtils.tagging.tagURI(nsiuri, tags);
}
},
assuming #1, ignoring code and what data is available, what how would you like it to work?
Good question. I feel like we actually want the names of the accounts, i.e. the names we use to display them in the panel. Facebook, GMail, Yahoo, Google Apps, etc.
While this may not fully cover this issue, we have changed the tagging to use the service names. If there are other items for improvement it would be good to generate a list.
Ok, the reported problem is fixed. Lets handle the rest as a project in the Planning doc