Closed
Bug 895173
Opened 12 years ago
Closed 12 years ago
ContextMenu on HomeListView is broken
Categories
(Firefox for Android Graveyard :: Theme and Visual Design, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 26
People
(Reporter: sriram, Assigned: sriram)
References
Details
(Whiteboard: fixed-fig)
Attachments
(2 files, 1 obsolete file)
3.59 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
9.74 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
The "Share" and "Add to Home screen" always uses the url as "about:home" and not the actual list item.
![]() |
Assignee | |
Updated•12 years ago
|
Assignee: nobody → sriram
Blocks: new-about-home
![]() |
Assignee | |
Comment 1•12 years ago
|
||
That was due to name collision. Ideally I thought Fragment would get better precedence in handling the event than the Activity. Unfortunately the activity gets to handle it first and then lets others handle it! Gang-Of-Four fail!!
Renamed the menu items so that only HomeFragment can process them. I can go ahead and rename all id's to "home_" if you like it (may be a separate patch on same bug).
Attachment #777445 -
Flags: review?(margaret.leibovic)
Comment 2•12 years ago
|
||
Comment on attachment 777445 [details] [diff] [review]
Patch
Review of attachment 777445 [details] [diff] [review]:
-----------------------------------------------------------------
That seems like an easy pitfall! Can you add some comments above the onContextItemSelected declaration, explaining that it only gets called if onContextItemSelected in BrowserApp didn't already handle it?
I don't think we need to rename everything home_*, since it looks like the other context menu items really are very specific to the homepage.
::: mobile/android/base/home/HomeFragment.java
@@ +124,5 @@
> }
>
> case R.id.open_private_tab:
> case R.id.open_new_tab: {
> + Log.i("Sriram", "new tab");
Oops, left in some logging :)
Attachment #777445 -
Flags: review?(margaret.leibovic) → review+
![]() |
Assignee | |
Comment 3•12 years ago
|
||
Pushed with comments:
http://hg.mozilla.org/projects/fig/rev/475acbe5775e
Whiteboard: fixed-fig
![]() |
Assignee | |
Comment 4•12 years ago
|
||
I was thinking about it day and night..
and somehow the names didn't feel right!
So I changed them with all my might..
and putting it for review by your sight!!
:P :P
Attachment #779364 -
Flags: review?(margaret.leibovic)
Comment 5•12 years ago
|
||
Comment on attachment 779364 [details] [diff] [review]
OCD
Review of attachment 779364 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/resources/menu/top_bookmarks_contextmenu.xml
@@ +9,3 @@
> android:title="@string/contextmenu_open_new_tab"/>
>
> + <item android:id="@+id/home_open_private_tab"
I think these should be top_bookmarks_open_new_tab and top_bookmarks_open_private_tab, since that's more consistent with the rest of this file.
Also, even though the id conflict issue won't affect these two context menus, it's nice if the ids are different so that we're never confused about the code that handles them.
![]() |
Assignee | |
Comment 6•12 years ago
|
||
(In reply to :Margaret Leibovic from comment #5)
> Comment on attachment 779364 [details] [diff] [review]
> OCD
>
> Review of attachment 779364 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: mobile/android/base/resources/menu/top_bookmarks_contextmenu.xml
> @@ +9,3 @@
> > android:title="@string/contextmenu_open_new_tab"/>
> >
> > + <item android:id="@+id/home_open_private_tab"
>
> I think these should be top_bookmarks_open_new_tab and
> top_bookmarks_open_private_tab, since that's more consistent with the rest
> of this file.
>
> Also, even though the id conflict issue won't affect these two context
> menus, it's nice if the ids are different so that we're never confused about
> the code that handles them.
I made this "home_" on purpose to reflect the fact that they do the same thing as in HomeFragment. Ideally this should be handled by HomeFragment, but, the ContextMenuInfo's kind changes, and so we want to handle it in BookmarksPage.
![]() |
Assignee | |
Comment 7•12 years ago
|
||
Changed.
Attachment #779364 -
Attachment is obsolete: true
Attachment #779364 -
Flags: review?(margaret.leibovic)
Attachment #779418 -
Flags: review?(margaret.leibovic)
Comment 8•12 years ago
|
||
Comment on attachment 779418 [details] [diff] [review]
OCD
Review of attachment 779418 [details] [diff] [review]:
-----------------------------------------------------------------
I like that more, thanks.
Attachment #779418 -
Flags: review?(margaret.leibovic) → review+
![]() |
Assignee | |
Comment 9•12 years ago
|
||
![]() |
||
Comment 10•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/475acbe5775e
https://hg.mozilla.org/mozilla-central/rev/18b8d700be7f
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Updated•5 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
•