Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Add ability to create WhatsApp shares. #1169

Closed
wants to merge 34 commits into from
Closed

Conversation

Tuuleh
Copy link
Contributor

@Tuuleh Tuuleh commented Jun 1, 2018

... and refactor ShareProgressVariantBuilder to work with non-sp shares.

@Tuuleh Tuuleh force-pushed the whatsapp-shares branch 4 times, most recently from d93cb3a to 4f6565f Compare June 8, 2018 09:17
@@ -126,6 +127,11 @@ def update

private

def record_tracking
Copy link
Contributor Author

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).

@Tuuleh Tuuleh changed the title WIP - Add ability to create WhatsApp shares... Add ability to create WhatsApp shares. Jun 8, 2018
when :whatsapp
@button.update(
sp_button_html: "<a class=\"whatsapp_large\" href=\"whatsapp://send?text=#{CGI.escape(@variant.text)}\"></a>",
url: @url
Copy link
Contributor

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

Copy link
Contributor Author

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. 🤷‍♀️

@vincemtnz
Copy link
Contributor

👍

rodrei and others added 21 commits June 14, 2018 11:21
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.
… 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
@osahyoun
Copy link
Member

👍

@Tuuleh Tuuleh closed this Jul 3, 2018
@Tuuleh Tuuleh deleted the whatsapp-shares branch January 14, 2019 08:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants