Closed Bug 1331563 Opened 8 years ago Closed 8 years ago

Blacklist certain URI schemes (e.g., about:) in bookmarks

Categories

(Firefox for Android Graveyard :: Android Sync, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: hectorz, Unassigned)

References

Details

We'd like the mobile bookmarks to be more easily discoverable on desktop (bug 1296564), and we've built a simple solution in our extension. Clicking about:firefox will open a error page for malformed URI, which is confusing for our users. Bug 748354 talked about about:firefox etc. shouldn't be synced to desktop, and was later duped into bug 718153. But bug 718153 was then scoped down to history, and it seems no bug was filed for the bookmarks part.
bookmarks seem a little tricky to get right - you'd have to ensure the parent record you upload makes no reference to it and still magically handle that same parent as incoming (and obviously still missing that entry) when desktop modifies the folder. That's probably doable though. Desktop doesn't do anything like that, so there's still the reverse problem - an about: page bookmarked on desktop may not be known on mobile. Desktop *does* filter the list of tabs though, both for the tabs collection and "send tab to device" - the filter is at https://dxr.mozilla.org/mozilla-central/rev/3cedab21a7e65e6a1c4c2294ecfb5502575a46e3/services/sync/services-sync.js#33
Hector, if you bookmark about:firefox on Android, does it go into the "Mobile Bookmarks" folder? I agree this isn't ideal, but that makes it clearer that it's specific to mobile. If you're controlling the UI for these bookmarks in the extension, would you be willing to filter out these bookmarks? For reasons in comment 1, this is tricky to handle in the general case, so I suspect it might end up as a WONTFIX.
Flags: needinfo?(bzhao)
In general, it is not sensible to only sync *some* bookmarks within a synced bookmark tree. The only reasonable options I see are: - Hide bookmarks of about:firefox or other unsupported URLs in desktop Firefox. - Show them, but don't try to load them. After all, a user might want to delete them. - Support them! Hell, if we're going to support moz://a, why not about:firefox? This bug as phrased -- "Blacklist certain URI schemes" -- is a WONTFIX, but you could morph it to one of those three options. See also Bug 1177516. (More broadly, this is no different to a user bookmarking an intranet site, mobile-only site, add-on URL, or whatever. One cannot expect every device in a sync constellation to be able to open every bookmarked URL, and they should recover gracefully from that eventuality.)
(In reply to Kit Cambridge [:kitcambridge] from comment #2) > Hector, if you bookmark about:firefox on Android, does it go into the "Mobile Bookmarks" folder? about:firefox is one of the default bookmarks on Android, and the very reason I filed this bug. > If you're controlling the UI for these bookmarks in the extension, would you be willing to filter out these bookmarks? In our extension, we're calling the `PlacesMenu`[1] from [2] to render the mobile bookmark query into a menu popup. I guess it's possible to override `PlacesMenu` to hide certain urls. But since we want a widget created in vanilla Firefox (bug 1296564), I think such filtering should be done in Firefox, too. > For reasons in comment 1, this is tricky to handle in the general case, so I suspect it might end up as a WONTFIX. Thinking more about it, we don't really care about the general case, just hide the "about:firefox" from defaults would be good enough. [1]: https://dxr.mozilla.org/addons/source/addons/647194/components/mozCNGuard.js#816 [2]: https://dxr.mozilla.org/mozilla-central/source/browser/components/places/content/browserPlacesViews.js#1730
Flags: needinfo?(bzhao)
Marking this as wontfix. It seems that this sort of filtering, if still desired, could be easily done by the consumers of sync data.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Product: Android Background Services → Firefox for Android
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.