Skip to content

New sharing service: Web sharing API#4271

Merged
Alkarex merged 20 commits intoFreshRSS:edgefrom
math-GH:web-sharing-api
Mar 16, 2022
Merged

New sharing service: Web sharing API#4271
Alkarex merged 20 commits intoFreshRSS:edgefrom
math-GH:web-sharing-api

Conversation

@math-GH
Copy link
Copy Markdown
Contributor

@math-GH math-GH commented Mar 14, 2022

Changes proposed in this pull request:

How to test the feature manually:

  1. add Default Sharing Service in Sharing option
  2. use it in the normal view within the share menu
  3. share the link to your favorite app

Important information: The menu item in share menu is not available, if you browser does not support it (f.e. Firefox on Windows)

grafik
grafik

Example on Chromium on Windows 10: (1) the title of the shared article + (2) the shared link
grafik

Pull request checklist:

  • clear commit messages
  • code manually tested
  • documentation updated

@math-GH math-GH added this to the 1.20.0 milestone Mar 14, 2022
'wallabagv2' => 'wallabag v2',
'whatsapp' => 'Whatsapp', // TODO
'xing' => 'Xing', // TODO
'web-sharing-api' => 'Default System Sharing',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'web-sharing-api' => 'Default System Sharing',
'web-sharing-api' => 'Default system sharing',

But maybe something like?

Suggested change
'web-sharing-api' => 'Default System Sharing',
'web-sharing-api' => 'Share through system',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Share through system does not make me more happier.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe @Alkarex has a nice idea

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find anything much better. I have proposed "Standard share" for the French version

Copy link
Copy Markdown
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree to disagree, I suppose. ;-)

'wallabagv2' => 'wallabag v2',
'whatsapp' => 'Whatsapp', // TODO
'xing' => 'Xing', // TODO
'web-sharing-api' => 'Default system sharing',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another possibility could be something like:

Suggested change
'web-sharing-api' => 'Default system sharing',
'web-sharing-api' => 'Built-in sharing',

@Alkarex Alkarex merged commit a89fce2 into FreshRSS:edge Mar 16, 2022
@math-GH math-GH deleted the web-sharing-api branch March 17, 2022 21:53
if (!navigator.share) {
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share
// do not show the menu entry if browser does not support navigator.share
document.styleSheets[0].insertRule(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I overlooked that this might not work until enough of the DOM is loaded, otherwise errors sometimes happen depending on the exact orders
image
I believe this code should be moved to a function called by init_afterDOM().

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Apr 18, 2022
#fix FreshRSS#4271 (comment)
Moved to after `DOMContentLoaded`
Alkarex added a commit that referenced this pull request Apr 19, 2022
#fix #4271 (comment)
Moved to after `DOMContentLoaded`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants