New issue
Advanced search Search tips

Issue 773452 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

Reminder item in Share menu does not include source URL

Project Member Reported by shrike@chromium.org, Oct 10 2017

Issue description

Chrome Version: 63.0.3236.0
OS: macOS 10.12

What steps will reproduce the problem?
(1) Go to http://allrecipes.com/recipe/22684/spider-cupcakes/?internalSource=hn_carousel%2001_Spider%20Cupcakes&referringId=16399&referringContentType=recipe%20hub&referringPosition=carousel%2001
(2) Choose File -> Share -> Reminders
(3) Save the Reminder

What is the expected result?
The Reminder title is pre-populated with the page's name, and the Reminder item in the Reminders app includes the full page URL.

What happens instead?
The Reminder title is empty and the Reminder item only includes the domain.

In the attached screenshot the item with the Chrome Canary icon is the same URL saved to Reminders via Safari. Clicking the Chrome icon takes you to the source page. (It seems like Reminders is displaying the icon for the default browser but for some reason thinks it's Chrome Canary.) The first item is the Reminder saved from Chrome.

 
Screen Shot 2017-10-10 at 1.34.56 PM.png
168 KB View Download

Comment 1 by lgrey@chromium.org, Oct 10 2017

This is weird, because I know we discussed this very thing in the original CL and it worked then. I wonder if something's going on with Handoff (since it fetches the title and maybe URL from the NSUserActivity)
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3b733249325e69df97ff1b856ca6b908069a6335

commit 3b733249325e69df97ff1b856ca6b908069a6335
Author: Leonard Grey <lgrey@chromium.org>
Date: Fri Oct 27 17:05:08 2017

[Mac] Create an NSUserActivity when sharing

When asked to perform a share with an NSURL, most share extensions use
the shared URL as the URL, and the NSShareService property |subject|
as a title.

For some reason, Reminders is different. It extracts the TLD of the URL
to use as the text of the reminder, but uses the title and URL of the
current NSUserActivity as the reminder title and navigable URL,
respectively.

As it happens, we *do* have an active NSUserActivity at share time
(used for Handoff) but:
- For whatever reason, sometimes the Reminders extension doesn't
see it.
- It only has the URL and not a title. Plumbing through a title isn't
trivial since the URL is currently being set before the page HTML has
been parsed and the title's known.

This change creates a correctly configured NSUserActivity right at
the moment that a share is being performed, then immediately
invalidates it when the share has completed or been canceled.

Bug:  773452 
Change-Id: I01adc754cc99f33e33027ce883c05a86d66ac093
Reviewed-on: https://chromium-review.googlesource.com/738279
Reviewed-by: Jayson Adams <shrike@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512217}
[modify] https://crrev.com/3b733249325e69df97ff1b856ca6b908069a6335/base/mac/sdk_forward_declarations.h
[modify] https://crrev.com/3b733249325e69df97ff1b856ca6b908069a6335/chrome/browser/ui/cocoa/share_menu_controller.mm

Cc: pnangunoori@chromium.org
Labels: Needs-Feedback
Tested on Chrome Canary#64.0.3253.0 on Mac 10.12.6 and observed the below observations after enabling the flag #mac-system-share-menu.

1. After Sharing the website mentioned in the original comment - Reminder is saved with the page name of the shared page (In the above case, reminder is saved as 'Spider Cupcakes Recipe - Allrecipes.com').
2. Complete URL is not displayed in the reminder saved.
3. On the reminder app, adjacent to the saved reminder 'Safari' logo is displayed. However clicking on it is opened in Chrome. (Though the reminder is saved via Chrome Canary).
4. Clicking on the reminder, redirects user to the site's home page (Not the page through which reminder is saved).


@shrike/ lgrey -- Could you please confirm the above behavior. So that we can add the TE-Verified label.

Attached the screencast for reference.

Thanks!

773452.mov
15.9 MB Download

Comment 4 by lgrey@chromium.org, Oct 30 2017

That's WAI. Clicking the Safari logo should open the page from which the reminder is saved. It's the Safari logo because presumably that's the system's default browser.
Labels: -Needs-Feedback TE-Verified-M64 TE-Verified-64.0.3253.0
Adding the labels TE-Verified-M64 and TE-Verified-64.0.3253.0 as per the C #4.

Comment 6 by lgrey@chromium.org, Nov 1 2017

Status: Fixed (was: Assigned)

Sign in to add a comment