From 4f78102971d2fef1650d85668a1cb6b945f5d6ad Mon Sep 17 00:00:00 2001 From: "rothwell.andy@gmail.com" Date: Wed, 21 Aug 2024 15:54:22 -0400 Subject: [PATCH 1/6] grays out 8 sites that are not open for special election --- .github/workflows/dev_push_to_s3.yml | 2 +- src/general/legendControls.js | 9 +++++++++ src/main.js | 9 ++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev_push_to_s3.yml b/.github/workflows/dev_push_to_s3.yml index 9ad38ef..84915b4 100644 --- a/.github/workflows/dev_push_to_s3.yml +++ b/.github/workflows/dev_push_to_s3.yml @@ -6,7 +6,7 @@ name: dev Push to S3 on: push: branches: - - main + - dev/gray-out-sites jobs: build: diff --git a/src/general/legendControls.js b/src/general/legendControls.js index 19f09a2..2b67dc7 100644 --- a/src/general/legendControls.js +++ b/src/general/legendControls.js @@ -40,6 +40,15 @@ export default { 'font-size': '10px', 'background-color': '#4F6D0A', }, + 'Mail-in ballot drop box (not open for special election)': { + 'border-color': 'black', + 'border-style': 'solid', + 'border-weight': '0px', + 'width': '15px', + 'height': '15px', + 'font-size': '10px', + 'background-color': '#a1a1a1', + }, 'Official mobile mail-in ballot return': { 'border-color': 'black', 'border-style': 'solid', diff --git a/src/main.js b/src/main.js index a0a8a07..08319bb 100644 --- a/src/main.js +++ b/src/main.js @@ -32,7 +32,8 @@ import pinboard from '@phila/pinboard/src/main.js'; import legendControls from './general/legendControls'; // data-sources -import votingSites from './data-sources/voting-sites'; +// import votingSites from './data-sources/voting-sites'; +import votingSites from './data-sources/voting-sites-dev'; import expandCollapseContent from './components/ExpandCollapseContent.vue'; import customGreeting from './components/customGreeting.vue'; @@ -105,6 +106,11 @@ pinboard({ }, }, customComps, + hiddenRefine: { + Type: function(item) { + return item.site_type !== 'Official mobile mail-in ballot return'; + }, + }, refine: { type: 'categoryField_value', value: function(item) { @@ -140,6 +146,7 @@ pinboard({ 'Election office': '#a86518', 'Official mobile mail-in ballot return': '#721817', 'Official mail-in ballot drop box': '#4F6D0A', + 'Mail-in ballot drop box (not open for special election)': '#a1a1a1', }, borderColor: 'white', weight: 1, From 54caa8daaa30b6b4d03c2c6ed9d8ea1528e2bd38 Mon Sep 17 00:00:00 2001 From: "rothwell.andy@gmail.com" Date: Wed, 21 Aug 2024 16:31:51 -0400 Subject: [PATCH 2/6] more changes to make it closed sites work while gray --- src/components/ExpandCollapseContent.vue | 2 +- src/i18n/en-us.js | 12 ++++++++++++ src/main.js | 5 +++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/components/ExpandCollapseContent.vue b/src/components/ExpandCollapseContent.vue index 7176e8e..43b699e 100644 --- a/src/components/ExpandCollapseContent.vue +++ b/src/components/ExpandCollapseContent.vue @@ -48,7 +48,7 @@ :item="item" /> diff --git a/src/i18n/en-us.js b/src/i18n/en-us.js index db9da30..b437d04 100644 --- a/src/i18n/en-us.js +++ b/src/i18n/en-us.js @@ -54,6 +54,7 @@ export default { 'Election office': 'Election offices', 'Official mobile mail-in ballot return': 'Official mobile mail-in ballot return', 'Official mail-in ballot drop box': 'Official mail-in ballot dropboxes', + 'Mail-in ballot drop box (not open for special election)': 'Mail-in ballot drop box (not open for special election)', }, sections: { 'Election office': { @@ -102,6 +103,17 @@ export default { callout1: 'On Election Day, dropboxes will be locked at precisely 8 p.m.', callout2: '', }, + 'Mail-in ballot drop box (not open for special election)': { + header: 'Mail-in ballot dropboxes (not open for special election)', + englishName: 'Mail-in ballot dropbox (not open for special election)', + p1: '\ + If a drop box is full, not functioning, or is damaged in any way, call (215) 686-3469 or email vote@phila.gov. \ + ', + h2: '', + dates: '', + callout1: 'On Election Day, dropboxes will be locked at precisely 8 p.m.', + callout2: '', + }, }, beforeYouGo: 'Before you go', checkSite: 'Eligibility requirements and testing hours vary by site. Be sure to check site details to arrange for testing.', diff --git a/src/main.js b/src/main.js index 08319bb..7b310b3 100644 --- a/src/main.js +++ b/src/main.js @@ -136,6 +136,11 @@ pinboard({ titleSingular: 'Official mail-in ballot drop box', color: '#4F6D0A', }, + 'Mail-in ballot drop box (not open for special election)': { + title: 'Mail-in ballot drop boxes (not open for special election)', + titleSingular: 'Mail-in ballot drop box (not open for special election)', + color: '#a1a1a1', + }, }, legendControls, From 1137e61827c04817a506172c3c610e8af6f1d5ce Mon Sep 17 00:00:00 2001 From: "rothwell.andy@gmail.com" Date: Thu, 22 Aug 2024 11:05:28 -0400 Subject: [PATCH 3/6] sorts results so that the city hall election office is above the city hall south portal mail in voting point by default --- src/data-sources/voting-sites-dev.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data-sources/voting-sites-dev.js b/src/data-sources/voting-sites-dev.js index afa0623..f3d949e 100644 --- a/src/data-sources/voting-sites-dev.js +++ b/src/data-sources/voting-sites-dev.js @@ -3,10 +3,10 @@ export default { type: 'http-get', dependent: 'none', resettable: false, - url: 'https://phl.carto.com/api/v2/sql?q=select+*+from+voting_sites_staging', + url: 'https://phl.carto.com/api/v2/sql', //?q=select+*+from+voting_sites_staging', options: { - // params: { - // q: "select * from voting_sites where temporary_closure = 'FALSE'", - // }, + params: { + q: "select * from voting_sites_staging where temporary_closure = 'FALSE' order by site_type desc", + }, }, }; From f12481713f7e68edd1453f14eb6bb08bdfc569fc Mon Sep 17 00:00:00 2001 From: "rothwell.andy@gmail.com" Date: Thu, 22 Aug 2024 11:23:25 -0400 Subject: [PATCH 4/6] sets it back to using production data for merging into main and production --- src/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 7b310b3..51708f7 100644 --- a/src/main.js +++ b/src/main.js @@ -32,8 +32,8 @@ import pinboard from '@phila/pinboard/src/main.js'; import legendControls from './general/legendControls'; // data-sources -// import votingSites from './data-sources/voting-sites'; -import votingSites from './data-sources/voting-sites-dev'; +import votingSites from './data-sources/voting-sites'; +// import votingSites from './data-sources/voting-sites-dev'; import expandCollapseContent from './components/ExpandCollapseContent.vue'; import customGreeting from './components/customGreeting.vue'; From d9aa16349f907656174f0452eb1e6d3b8f07b356 Mon Sep 17 00:00:00 2001 From: "rothwell.andy@gmail.com" Date: Thu, 22 Aug 2024 11:24:22 -0400 Subject: [PATCH 5/6] turns off github actions for dev/gray-out-sites branch --- .github/workflows/dev_push_to_s3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev_push_to_s3.yml b/.github/workflows/dev_push_to_s3.yml index 84915b4..ae48b95 100644 --- a/.github/workflows/dev_push_to_s3.yml +++ b/.github/workflows/dev_push_to_s3.yml @@ -6,7 +6,7 @@ name: dev Push to S3 on: push: branches: - - dev/gray-out-sites + - dev/gray-out-sites_x jobs: build: From b4cb3dd8f8ef75ae8eae53a189df6d871e2cbb16 Mon Sep 17 00:00:00 2001 From: "rothwell.andy@gmail.com" Date: Thu, 22 Aug 2024 11:27:40 -0400 Subject: [PATCH 6/6] turns off hidden refine that was in place for staging data --- src/main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.js b/src/main.js index 51708f7..ba8cc19 100644 --- a/src/main.js +++ b/src/main.js @@ -106,11 +106,11 @@ pinboard({ }, }, customComps, - hiddenRefine: { - Type: function(item) { - return item.site_type !== 'Official mobile mail-in ballot return'; - }, - }, + // hiddenRefine: { + // Type: function(item) { + // return item.site_type !== 'Official mobile mail-in ballot return'; + // }, + // }, refine: { type: 'categoryField_value', value: function(item) {