This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Add ability to create WhatsApp shares. #1169
Closed
Closed
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
097094a
Don't run simple_format on emails body
rodrei 70623d5
Update email spec
vincemtnz 86dfd9b
[hack] check to see if $ is being clobbered somewhere. (#1185)
osahyoun caa2d20
Update pension emails spec
vincemtnz 7a6f9b3
Various bugfixes (#1187)
eyko 157bfb2
Redo: "Release (#1188)"
vincemtnz 75d5712
Set user context in sentry
vincemtnz 4142aab
Add locale data in ComponentWrapper
vincemtnz dd6151d
Use jQuery from npm. Use eventemitter3 for pub/sub
vincemtnz fd0c9ba
Alias jquery to window.$, except for app/javascript/vendor/*
vincemtnz 7b9a814
Also vendor lodash (using NPM, append to global)
vincemtnz f83f9ab
Update: reorganise some files (see desc)
vincemtnz b0245c1
Add migration, model and controller for whatsapp shares. Stopping wor…
Tuuleh 87513ba
Refactor shares controller to use sp variant builder only for sp shares
Tuuleh 32c744c
Move SP variant builder code into ShareVariantBuilder which will also…
Tuuleh a48659e
Make button URL update work with non-sp shares
Tuuleh bbdb39d
Make it possible to update text and url on whatsapp buttons
Tuuleh a4b6cc6
Add working UI component for whatsapp buttons
Tuuleh 22813c8
fix specs
Tuuleh cbc28a6
Stuck in gsub for link string, continue tomorrow
Tuuleh 0cd55ef
Add variant ID to whatsapp button container and link URL, and serve w…
Tuuleh 324c9f9
Remove whatsapp button on other than mobile devices
Tuuleh 57b20d0
Add / modify specs
Tuuleh 5d57bbd
Rename 'share_count' to 'conversion_count' for whatsapp shares
Tuuleh 3b49c60
Default values for click and conversion count
Tuuleh fd82eda
Use ERB::Util instead of CGI.escape to escape whatsapp strings to get…
Tuuleh d5213b4
Add tracking for whatsapp clicks and conversions
Tuuleh 9a0473f
Add a some scopes and request specs and a buggy UI to view click and …
Tuuleh e9959bd
Less buggy UI but still not 100%
Tuuleh 9f0a251
Add working UI and conversion count calculation
Tuuleh 120cb5e
Fix share tracking, add spec for sp scope on button
Tuuleh 19d8794
Rename sp_type to share_type and sp_button_html to share_button_html
Tuuleh cdb27ee
Show share titles if there are shares on the page
Tuuleh 9dd8446
Add method to construct the variant HTML in the Whatsapp model.
Tuuleh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
class Share::WhatsappsController < Share::SharesController | ||
private | ||
|
||
def new_defaults | ||
{ text: "#{@page.title} {LINK}" } | ||
end | ||
|
||
def permitted_params | ||
params | ||
.require(:share_whatsapp) | ||
.permit(:text, :name) | ||
end | ||
|
||
def share_class | ||
Share::Whatsapp | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).