Page MenuHomePhabricator

[M] Share functionality for slides
Closed, ResolvedPublic

Assigned To
None
Authored By
HNordeenWMF
Oct 2 2024, 4:00 PM
Referenced Files
F57726320: IMG_8791.PNG
Nov 20 2024, 11:07 PM
F57726295: IMG_8788.PNG
Nov 20 2024, 10:59 PM
F57726293: IMG_8789.PNG
Nov 20 2024, 10:59 PM
F57725959: IMG_0165.PNG
Nov 20 2024, 8:04 PM
F57725958: IMG_0166.PNG
Nov 20 2024, 8:04 PM
F57725754: IMG_8787.PNG
Nov 20 2024, 6:58 PM
F57725753: IMG_8786.PNG
Nov 20 2024, 6:58 PM
F57725648: image.png
Nov 20 2024, 6:18 PM

Description

Background

The Apps team plans to explore if a personalized Wikipedia in Review feature that displays insights about a user's reading history, editing history, and donation history is engaging for App users, and inspires them to make a donation to the Wikimedia Foundation.

Requirements
  • Allow users to share each individual slide
  • Generate a static image of the slide for sharing using system sharing
  • Prepopulated text should include hashtag and app install link (using custom ID from instrumentation deck)

Nice to have

  • Include #WikipediaYearinReview hashtag on generated image
  • Remove UI from slides
Designs
image.png (1×786 px, 297 KB)
image.png (1×786 px, 327 KB)
image.png (1×786 px, 323 KB)
image.png (1×786 px, 622 KB)
image.png (1×786 px, 266 KB)
Share button on slidesGenerated image for logged-in usersGenerated image for logged-out usersSystem sharingPre-populated text
Engineering Notes
  • Upon share tap, create a new instance of a year in review hosting controller with only that SwiftUI slide component, configured so that buttons and page indicators are hidden. Create an image of hosting controller's view via wmf_snapshotImage (example from Share-A-Fact). Present share sheet with pre-populated text containing App Store url (use App Store link with new campaign ID embedded) and hashtag.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Estimating assuming the old Share-A-Fact code will work well (which may rely on UIKit). We are making these slides with SwiftUI, so it might require a different approach.

Tsevener renamed this task from Share functionality for slides to [M] Share functionality for slides.Oct 4 2024, 3:50 PM
Tsevener renamed this task from [M] Share functionality for slides to [L] Share functionality for slides.

This could be easier if we had less UI to change before taking the snapshot. We have to build a new share card component, remove old elements, add new ones to the bottom. My bigger worry is users with dynamic type and smaller text - if content scrolls off screen does it take extra hoops to take a screenshot so that it doesn't scroll off screen?

I think probably our best bet is to build new slide components that do not scale with dynamic type, aren't embedded in scroll views, with the new hashtag component and elements removed. So this is why it is a large - we can't really easily lean on the old slide component.

@Tsevener for this first version, it can be acceptable that screenshots have text off-screen.

The hashtag will be in the text of the sharing, so perhaps the designs can do without it. How would this estimate be if we only stripped away the UI, didn't add anything, and took the screenshot as-is without accounting for text off-screen?

HNordeenWMF renamed this task from [L] Share functionality for slides to [Reestimate] Share functionality for slides.Oct 7 2024, 10:53 PM
Tsevener renamed this task from [Reestimate] Share functionality for slides to [M] Share functionality for slides.Oct 8 2024, 7:34 PM
Tsevener updated the task description. (Show Details)
Tsevener updated the task description. (Show Details)
Tsevener added a subscriber: GOlson-WMF.
Mazevedo added a subscriber: scblr.

Available on Experimental (183).
@scblr You should be able to access it from profile directly, no extra steps needed.

hi @Mazevedo, will the Share text "Here's my Wikipedia year in review" behave like a normal translatable string? (Showing in Spanish if the user is coming from Spanish system language for example)

Comms recommends that we keep the hashtag consistent, regardless of language, so could it be marked as a variable/non-translatable item in the source string for translate.wiki?

It’s almost perfect now @Mazevedo. The assets will need to be updated.

1) I noticed that the image preview doesn’t update currently when sharing:

CleanShot 2024-10-29 at 22.01.45.png (2×1 px, 1 MB)

2) Any chance to sneak the Wikipedia "W" in at the top? 😇

Logged inLogged out
image.png (1×786 px, 647 KB)
image.png (1×786 px, 643 KB)
FigmaFigma

Hi @scblr :

  1. Any chance to sneak the Wikipedia "W" in at the top? 😇

Done!

As for item 1, adding an actual thumbnail is a little tricky because I'd have to generate a separate thumb image with smaller dimensions. We could alternatively add the W app icon. On the Experimental build 187, you'll be able to see that.
However, due to the Apple's sharing API limitations, I can't add the preview text like we had before. Considering time, we could go with either text previewing or app icon previewing.
We can create a task to investigate this for a V2.
Let me know what you think. I'm moving it to Design signoff, feel free to kick it back to me with more feedback.

Considering time, we could go with either text previewing or app icon previewing.

Thanks @Mazevedo — let’s go with the "W" logo then, OR if you’re using an image (PNG) as an asset anyway, this one ⬇️

wikipedia-gradient.png (700×700 px, 538 KB)

@HNordeenWMF, Sorry I missed your comment earlier! "Here's my Wikipedia year in review" is a regular localizable string, so it should be translated. I'm treating the hashtag text as a hard-coded string, so it shouldn't show up for translation.

Great, thanks @Mazevedo !Could the text be updated to "Here's my Wikipedia Year in Review...""? So the capitalization matches the title of the feature.

Great, thanks @Mazevedo !Could the text be updated to "Here's my Wikipedia Year in Review...""? So the capitalization matches the title of the feature.

Yes!

@scblr I created a new design review build for a final check (Experimental 190, no extra test steps), but I'm also attaching screenshots here. I've kept the W icon on the share sheet because it was faster leave it like that at this moment.
@HNordeenWMF string updated!

IMG_2311E7C1E2AB-1.jpeg (2×1 px, 1 MB)

IMG_7D38DCF946D3-1.jpeg (2×1 px, 1 MB)

IMG_A95AEFA5F28D-1.jpeg (2×1 px, 1 MB)

Perfect, looks and works well — thanks @Mazevedo 👍

Due to directive from Marshall, we need to remove the Username mention for Logged-in users before releasing.

Tried a few ways of sharing on 7.6.2 (4479), and here's what I"m seeing. I think the most popular sharing methods will be Threads, Facebook, and Instagram, so we should focus on those.

  • Image getting shared as expected on Threads
  • Image getting shared as expected on Facebook Messenger
  • For sharing onto Facebook, the Image is not transferring
    image.png (2×1 px, 444 KB)
    • This is also happening for Slack, but not concerned as it's much less of an expected share action
  • I'm unable to share to Instagram in the same way I can for a normal photo. I just see the option for "Reel", and then an error when trying to click "Reel"
image.png (2×1 px, 1 MB)
image.png (2×1 px, 1 MB)

@HNordeenWMF I will look into this soon. Can you check if the Share-a-Fact feature has the same bugs? I'm pretty sure we modeled it after that.

Thanks @Tsevener! We're measuring interest in Sharing (clicks on "Share"), so these bugs will not be a blocker to release. But if it's a quick fix we can do for V1, or if it's more work we can make a task for V2.

Yes - it's also happening with Share-a-Fact

IMG_8786.PNG (2×1 px, 1 MB)
IMG_8787.PNG (2×1 px, 1 MB)

One more thing I noticed, when you go to share the final donate slides, the image appears cropped differently. This does not happen with any of the other slides, and happens regardless of language.

IMG_0166.PNG (2×1 px, 1 MB)
IMG_0165.PNG (2×1 px, 2 MB)

@HNordeenWMF Can you test these share fixes in Experimental 7.6.2 (199)? I'd like to make sure these issues are fixed before going through code review.

Facebook Post/Story/Groups is now working (just sharing the image, looks ok to me!)
Instagram Post & Message are working, but I am still seeing an error for "Story" on Instagram

Note: I am signed into multiple instagram accounts - this could be causing issues. I'm able to share a photo seamlessly to my story from Photos, but it's not working for YiR.

IMG_8791.PNG (2×1 px, 1 MB)

Crop issue on last slide is fixed!