Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Web Share API. #148

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

enjikaka
Copy link
Contributor

@enjikaka enjikaka commented Nov 5, 2019

This enables platforms that support Web Share API, like Android, to share to all apps that allow being shared to. Just like if you were sharing from a native app.

See video here for example of sharing to Slack with this change: https://youtu.be/Ewmu4FVcF4A

import styles from "./styles.module.scss";
import buttonStyles from "../../styles/Buttons.module.scss";

/**
Copy link
Contributor Author

@enjikaka enjikaka Nov 5, 2019

Choose a reason for hiding this comment

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

With JSDoc like this and JS type checking enabled in VS Code this will give you errors when specifing props wrongly or adding props that doesn't exists. Kinda handy and no need to go in fully for TypeScript or Flow in the project. Could be progressively and selectively added. :)

Type checking could also be run with the TypeScript CLI in CI like so; tsc -p jsconfig.json --noEmit

Skärmavbild 2019-11-05 kl  17 54 51

Skärmavbild 2019-11-05 kl  18 05 14

@enjikaka
Copy link
Contributor Author

enjikaka commented Nov 5, 2019

The test isn't properly set up for browser env? 🤔

Skärmavbild 2019-11-05 kl  18 00 35

@enjikaka
Copy link
Contributor Author

enjikaka commented Nov 5, 2019

I guess I'll have to resolve to this for the window now being defined issue. https://www.gatsbyjs.org/docs/debugging-html-builds/#how-to-check-if-window-is-defined

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.

2 participants