Closed Bug 839978 Opened 11 years ago Closed 3 years ago

Add way to set keywords when bookmarking a tab

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: julian.viereck, Unassigned)

References

Details

When I press the star button form the options menu I'd like to set some keywords as well to keep my bookmarks organized. Ideally, a new list like the ones when pressing "Tools" should show up showing my already once typed keywords and a way to add a new keyword.

Does it make senses to have this included in the default Firefox for Android release or is this better of to be implemented as a addon?

In case it should ship with the browser by default, I would like to take this bug. Could someone mentor me please as this is my first Firefox For Android bug I'm working on. Especially, what should the UI be?
For what it's worth, you can edit your bookmark by long-tapping on it in the bookmarks menu, selecting 'edit', and adding keywords there.
I'm cc'ing ibarlow here to get some UX feedback on this.

It seems like it might be annoying for additional UI to pop up after tapping the star button, so I'm not sure if we're going to want to do this or not.

In case you want to start experimenting, this is where we currently handle the bookmark menuitem action:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/BrowserApp.java#1079

This could be a cool add-on. We definitely have APIs to let you add your own menuitem, but I'm not sure if we have a way for you to override the current bookmark menuitem behavior. Also, our bookmarking code is all on the Java side, which means we would likely need to add new APIs to let an add-on edit bookmarks from JS.

You can try directly interacting with the sqlite browser.db from an add-on, but that sounds like it could be risky, especially if we end up changing our bookmark schema. I've hacked around with that in the past:
https://github.com/leibovic/skeleton-addon-fxandroid/blob/profilecopy/bootstrap.js

Feel free to ask questions in #mobile. We're usually pretty active in there :)
Flags: needinfo?(ibarlow)
Sounds like a good API to add for the java addons.
Depends on: 799631
(In reply to :Margaret Leibovic from comment #2)
> I'm cc'ing ibarlow here to get some UX feedback on this.
> 
> It seems like it might be annoying for additional UI to pop up after tapping
> the star button, so I'm not sure if we're going to want to do this or not.

Agreed. Maybe a long-press on the star button slides in the tags list? But then it's the question on how to make this "you can press this button for a long time to get some additional functionality" discoverable to the user.

(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #3)
> Sounds like a good API to add for the java addons.

I'm a little bit confused about this. Can addons execute Java code? Or do you mean it would be good to expose this Java APIs to addons via some JavaScript API?
Alternatively, I started adding an API in bug 830761 for showing what I called "super toasts" that we had kicked around for a similar feature (exposing some UI to add shortcuts to the homescreen). The idea was to show a toast when you added a bookmark that says:

"Bookmark Added           | Edit"

and clicking edit would bring up some more options. Ignoring it would... well ignore it.
(In reply to Julian Viereck from comment #4)
> (In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #3)
> > Sounds like a good API to add for the java addons.
> 
> I'm a little bit confused about this. Can addons execute Java code? Or do
> you mean it would be good to expose this Java APIs to addons via some
> JavaScript API?

In bug 794479 we added the ability for addons to include some java code (in the form of a dex file) and have it loaded by Fennec. However there are no APIs exposed to the addon java code yet so there's not many useful things they can do. I was suggesting that this might be something we can consider adding an API for.
(In reply to Julian Viereck from comment #4)
> (In reply to :Margaret Leibovic from comment #2)
> > I'm cc'ing ibarlow here to get some UX feedback on this.
> > 
> > It seems like it might be annoying for additional UI to pop up after tapping
> > the star button, so I'm not sure if we're going to want to do this or not.
> 
> Agreed. Maybe a long-press on the star button slides in the tags list? But
> then it's the question on how to make this "you can press this button for a
> long time to get some additional functionality" discoverable to the user.

While playing with my tablet, I've noticed there are two different places where the bookmark button is located: for the tablet-fenec it's in the url-bar while for the phone-fenec it is on top of the option list.

*For phone-fenec*: Instead of long pressing, the list slides in as you swipe on the bookmark button. This can be indicated by adding some stripes to the right, which then open a new list by sliding the old one to the left and out of the view. 

*For tablet-fenec*: the bookmark button is on the top of the toolbar (at least for my 10" tablet). Pressing the button could set the bookmark and then in addition open a drop down menu like pressing the option button on the table in the right-top corner does. For the table, the behaviour would then come close to the one known on desktop if the user pressed CMD+D (on Mac at least) to open the "Edit This Bookmark" popup.

The UX for the tablet seems reasonable to me and I think it makes sense to build this into the tablet-fenec by default (not as an addon). How about implementing this feature for tablet-fenec first and then rethink on how to do it for phone-fenec once the UX is clear?
( Sorry, I should have read all comments before dropping in my own idea )

(In reply to Wesley Johnston (:wesj) from comment #5)
> Alternatively, I started adding an API in bug 830761 for showing what I
> called "super toasts" that we had kicked around for a similar feature
> (exposing some UI to add shortcuts to the homescreen). The idea was to show
> a toast when you added a bookmark that says:
> 
> "Bookmark Added           | Edit"
> 
> and clicking edit would bring up some more options. Ignoring it would...
> well ignore it.

This sounds fantastic to me for the phone-fenec use case. For tablets, I think the list that drops down/opens is better, as otherwise the user has to move its finger for a long distance from the star button on the top-right to the toast displayed in the center of the screen.
Unassign me as I don't plan to work on this in the near future. I think the best to do here is to start with an Addon and then if the idea is good enough ship it in the default browser code. In case I start working on an Addon I will try to align with the coding standards of Fennec, such that the Addon could should be relatively straight forward to be ported into core-Fennec code base.
Assignee: jviereck.dev → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(ibarlow)
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.