-
Notifications
You must be signed in to change notification settings - Fork 805
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
Send a Message / WhatsApp block #15050
Conversation
This is an automated check which relies on E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-15050 |
I'm working on this as a 20% time thing, and to help more rapidly improve my Gutenberg knowledge. It's outside of our current team cycle work. |
3f31510
to
a30d5c8
Compare
Very nice @apeatling! I've taken this for a bit of a spin and it works great. There was only one minor issue. When I pushed WordPress' version back to 5.3 or earlier, the appender is visible and functional whereas its hidden for the time being in the current version of WP. Related to that, even using the latest version of WP, if you expand the three dots toolbar menu, you can still choose to duplicate the inner Whatsapp block within the parent Send A Message block. If we are choosing to hide the appender for now, would it make sense to also hide that option? |
Caution: This PR has changes that must be merged to WordPress.com |
…a Message block parent. This will allow us to support other services within the same block in the future, while providing service variations so that users can directly insert the buttons they want from the inserter.
@jeherve What do you see when you go to https://https://public-api.wordpress.com/geo/ ? Your country code should be auto selected so you don't have to go through the list. |
Done. 👍 |
This block should not appear in the main inserter, which version of Gutenberg was this in? |
@jeherve If you can give this a final approval I'll merge this and follow up in separate PRs. |
For some reason the button isn't showing up on the Jurassing Ninja I tried to spin up, so apologies but I couldn't test this. — Privacy question: how are we storing that phone number? I know it might not, but if possible, yet it would be a great feature if it could prevent scraping — as I think most of the cases require the number to be in clear. |
Could you go to Settings > Jetpack Constants and ensure that the Beta checkbox is checked?
It's stored in the post content, and is indeed available to any site visitor who can click on the button and see what phone number the button sends you to. That's how the official Whatsapp button works as well: I don't know if I would consider this a privacy issue though; if you add a Whatsapp button to your site, I would assume that's because you do want people to contact you? |
Hi @folletto , in order to be able to see the button you could try going to Admin->Settings->Jetpack Constants and setting the Hope this helps :) @apeatling You could possibly add this to the test instructions as well if you wish :) |
I wouldn't consider a privacy "issue" because as you stated it's the default WhatsApp behaviour. I'm saying that if we provide a way that avoids scraping, we have a major privacy benefit (and yes, benefit > issue 😉 ). Being open to receive a customer message doesn't mean you're open to receive any message from automated scrapers, robocalls, etc. Especially relevant if you're a small/sole business. There are three layers here:
If we are able to have a block that does (3), it would be an amazing feature that we should advertise. Providing (2) would be regardless nice to help protect our users. Doing (1) is the status quo, so it's ok, it's just not very nice. |
I do see my country code (well the one where I'm proxied at the moment), but it doesn't seem to get picked up by the picker. This happens whether I am proxied or not.
I'm seeing this on WP 5.4.2, no Gutenberg. It does not seem to happen in WP 5.3.4. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be good to merge. We can keep iterating in follow-up PRs.
@folletto I'll see if there are any ways to obfuscate the phone number. Another option is to be clear in the interface that your phone number will be exposed on your website. |
Good point. If we can't obfuscate, let's make that clear! :) |
r209741-wpcom |
Note: New commits require the new files added in this PR to be re-added to the Fusion generated diff (D44901-code) as the WordPress.com gating (D44978-code) for the block depends on the resulting build
This block provides two things. The first is a parent "Send a Message" block that is the container for all messaging service inner blocks (very similar to the social icons block). The second is a WhatsApp Button block that provides the primary functionality for connecting to WhatsApp.
So far the "Send a Message" block is limited only to WhatsApp as a service, so this inner block is inserted by default. Going forward we can easily add more services.
There is a default "WhatsApp Button" variation of the "Send a Message" block that means that "WhatsApp Button" shows up in the inserter, not "Send a Message". In the future we can also provide other service variations so they appear in the inserter, rather than a generic "Send a Message" block.
This is how it works (note on mobile phones, tapping the button will open WhatsApp directly):
In this version of the block, I have hidden the child block inserter to the right of the WhatsApp button that would be used to insert buttons for other services. There is only one service, so it's not useful.
One caveat -- variations do not work via the
/
quick inserter, so you will not see the "WhatsApp Button" block appear here. This is being tracked here and I'll see what I can do to move this along: WordPress/gutenberg#20583Testing instructions:
Proposed changelog entry for your changes: