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

Sprint 96 release #1071

Merged
merged 9 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"AWS_SECRET_ACCESS_KEY": {
"required": true
},
"EMAIL_HOST_PASSWORD": {
"required": true
},
"S3_BUCKET": {
"required": true
},
Expand Down
12 changes: 11 additions & 1 deletion common/components/controllers/CorporateHackathonController.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ const tabOptions: Dictionary<string> = {
sponsorship: "tab-sponsorship",
};

// for now we are trying to test this with a one file change. In the future we should handle this when and where the GOOGLE PROPERTY ID is set
// safeGtag needs to return true because event handlers need to return true for the event to keep propogating
//
const safeGtag=(...args)=>(window.gtag && gtag(...args),true)

class CorporateHackathonController extends React.PureComponent<{||}, State> {
constructor(props) {
super(props);
Expand Down Expand Up @@ -112,7 +117,8 @@ class CorporateHackathonController extends React.PureComponent<{||}, State> {
return (
<React.Fragment>
<div className="corporate-tab-section">
<Tabs defaultActiveKey={this.state.defaultTab} id="corporate-tabs">
<Tabs defaultActiveKey={this.state.defaultTab} id="corporate-tabs"
onSelect={tab_option=>safeGtag('event',tab_option)}>
<Tab
eventKey={tabOptions.hackathon}
title="Host a Tech-for-Good Hackathon"
Expand Down Expand Up @@ -194,6 +200,7 @@ class CorporateHackathonController extends React.PureComponent<{||}, State> {
variant="primary"
href="#contact-hackathon"
className="corporate-block-button"
onClick={e=>safeGtag('event','contact-hackathon')}
>
Get Started
</Button>
Expand Down Expand Up @@ -333,6 +340,7 @@ class CorporateHackathonController extends React.PureComponent<{||}, State> {
variant="primary"
href="#contact-sponsor"
className="corporate-block-button"
onClick={e=>safeGtag('event','contact-sponsor')}
>
Get Started
</Button>
Expand Down Expand Up @@ -443,6 +451,7 @@ class CorporateHackathonController extends React.PureComponent<{||}, State> {
href={cdn.document(
"2023+DemocracyLab+Corporate+Hackathon+Prospectus.pdf"
)}
onClick={e=>safeGtag('event','HackathonProspectus')}
>
Corporate Tech-for-Good Hackathons PDF{" "}
<i className={Glyph(GlyphStyles.PDF, GlyphSizes.X1)}></i>
Expand All @@ -455,6 +464,7 @@ class CorporateHackathonController extends React.PureComponent<{||}, State> {
href={cdn.document(
"2023+DemocracyLab+Sponsorship+Prospectus.pdf"
)}
onClick={e=>safeGtag('event','SponsorProspectus')}
>
Sponsor Prospectus PDF{" "}
<i className={Glyph(GlyphStyles.PDF, GlyphSizes.X1)}></i>
Expand Down
6 changes: 4 additions & 2 deletions democracylab/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def read_connection_config(config):
"*.doubleclick.net",
"*.newrelic.com",
"*.nr-data.net",
"*.hotjar.com",
"https://*.hotjar.com",
)
CSP_CONNECT_SRC = (
"'self'",
Expand All @@ -412,7 +412,9 @@ def read_connection_config(config):
"*.google-analytics.com",
"*.nr-data.net",
"*.hereapi.com",
"*.hotjar.com",
"https://*.hotjar.com",
"https://*.hotjar.io",
"wss://*.hotjar.com",
)
CSP_FONT_SRC = (
"'self'",
Expand Down
4 changes: 0 additions & 4 deletions democracylab_environment_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ exit 1
#export AWS_SECRET_ACCESS_KEY=ASK
#export S3_BUCKET=ASK

# Password for account used to send email
export EMAIL_HOST_PASSWORD=betterDemocracyViaTechnology

# Url prefix to generate links on the back-end
export PROTOCOL_DOMAIN=http://127.0.0.1:8000

Expand Down Expand Up @@ -69,7 +66,6 @@ export VOLUNTEER_RENEW_REMINDER_PERIODS='[7,7,-1]'
# export MAILCHIMP_SUBSCRIBE_LIST_ID=SECRET

export S3_BUCKET=democracylab-marlok
export EMAIL_HOST_PASSWORD=betterDemocracyViaTechnology

# ONLY FOR USE IN PRODUCTION
#export HOTJAR_APPLICATION_ID=1097784
Expand Down
3 changes: 1 addition & 2 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ GOOGLE_RECAPTCHA_SECRET_KEY=change_me_asap
GOOGLE_RECAPTCHA_SITE_KEY=change_me_asap

### Email Configs ###
EMAIL_HOST_PASSWORD=change_me_asap
ADMIN_EMAIL=change_me_asap

### PayPal Configs ###
Expand All @@ -21,4 +20,4 @@ PAYPAL_PAYEE=paypal_email_address_here

### Misc Project Configs ###
DJANGO_SECRET_KEY=change_me_asap
STATIC_CDN_URL=https://d1agxr2dqkgkuy.cloudfront.net
STATIC_CDN_URL=https://d1agxr2dqkgkuy.cloudfront.net