Closed Bug 1366327 Opened 7 years ago Closed 7 years ago

Firefox copy URL and email link features should deal with Reader View URLs properly.

Categories

(Firefox :: Address Bar, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
Firefox 57
Iteration:
57.2 - Aug 29
Tracking Status
firefox57 --- verified
firefox58 --- verified

People

(Reporter: caspy77, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

(Whiteboard: [reserve-photon-structure])

Attachments

(1 file)

With 57 getting the page action menu, it seems likely that a lot more people are going to be exposed to and use share actions such as Email, Copy, etc. And from a mockup I saw, Reader Mode may be getting even more visibility.

Currently if you attempt to share any page while in Reader View instead of sending the URL you see, you get something like about:reader?url=https%3A%2F%2Fdolske.wordpress.com%2F2017%2F05%2F18%2Fphoton-engineering-newsletter-1%2F
This makes for a poor experience for users - and potentially frustrating/confusing experience for recipients. 

When I previously brought up that addons were fetching this internal URL, it was pointed out that this was intentional and addons would have to convert it on their own for user-facing purposes. I doubt any did, but notably *we* didn't do it internally for something like Email (Copy was fixed though).

I've just now seen that the "Share" button is disabled in Reader View (don't think it was originally). I'd argue that due to it's increased visibility, this should be enabled for Reader View. As seen in the following mockup, the Share button now seems to pass off URLs straight to the platform's sharing function.
http://i.imgur.com/EYGFt3h.jpg
We can't expect any of these to convert the URL, so let's just convert it for them.
Bob, any idea if the "add-ons should convert it themselves" thing is still what we want to do for webextensions? Could we do something better? Do we know what Edge and Safari do here?
Blocks: 1352697
Component: Reader Mode → Location Bar
Flags: needinfo?(bob.silverberg)
Product: Toolkit → Firefox
Summary: Firefox share features should deal with Reader View URLs properly. → Firefox share feature should deal with Reader View URLs properly.
Whiteboard: [reserve-photon-structure]
Flags: qe-verify?
Priority: -- → P3
I'm not sure what the "convert it themselves" thing is either. Could you elaborate on that Caspy?

There's a few bugs about providing reader mode here, it's something I'd like to see improved support for in Firefox bug 1286387.
(In reply to Andy McKay [:andym] from comment #2)
> I'm not sure what the "convert it themselves" thing is either. Could you
> elaborate on that Caspy?

Basically, add-ons have access to the URI loaded in tabs via various APIs. The question is, if the tab is in reader mode, should they get the original URI of the page, or the (internal, not normally user-exposed) about:reader URI that looks like this:

about:reader?url=url_encoded_version_of_original_uri

The latter gives more information, but obviously the former may be more "what add-ons expect". If the URI gets reused (via copy/paste or sharing to twitter or whatever) then providing the original URI makes more sense. On the other hand, for security decisions etc., providing the about: URI is correct. It's not clear what other browsers do for this in terms of what they expose to add-ons (Edge, for instance, internally uses "read:http://..." for reader-ized pages. Not sure what Safari does. Not sure how either of this do/don't expose this to add-ons).
In retrospect maybe I should have avoided the addons topic as I don't know that that should be the drive here.

Originally reader mode had not been as thoroughly locked down as it is now. IIRC you could share a link via twitter, but it would be the about:reader?url=https%3A%2F... type. Now you cannot share at all or simply email a link from reader mode. 

We should turn on sharing again and convert the path to a normal URL as it's frustrating when you'd like to share a link (or even just send it to another Firefox device) and you're prevented from doing so.
Thanks for replying, Andy, as I didn't really understand how this relates to WebExtensions. Removing my needinfo from this now.
Flags: needinfo?(bob.silverberg)
From a WebExtension point of view, I think it would be nice if you were able to tell if a tab was in reader mode or not, then the extension author could choose what URL to share. I've added in bug 1381992 as a first step towards that.
Priority: P3 → P4
The share plane was removed, bug 1388902. But email link and copy URL both copy about:reader? URLs now, and shouldn't. I can fix that.
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Iteration: --- → 57.2 - Aug 29
Priority: P4 → P1
Comment on attachment 8898285 [details]
Bug 1366327 - deal with about:reader, IDNA and non-exposable URIs better for copy/email link,

https://reviewboard.mozilla.org/r/169656/#review175010

lgtm
Attachment #8898285 - Flags: review?(adw) → review+
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c9b13c236beb
deal with about:reader, IDNA and non-exposable URIs better for copy/email link, r=adw
Original design docs presented a share item in the Action menu to pass off pages to the platform's share function. Can anyone speak to if that's still planned? And if so does that only involve sending the URL?
If so, we'd probably want to do the same with it.
(In reply to Caspy7 from comment #11)
> Original design docs presented a share item in the Action menu to pass off
> pages to the platform's share function. Can anyone speak to if that's still
> planned?

This is covered in bug 1363180, bug 1363168, bug 1363169 . I don't think it will make 57. It needs platform works and all our engineers who can do that work are very busy at the moment.

> And if so does that only involve sending the URL?
> If so, we'd probably want to do the same with it.

We will be sure to keep it in mind, but obviously I can't write code for something that doesn't exist.
Summary: Firefox share feature should deal with Reader View URLs properly. → Firefox copy URL and email link features should deal with Reader View URLs properly.
https://hg.mozilla.org/mozilla-central/rev/c9b13c236beb
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Flags: qe-verify? → qe-verify+
QA Contact: gwimberly
See Also: → 1399169
Hey Gijs, can you clarify the STR needed to be able to verify this bug?
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to Grover Wimberly IV [:Grover-QA] from comment #14)
> Hey Gijs, can you clarify the STR needed to be able to verify this bug?

Sure!

STR:

1. go to the bbc news website ( http://www.bbc.co.uk/news )
2. open an article
3. enter reader mode
4. in the page action menu, click 'copy url'
5. paste the result and check it.

Expected:
should be the URL of the article

Actual (prior to this patch):

about:reader?url=....
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(gwimberly)
(similar steps with 'email link' to check if the contents of the email have the correct article link, not "about:reader?url=...")
Verified on 58 with Windows, Mac, and Linux.
Flags: needinfo?(gwimberly)
I have reproduced the issue mentioned in comment 0, using an affected Firefox 55.0a1 build (BuildId:20170519030205).

I have verified that the issue is not reproducible using Firefox 57.0b6 (Build Id:20171005195903) on Windows 10 64bit, macOS 10.11.6 and Ubuntu 16.04 64bit.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Blocks: 1188382
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: