Closed
Bug 920930
Opened 11 years ago
Closed 11 years ago
"Switch to tab" loads the page in the current tab from Reading List
Categories
(Firefox for Android Graveyard :: Awesomescreen, defect)
Tracking
(firefox27 affected, firefox28 affected, firefox29 affected, firefox30 affected, fennec+)
RESOLVED
FIXED
Firefox 31
People
(Reporter: AdrianT, Assigned: eduardn)
References
Details
(Whiteboard: [mentor=lucasr][lang=java])
Attachments
(2 files, 4 obsolete files)
1.05 KB,
patch
|
Details | Diff | Splinter Review | |
7.33 KB,
patch
|
lucasr
:
review+
|
Details | Diff | Splinter Review |
Nightly 27.0a1 2013-09-25
Samsung Galaxy Tab 2 (Android 4.1)
Steps to reproduce:
1) Load news.google.com and load any article that supports reader mode
2) Add the article to reading list by long tapping on the reader mode button in the title bar
3) Open a new tab go to the Reading list page and tap on the item in the reading list - observe that the item is labeled as "Switch to tab" instead of displaying the url
Expected results:
The tab is switched to the original article and the page is loaded in Reader mode
Actual results:
The article is opened in Reader Mode in the current tab and the original article remains loaded in the first tab
Reporter | ||
Updated•11 years ago
|
Blocks: new-new-about-home
Updated•11 years ago
|
tracking-fennec: --- → ?
Updated•11 years ago
|
Whiteboard: [mentor=lucasr][lang=java]
Updated•11 years ago
|
status-firefox27:
--- → affected
Updated•11 years ago
|
Keywords: regression
Comment 1•11 years ago
|
||
Adrian, can you confirm if this is a regression?
Flags: needinfo?(adrian.tamas)
Updated•11 years ago
|
Keywords: regressionwindow-wanted
Reporter | ||
Comment 2•11 years ago
|
||
Not a regression. The issue is reproducible on both Firefox Mobile 24 and Firefox Mobile 25 beta 2
Flags: needinfo?(adrian.tamas)
Keywords: regression,
regressionwindow-wanted
Updated•11 years ago
|
tracking-fennec: ? → +
Comment 3•11 years ago
|
||
There's a little more going on here ... when you open the areticle in step 1), you have the url in a tab "not" in reader mode ... then in step 2) you long-click to add the url to the reading list ... so good so far
when in step 3) you open a (new / 2nd / current) tab and navigate to the readinglist, the item does have a "switch-to-tab" button ...
*I think this is the real problem*
You can have a url open in one tab "not" in readingmode, and the same article open in another tab "in" reading mode ...
Observe that the expected results in the original comment is the correct behaviour given your STR, tapping an item in reading list at this point will |The article is opened in Reader Mode in the current tab and the original article remains loaded in the first tab|
Yes?
Comment 4•11 years ago
|
||
s/expected/actual/
Comment 5•11 years ago
|
||
Taking this bug and submitting a patch.
This patch gets rid of the problem of new tab every time a ReadingList item is opened (even if they are already open in some other tab).
Now I need to remove 'Switch-to-tab' from ReadingList items when the page is opened in Normal mode (not reading mode) and make it show 'Switch-to-tab' when a page is opened in a separate tab in Reading Mode.
I am stuck with it!
I think figuring out whether a url is in reading list or not, here [1], and then passing AboutReader url to [2] could be one way of doing this.
It would be great if someone could help me out with this :)
Thanks!
[1]: http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/TwoLinePageRow.java?#177
[2]: http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/TwoLinePageRow.java#154
Assignee: nobody → indiasuny000
Status: NEW → ASSIGNED
Attachment #820328 -
Flags: feedback?(lucasr.at.mozilla)
Comment 6•11 years ago
|
||
Correct patch
Attachment #820328 -
Attachment is obsolete: true
Attachment #820328 -
Flags: feedback?(lucasr.at.mozilla)
Comment 7•11 years ago
|
||
As per discussion on IRC, what we actually want here is to avoid triggering 'switch to tab' behaviour on reading list items when a tab has the original article. 'switch to tab' should only show up in reading list items if a tab has the article in reader mode.
This means you'll have to somehow change TwoLinePageRows in ReadingListPage to only consider reader mode pages in getTabIdForUrl(). Maybe create a subclass of TwoLinePageRows just for ReadingListRow that always use about:reader as URL?
Comment 8•11 years ago
|
||
Making the bug free for anyone to take and work. Will try to submit another patch.
Assignee: indiasuny000 → nobody
Status: ASSIGNED → NEW
Assignee | ||
Comment 9•11 years ago
|
||
I would like to work on this bug. Lucas, is your last comment the preferred solution? If not, could you give me some direction? Thanks!
Flags: needinfo?(lucasr.at.mozilla)
Comment 10•11 years ago
|
||
(In reply to Eduard Neculaesi (:eduardn) from comment #9)
> I would like to work on this bug. Lucas, is your last comment the preferred
> solution? If not, could you give me some direction? Thanks!
Hi Eduard! Yep, comment #7 is my preferred solution. Have you got your development environment up and running yet? I see that you've already fixed some bugs but here are the build instructions, just in case:
https://wiki.mozilla.org/Mobile/Fennec/Android
I suggest you to join us on IRC (irc.mozilla.org, #mobile channel) to get more immediate help :-)
Flags: needinfo?(lucasr.at.mozilla)
Assignee | ||
Comment 11•11 years ago
|
||
Attachment #8365652 -
Flags: review?(lucasr.at.mozilla)
Updated•11 years ago
|
Comment 12•11 years ago
|
||
Comment on attachment 8365652 [details] [diff] [review]
bug-920930-fix.patch
Review of attachment 8365652 [details] [diff] [review]:
-----------------------------------------------------------------
First of all, apologies for the delay on reviewing your patch. This patch is likely to overlap with sola's work on reading list (bug 889351). It would be nice if you could coordinate your work here.
Attachment #8365652 -
Flags: review?(lucasr.at.mozilla)
Comment 13•11 years ago
|
||
Sola, could you have a look at Eduard's patch and see how you could work together on it?
Flags: needinfo?(oogunsakin)
Comment 14•11 years ago
|
||
(In reply to Lucas Rocha (:lucasr) from comment #13)
> Sola, could you have a look at Eduard's patch and see how you could work
> together on it?
sure :)
Flags: needinfo?(oogunsakin)
Comment 15•11 years ago
|
||
hey Eduard, looking through your patch there isn't too much of a clash. I do create a ReadingListRow in bug 889351. I guess the main difference is that version extends LinearLayout instead of TwoLinePageRow for UI purposes. I think you should go ahead with this version for now since it fixes this issue, I'll merge your changes in when this lands :)
Assignee | ||
Comment 16•11 years ago
|
||
Hi Sola, thanks for taking a look at the patch! :)
Lucas, since Sola approved can we merge the last patch or should I make a new one since it's a bit old?
Flags: needinfo?(lucasr.at.mozilla)
Comment 17•11 years ago
|
||
(In reply to Eduard Neculaesi (:eduardn) from comment #16)
> Hi Sola, thanks for taking a look at the patch! :)
>
> Lucas, since Sola approved can we merge the last patch or should I make a
> new one since it's a bit old?
A new patch would be nice :-)
Flags: needinfo?(lucasr.at.mozilla)
Assignee | ||
Comment 18•11 years ago
|
||
Updated patch
Attachment #8365652 -
Attachment is obsolete: true
Attachment #8384227 -
Flags: review?(lucasr.at.mozilla)
Comment 19•11 years ago
|
||
Comment on attachment 8384227 [details] [diff] [review]
Bug 920930 Fix
Review of attachment 8384227 [details] [diff] [review]:
-----------------------------------------------------------------
Nice and clean, thanks! The only change I'd like to make is to avoid using mPageUrl directly in the subclass to a more 'blackbox-style' inheritance. So, here's what I suggest:
- Keep mPageUrl as private and add a getUrl() protected method that returns it.
- Use getUrl() instead of mPageUrl in ReadingListRow.updateDisplayedUrl().
::: mobile/android/base/home/HomeListView.java
@@ +6,5 @@
> package org.mozilla.gecko.home;
>
> import org.mozilla.gecko.R;
> import org.mozilla.gecko.home.HomePager.OnUrlOpenListener;
> +import org.mozilla.gecko.home.ReadingListRow;
Unused, remove.
Attachment #8384227 -
Flags: review?(lucasr.at.mozilla) → feedback+
Assignee | ||
Comment 20•11 years ago
|
||
Thanks for the review! Here's the new patch with the included changes.
Attachment #8384227 -
Attachment is obsolete: true
Attachment #8386312 -
Flags: review?(lucasr.at.mozilla)
Comment 21•11 years ago
|
||
Comment on attachment 8386312 [details] [diff] [review]
bug_920930.patch
Review of attachment 8386312 [details] [diff] [review]:
-----------------------------------------------------------------
Awesome, just needs this final tweak.
::: mobile/android/base/home/ReadingListRow.java
@@ +25,5 @@
> + }
> +
> + @Override
> + protected void updateDisplayedUrl() {
> + String mPageUrl = getUrl();
This should be:
final String pageUrl = getUrl();
nit: add empty line after it.
Attachment #8386312 -
Flags: review?(lucasr.at.mozilla) → feedback+
Assignee | ||
Comment 22•11 years ago
|
||
Hi,
Sorry for the delay! I attached the updated patch.
Attachment #8386312 -
Attachment is obsolete: true
Attachment #8401742 -
Flags: review?(lucasr.at.mozilla)
Comment 23•11 years ago
|
||
Sola, I'm afraid Eduard's patch here conflicts with your changes in bug 889351. Could you please coordinate? Maybe you could rebase your patch on top of his?
Flags: needinfo?(oogunsakin)
Comment 24•11 years ago
|
||
In fact, does this bug still make sense once bug 889351 lands?
Comment 25•11 years ago
|
||
Comment on attachment 8401742 [details] [diff] [review]
bug_920930.patch
Review of attachment 8401742 [details] [diff] [review]:
-----------------------------------------------------------------
Nice, thanks.
Attachment #8401742 -
Flags: review?(lucasr.at.mozilla) → review+
Comment 26•11 years ago
|
||
(In reply to Lucas Rocha (:lucasr) from comment #24)
> In fact, does this bug still make sense once bug 889351 lands?
There is no "switch-to-tab" icon in the new design. But I think we should land this for now.
Flags: needinfo?(oogunsakin)
Comment 27•11 years ago
|
||
(In reply to Sola Ogunsakin [:sola] from comment #26)
> (In reply to Lucas Rocha (:lucasr) from comment #24)
> > In fact, does this bug still make sense once bug 889351 lands?
>
> There is no "switch-to-tab" icon in the new design. But I think we should
> land this for now.
Ok. Eduard, I'm adding the 'checkin-needed' keyword but you can do it yourself next time, thanks!
Keywords: checkin-needed
Updated•11 years ago
|
Assignee: nobody → eduardnem
Comment 28•11 years ago
|
||
Keywords: checkin-needed
Whiteboard: [mentor=lucasr][lang=java] → [mentor=lucasr][lang=java][fixed-in-fx-team]
Comment 29•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [mentor=lucasr][lang=java][fixed-in-fx-team] → [mentor=lucasr][lang=java]
Target Milestone: --- → Firefox 31
Comment 30•11 years ago
|
||
Tested with the latest Nightly 31.0a1(2014-04-15). I can still reproduce this issue:
Open an article in reader mode.
Add article to reading list.
From about:home, go to Reading List tab.
Tap on the article to "Switch to tab".
Result:
Article opened in the same tab and not switch to tab where allready opened.
Should I log another bug for this, or this bug should be reopened?
Comment 31•11 years ago
|
||
New bug please.
Updated•11 years ago
|
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
•