Page MenuHomePhabricator

Share an article URL
Closed, ResolvedPublic

Assigned To
Authored By
AMuigai
Oct 4 2019, 2:13 PM
Referenced Files
F34394983: image.png
Apr 14 2021, 8:11 PM
F34183314: image.png
Mar 23 2021, 7:41 PM
F34166915: image.png
Mar 18 2021, 1:33 AM
F34166241: image.png
Mar 17 2021, 5:26 PM
F30881996: 11d - Share sheet without image.png
Oct 25 2019, 7:48 PM
F30881992: 11c - Share sheet with image.png
Oct 25 2019, 7:48 PM

Description

User story

As a KaiOS user, I want to be able to share an article

Request

  • Create share option in the quick links section at the top of the article
  • Share option will be at the end of quick links; in 4th position
  • Icon: Rightward arrow icon
  • Introduce 'Share' section in the article hamburger menu.
  • In the article menu, Share will appear at the bottom, as the last option
  • Share will enable a user to share the link to the Wikipedia article.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
SBisson edited projects, added Inuka-Team (Kanban); removed Inuka-Team.

@AMuigai What do you want to share here?

We can easily share the article URL as demonstrated in the PR above.

  1. A link to a Wikipedia article
  2. A link to an image within a Wikipedia article or to an on Commons

Bonus points if we can shorten the url.

Where do you want those options to be?

AMuigai updated the task description. (Show Details)

Archived initial design

With lead imageWithout lead image
11c - Share sheet with image.png (640×480 px, 256 KB)
11d - Share sheet without image.png (640×480 px, 70 KB)
https://zpl.io/V1ppknwhttps://zpl.io/agOOq0O
Interaction details
D-pad centerD-pad up/downD-pad left/rightLSKRSK
Selects share type and takes appropriate actionN/Acycles through share typesdismisses view and returns to previous screenN/A

Design details

  • If there is no Wikidata description, center article title
  • If the title exceeds half of the width of the card it should be truncated, same with Wikidata description
  • Image copyright is shown overlaid on top of the image
  • Message should also include the link to the Wikipedia article and the text 'Look at what I found on Wikipedia, the free encyclopedia'

@AMuigai

Icon: Up and to the right share icon

I'm not sure I understand what this means.. Could you provide the icon?

...Ideally, the lead image will be shared as well
Question: Is it possible to add the Wikidata description?

Can you file new tasks (or spikes) for those? We should be able to move fast with the share url feature without being blocked by those unknowns.

SBisson renamed this task from Share an article to Share an article URL.Mar 15 2021, 1:47 PM

The only thing missing here is the final icon. See https://iconscout.com/icon/share-2451538 for an example but I don't think we can use this one as-is.

We can still make progress in the meantime and maybe even find or make an appropriate icon.

Is the "Archived initial design" here just for context? Or should we follow that design in some way?

Is the "Archived initial design" here just for context? Or should we follow that design in some way?

It's there because we didn't want to delete it completely but we can't use it for 2 reasons: 1) this task is about sharing the article URL, nothing more and 2) the share UI is provided by the OS, it is not something we can build to look like the initial design.

Cool thanks for the clarification, will start making progress on this based off of https://github.com/wikimedia/wikipedia-kaios/pull/329

The only thing missing here is the final icon. See https://iconscout.com/icon/share-2451538 for an example but I don't think we can use this one as-is.

We can still make progress in the meantime and maybe even find or make an appropriate icon.

I have updated the icon color to match the other action icons, but not sure if that makes it an appropriate icon. I'm leaving it there as a placeholder at least, I'll be happy to update it with a different icon later if needed

image.png (382×286 px, 69 KB)

Please note the quickfacts icon (second from the left) is being removed in T277462 (merged to main already)

I have requested support from the design team for this ask. We should be
able to get some tomorrow

Jpita subscribed.

I've tried this on Jio 2 and when I select the button nothing happens.
We discussed this during the daily and @AMuigai will check with kaios/jio about this.

On Jio, from the default gallery app, you can share to facebook, messages, whatsapp and bluetooth.

For me, sharing only works for KaiOS device. On Jio 1 and Jio 2 devices share option shows up in quick links & article menu but nothing happens when I press the select button. Also, is it possible to include more sharing options like facebook, Whatsapp. As of now it only shows email and messages.

[...] is it possible to include more sharing options like facebook, Whatsapp. As of now it only shows email and messages.

This is completely outside of our control. Sharing is a service provided by the OS. Some apps have content they want to share and some apps provide a place to share content. Our app is sharing content of type URL and only some apps are interested in that content, and maybe none on Jio.

I see a few options forward:

  1. Remove the share option on Jio since it does nothing
  2. Generate an article "card" with the lead image, the article title, and a few other things and share that instead of the URL since many more apps are interested in sharing images than URLs.

Sharing or article URL works on Kai devices but not on Jio since no apps there seem to be interested in URLs. @AMuigai will create new task(s) for sharing images and possibly removing the share URL from Jio.

we're sharing the mobile link, shouldn't we share the normal one and then let the app do it's thing and adapt to the device that is opening the article?

I say this because:

  • if link is mobile ("en.m.wiki") and it is opened on desktop, it shows mobile view
  • if link is normal ("en.wiki") and is it opened on mobile, it changes to mobile view
  • if link is normal ("en.wiki") and is it opened on desktop, it shows desktop view

[...] shouldn't we share the normal one and then let the app do its thing...

I think you are right. Let's not assume that the shared link will be opened on mobile. You're also right that toggling between the desktop and mobile experiences is handled by mobile web, we don't have to think about it.

Weird and inconsistent behaviour:

  • share to email app

1-share to email
2-use the end call button
3-wikipedia app stays open in the background

  • share to messages app

1-share to messages
2-use the end call button (save/draft)
3-wikipedia app is open on the foreground

should it be consistent/do we have control over it?

@Jpita we potentially have some control over those things, would have to investigate.

Tech note

The mozActivity instance created by new MozActivity(...) has some callbacks on it (onerror, onsuccess). Check if we can use those to react to the situations described above.

@Jpita could you please elaborate on the inconsistencies? Background vs foreground?

I've shared a video with you in Slack of what I'm seeing [1]


[1] I don't want to break this thread into a different one, but I'm getting a Phabricator error when trying to upload my 30 second video :(

image.png (446×754 px, 84 KB)

Circling back, we've learned the behavior is different per device. On my banana phone the behavior is normal, in Gabriel's device is different. So after some investigation, it seems it's a out of our control. Either way, a video showcasing the 'weird' behavior would be useful, even if for future reference only.