Closed Bug 830761 Opened 12 years ago Closed 8 years ago

Add a way to undo Clear Pin(s)

Categories

(Firefox for Android Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ibarlow, Unassigned, Mentored)

Details

(Whiteboard: [lang=java])

Attachments

(1 file, 1 obsolete file)

We should allow people to backtrack if they accidentally clear a pinned site or all their pinned sites on about:home We can probably use a standard Android undo action here: ---------------------------------- | 1 pin removed | <- UNDO | ----------------------------------
No longer blocks: 817675
As the first part of this, we'd need some way to add buttons to toasts. After digging, I don't think its possible to actually do this with the built in Toast framework. i.e. you can add buttons, but you can't touch anything in the toast: http://stackoverflow.com/questions/3308975/button-in-custom-android-toast So everyone who wants to do this creates their own toast framework, which is what this does. It also themes it, which will likely need some UX feedback. I'm not sure whether or not to ask for review until we have that, but figured you could decide what you want mfinkle. I'll post a screenshot to get some UX feedback from ian. I'll likely have to put this aside for a bit to finish up some of the other tweaks to pinned sites that we want to implement.
Attachment #703766 - Flags: review?(mark.finkle)
Attached image Screenshot
This is a really simple screenshot. I should also have mentioned the API I wrote for this addons can pass some text for the button as well as a callback in an options element on the toast.show method. i.e.: NativeWindow.toast.show("Text", "long", { button: "Undo", callback: function() { } });
Flags: needinfo?(ibarlow)
Comment on attachment 703766 [details] [diff] [review] Patch 1/2 - Add the ability to add buttons to toasts I think we need to discuss this feature more before we get into reviews
Attachment #703766 - Flags: review?(mark.finkle)
Woah, we have these toasts now. Yay!
Flags: needinfo?(ibarlow)
Whiteboard: [mentor=wesj][lang=java]
Mentor: wjohnston
Whiteboard: [mentor=wesj][lang=java] → [lang=java]
Hi, I want to work on it, how to get started? I am good at android development.
Flags: needinfo?(margaret.leibovic)
Attachment #703766 - Attachment is obsolete: true
Flags: needinfo?(margaret.leibovic)
(In reply to Nihar Trivedi from comment #5) > Hi, > I want to work on it, how to get started? > I am good at android development. Hi Nihar! First of all, do you have a Firefox for Android build environment set up? If not, you'll want to follow the directions here: https://wiki.mozilla.org/Mobile/Fennec/Android To fix this bug, you'll need to dig into our top sites code to see where we pin sites. These calls look like a good place to start: http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/TopSitesPanel.java#304 http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/TopSitesPanel.java#385 Then you'll need to show a ButtonToast that gives users the option to undo this action. Here's an example of where we do that in Java: http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/BrowserApp.java#320 Feel free to join #mobile on irc.mozilla.org to ask more questions.
(In reply to :Margaret Leibovic from comment #6) > (In reply to Nihar Trivedi from comment #5) > > Hi, > > I want to work on it, how to get started? > > I am good at android development. > > Hi Nihar! First of all, do you have a Firefox for Android build environment > set up? If not, you'll want to follow the directions here: > https://wiki.mozilla.org/Mobile/Fennec/Android > > To fix this bug, you'll need to dig into our top sites code to see where we > pin sites. These calls look like a good place to start: > http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/ > TopSitesPanel.java#304 > http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/ > TopSitesPanel.java#385 > > Then you'll need to show a ButtonToast that gives users the option to undo > this action. Here's an example of where we do that in Java: > http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/BrowserApp. > java#320 > > Feel free to join #mobile on irc.mozilla.org to ask more questions. Hi Margaret, Thanks for helping. I will follow the steps and setup the environment, and then follow the links which look to be very helpful for newbie like me in open source development.Thanks again!
We're questioning our current pinned sites implementation, I don't think it's worth fixing this.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: