Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Expose bookmarks on the Content Feed #442

Closed
fernandojsg opened this issue Aug 29, 2018 · 10 comments
Closed

Expose bookmarks on the Content Feed #442

fernandojsg opened this issue Aug 29, 2018 · 10 comments
Assignees
Labels
enhancement This issue is a new feature or request P5 Will not fix, but will accept a patch
Milestone

Comments

@fernandojsg
Copy link

fernandojsg commented Aug 29, 2018

As exposed on #347 (comment)

TL;DR The idea is to be able to bookmark content from the FxR UI and show it on a specific category for that on the Content Feed.
Even so it could be an MVP before we have some proper UI/UX for the bookmarks on the FxR chrome, they both could coexist as they do right now on the new tab on Firefox Desktop.
The content feed should be able to remove bookmarks, although a two-ways API is encouraged for MVP we could just add them to a filter list on the localstorage for the page and just filter them from the list provided by the browser.

@bluemarvin
Copy link
Contributor

I'm asking about JavaScript injection and if/when it will be added to GeckoView.

@cvan
Copy link
Contributor

cvan commented Aug 29, 2018

thanks!

see my comments elsewhere:

it may be easier to just use Gecko's Bookmarks engine directly. or the browser.bookmarks WebExtension API.

but, yeah JavaScript could be injected or we could pass the bookmarks as the Home URL on browser load/click of the Home icon, like so:

https://webxr.today/?region=us#{"bookmarks":[{"url":"http://example.com","color":"#ccc"},{"url":"http://instagram.com","color":"#ffa500"}]}

and then the Content Feed could just listen for any hash changes, so the page wouldn't need to be refreshed:

const getHash = () => window.location.hash.substr(1);
const parseBookmarks = hash => hash ? JSON.parse(hash).bookmarks : [];

let bookmarks = parseBookmarks(getHash());

window.addEventListener('hashchange', () => {
  bookmarks = parseBookmarks(getHash());
});

@bluemarvin
Copy link
Contributor

GeckoView doesn't support the Gecko Bookmarks engine, that is desktop only.

@cvan
Copy link
Contributor

cvan commented Aug 30, 2018

gotcha. which persistent data-storage API or structure would you suggest I consider using to create an MVP? master...cvan:bookmarks

@nancyhang
Copy link
Contributor

@bluemarvin Is there a GV API for this?

@bluemarvin
Copy link
Contributor

GV does not have a bookmark API, it is the responsibility of the embedding application to support bookmarks. The android-components project may have a bookmark component.

@keianhzo
Copy link
Contributor

A bookmarks implementation is coming to Android Components. Opened a placeholder ticket for that.

@avrignaud avrignaud removed the v1.1 label Oct 30, 2018
@larsbergstrom
Copy link

I am assuming that we are now done with this issue, since we've chosen a different way to implement it.

@cvan
Copy link
Contributor

cvan commented Nov 26, 2018

Let's keep this open, since there is still discussion of exposing the Bookmarks in the Feed in future designs. Thanks for checking on this one.

@philip-lamb philip-lamb added enhancement This issue is a new feature or request P5 Will not fix, but will accept a patch labels Feb 25, 2019
@philip-lamb philip-lamb added this to the v1.x milestone Feb 25, 2019
@philip-lamb philip-lamb modified the milestones: v1.x, Icebox Apr 10, 2019
@jvonitter
Copy link
Contributor

tracking this in #759

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement This issue is a new feature or request P5 Will not fix, but will accept a patch
Projects
None yet
Development

No branches or pull requests

9 participants