No Code Attached Yet
avatar universewrld
universewrld
18 Oct 2024

Is your feature request related to a problem? Please describe.

Joomla does not have #44309 a built-in button to share content (for articles, categories, etc.), but @joomla had built-in buttons to share content from version 1.0 to version 4.0 #24025

Image
This is how this feature looked like before Joomla 4.0 (+ there was also an Edit button for editors)

Image
since Joomla 4.0 we only have an Edit button (for editors) which is visible without the drop down list

People still share articles online every day, they may not use the Print and Email features anymore, but they still send links to their friends (using messengers or private messages on social networks).

PWA in fullscreen and standalone display mode does not have a built-in Share feature in smartphones, so this button will solve the problem of sharing content while using the website in PWA mode.

Describe the solution you'd like

I suggest adding 2 new buttons to the drop-down list: Share and Bookmark instead of Print and Email (also move the Edit button back to the drop-down list for editors)

Image

Font Awesome icons: share-nodes, bookmark, pen-to-square, gear

If the Share button cannot be displayed to the user (if the browser does not support it), then instead of the Share button, the Copy Link and Print buttons can be displayed (this feature still works in Joomla 5, but this button is not displayed).
Web Share API can automatically detect if the browser supports this button and instead show other text/buttons if this button is not supported by the browser.

You can test this button here (supported by all browsers and systems except the desktop version of Firefox)

Image

additional Font Awesome icons: link, print

This issue is also part of the PWA #19877 #44182 for Joomla, since this is the share_target member for the PWA.

Additional context

@w3c Web Share Test: https://w3c.github.io/web-share/demos/share.html
Can i use (91%+): https://caniuse.com/web-share
@google Integrate with the OS sharing UI with the Web Share API - https://web.dev/articles/web-share
@mdn Web Share API - https://developer.mozilla.org/docs/Web/API/Web_Share_API
@w3c Web Share API - https://www.w3.org/TR/web-share/
@pwa-builder Web Share API - https://docs.pwabuilder.com/#/home/native-features?id=web-share-api
How to Share From Your PWA - https://docs.pwabuilder.com/#/home/native-features?id=how-to-share-from-your-pwa

avatar universewrld universewrld - open - 18 Oct 2024
avatar joomla-cms-bot joomla-cms-bot - change - 18 Oct 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Oct 2024
avatar universewrld universewrld - change - 18 Oct 2024
Title
[5.3][PWA]: [Share Button API] - Share button, bookmark button
[5.3][PWA]: [Web Share API] - Share button, bookmark button
avatar universewrld universewrld - edited - 18 Oct 2024
avatar brianteeman
brianteeman - comment - 18 Oct 2024

You can test this button here (supported by all browsers and systems except the desktop version of Firefox)

That prevents it being included in the core of joomla

Add a Comment

Login with GitHub to post a comment