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

Url fix for og tags, primary/alt request type colors #736

Merged
merged 3 commits into from
Jul 14, 2020
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
1 change: 1 addition & 0 deletions .github/workflows/Continuous_Deployment_Frontend_Dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- dev
paths:
- 'src/**'
- 'public/**'

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/Continuous_Deployment_Frontend_Prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- master
paths:
- 'src/**'
- 'public/**'

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/Continuous_Integration_Frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- 'src/**'
- 'public/**'

jobs:
build:
Expand Down
8 changes: 4 additions & 4 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import { getMetadataRequest } from '@reducers/metadata';
import RouteChange from '@components/main/util/RouteChange';
import actions from '@components/main/util/routeChangeActions';
import CookieNotice from '@components/main/body/CookieNotice';
import Header from '@components/main/header/Header';
import Footer from '@components/main/footer/Footer';
import StaticFooter from '@components/main/footer/StaticFooter';
import { SnapshotRenderer } from '@components/export/SnapshotService';
import Routes from './Routes';
import Header from './components/main/header/Header';
import Footer from './components/main/footer/Footer';
import StaticFooter from './components/main/footer/StaticFooter';
import { SnapshotRenderer } from './components/export/SnapshotService';

const App = ({
getMetadata,
Expand Down
91 changes: 80 additions & 11 deletions src/components/common/CONSTANTS.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,129 @@
export default {};

// 'primary' or 'alt' to change request type colors
const COLOR_SELECTION = 'primary';

export const REQUEST_TYPES = {
'Dead Animal Removal': {
displayName: 'Dead Animal',
abbrev: 'DAN',
color: '#768393',
get color() {
return this.colors[COLOR_SELECTION];
},
colors: {
primary: '#4FEFEF',
alt: '#768393',
},
},
'Homeless Encampment': {
displayName: 'Homeless Encampment',
abbrev: 'HLE',
color: '#C16B1A',
get color() {
return this.colors[COLOR_SELECTION];
},
colors: {
primary: '#ECB800',
alt: '#C16B1A',
},
},
'Single Streetlight Issue': {
displayName: 'Single Streetlight',
abbrev: 'SSL',
color: '#2B87C5',
get color() {
return this.colors[COLOR_SELECTION];
},
colors: {
primary: '#AD7B56',
alt: '#2B87C5',
},
},
'Multiple Streetlight Issue': {
displayName: 'Multiple Streetlight',
abbrev: 'MSL',
color: '#1B9365',
get color() {
return this.colors[COLOR_SELECTION];
},
colors: {
primary: '#F7ADAD',
alt: '#1B9365',
},
},
Feedback: {
displayName: 'Feedback',
abbrev: 'FBK',
color: '#0E251D',
get color() {
return this.colors[COLOR_SELECTION];
},
colors: {
primary: '#FFE6B7',
alt: '#0E251D',
},
},
'Bulky Items': {
displayName: 'Bulky Items',
abbrev: 'BLK',
color: '#C056C8',
get color() {
return this.colors[COLOR_SELECTION];
},
colors: {
primary: '#FF0000',
alt: '#C056C8',
},
},
'Electronic Waste': {
displayName: 'E-Waste',
abbrev: 'EWT',
color: '#EA435C',
get color() {
return this.colors[COLOR_SELECTION];
},
colors: {
primary: '#DDEC9F',
alt: '#EA435C',
},
},
'Metal/Household Appliances': {
displayName: 'Metal/Household Appliances',
abbrev: 'MHA',
color: '#4F7CEE',
get color() {
return this.colors[COLOR_SELECTION];
},
colors: {
primary: '#B8D0FF',
alt: '#4F7CEE',
},
},
'Graffiti Removal': {
displayName: 'Graffiti',
abbrev: 'GFT',
color: '#4F5564',
get color() {
return this.colors[COLOR_SELECTION];
},
colors: {
primary: '#2368D0',
alt: '#4F5564',
},
},
'Illegal Dumping Pickup': {
displayName: 'Illegal Dumping',
abbrev: 'ILD',
color: '#8F70D7',
get color() {
return this.colors[COLOR_SELECTION];
},
colors: {
primary: '#6A8011',
alt: '#8F70D7',
},
},
Other: {
displayName: 'Other',
abbrev: 'OTH',
color: '#842D8B',
get color() {
return this.colors[COLOR_SELECTION];
},
colors: {
primary: '#6D7C93',
alt: '#842D8B',
},
},
};

Expand Down
7 changes: 3 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const SocialTags = require('social-tags-webpack-plugin');

const envUrl = process.env.NODE_ENV === 'production' ? 'https://www.311-data.org/' : 'http://dev.311-data.org/';
const description = 'Hack for LA’s 311-Data Team has partnered with the Los Angeles Department of Neighborhood Empowerment and LA Neighborhood Councils to create 311 data dashboards to provide all City of LA neighborhoods with actionable information at the local level.';

module.exports = {
Expand Down Expand Up @@ -91,10 +90,10 @@ module.exports = {
filename: '[name].css',
}),
new SocialTags({
appUrl: envUrl,
appUrl: 'https://www.311-data.org/',
facebook: {
'og:type': 'website',
'og:url': envUrl,
'og:url': 'https://www.311-data.org/',
'og:title': '311-Data Neighborhood Engagement Tool',
'og:image': './public/social-media-card-image.png',
'og:description': description,
Expand All @@ -103,7 +102,7 @@ module.exports = {
},
twitter: {
'twitter:card': 'summary_large_image',
'twitter:url': envUrl,
'twitter:url': 'https://www.311-data.org/',
'twitter:title': '311-Data Neighborhood Engagement Tool',
'twitter:image': './public/social-media-card-image.png',
'twitter:description': description,
Expand Down