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)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: ibarlow, Unassigned, Mentored)
Details
(Whiteboard: [lang=java])
Attachments
(1 file, 1 obsolete file)
367.75 KB,
image/png
|
Details |
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 |
----------------------------------
Comment 1•12 years ago
|
||
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)
Comment 2•12 years ago
|
||
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() { }
});
Updated•12 years ago
|
Flags: needinfo?(ibarlow)
Comment 3•12 years ago
|
||
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)
Comment 4•11 years ago
|
||
Woah, we have these toasts now. Yay!
Flags: needinfo?(ibarlow)
Whiteboard: [mentor=wesj][lang=java]
Assignee | ||
Updated•10 years ago
|
Mentor: wjohnston
Whiteboard: [mentor=wesj][lang=java] → [lang=java]
Comment 5•10 years ago
|
||
Hi,
I want to work on it, how to get started?
I am good at android development.
Updated•10 years ago
|
Flags: needinfo?(margaret.leibovic)
Updated•10 years ago
|
Attachment #703766 -
Attachment is obsolete: true
Flags: needinfo?(margaret.leibovic)
Comment 6•10 years ago
|
||
(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.
Comment 7•10 years ago
|
||
(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!
Comment 8•8 years ago
|
||
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
Assignee | ||
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•