-
Notifications
You must be signed in to change notification settings - Fork 21
Add ability to create WhatsApp shares. #1169
Conversation
d93cb3a
to
4f6565f
Compare
@@ -126,6 +127,11 @@ def update | |||
|
|||
private | |||
|
|||
def record_tracking |
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 will be a part of the upcoming work on this (recording actions on different WhatsApp variants on Champaign).
when :whatsapp | ||
@button.update( | ||
sp_button_html: "<a class=\"whatsapp_large\" href=\"whatsapp://send?text=#{CGI.escape(@variant.text)}\"></a>", | ||
url: @url |
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.
WhatsApp actually recommends https://api.whatsapp.com/send?text={{urlencodedtext}}
(as opposed to whatsapp://
) since that also works on the desktop and is future proof. https://faq.whatsapp.com/en/general/26000030
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.
Omg thank you. That explains why after having changed that, it suddenly stopped working on desktop. I thought it was just Ubuntu. 🤷♀️
👍 |
Since removing simple_format, the text is no longer wrapped in <p></p>
We're seeing a lot of errors telling us that `$` is not a function. We suspect that something's messing up with jQuery but we're not entirely sure. This is a small hack to hopefully re-assign jQuery to the `$` variable. 🤞
* import I18n from 'champaign-i18n' (alias to window.I18n in webpack) * Deprecate legacy backbone fundraiser code. The _fundraiser_refactor.liquid partial has been deleted and its contents are now in _fundraiser.liquid. All templates that referenced 'Fundraiser Refactor' must be updated to include 'Fundraiser'. * Add global locale data in member_facing.js Instead of doing this in ComponentWrapper, add it immediately in member_facing.js * Removed unused lines * Don't attempt to assign petitionForm to jXHR response if it's a string
This reverts commit 40ba347.
addLocaleData modifies the global context which seems to be different for each pack.
Removes the cdn version of jQuery and adds it to the `globals` pack, which loads jQuery, initialises `window.event` (to replace $.publish and $.subscribe in the future), and loads third party jQuery plugins to the global scope. EventEmitter 3 ============== I'm replacing our jQuery-dependent pub/sub functions for EventEmitter 3. It has no external dependencies and is 1kb minified+gzipped. It's also better alternative that is compatible with the Node.js events API. To register event handlers, use `ee.addEventListener` or `ee.on`. To emit an event, use `ee.emit`. Github: https://github.com/primus/eventemitter3 Node.js Events: https://nodejs.org/api/events.html *Note:* For convenience, `$.publish` wraps `ee.emit` and `$.subscribe` wraps `ee.on`.
* Move recommend_pages.js into the member-facing pack and out of its own pack. Reduces size (boilerplate) and number of requests. Also change initialisation to use events (avoid more globals) * Move event_tracking.js into the member-facing pack and out of its own pack.
…k here per Tanya's request.
… take care of crud for non-sp shares. Update specs, add WIP views for whatsapp shares.
…hatsapp shares at random in case there are more than one
… the right encoding, use the whatsapp api url
…conversion counts
3f9c69c
to
9dd8446
Compare
3485f9f
to
05534e1
Compare
👍 |
... and refactor ShareProgressVariantBuilder to work with non-sp shares.