Skip to content

Commit 4e7cb9f

Browse files
authored
Merge branch 'test' into 311-phila-ui-refresh
2 parents 7288adf + 16eb2c4 commit 4e7cb9f

58 files changed

Lines changed: 2022 additions & 4007 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/oem-flood-finder/cdk/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
"format:check": "prettier --check ."
1212
},
1313
"dependencies": {
14-
"@phila/constructs": "^0.8.0",
15-
"aws-cdk-lib": "^2.252.0",
16-
"cdk-nag": "^2.38.2",
17-
"constructs": "^10.6.0",
18-
"source-map-support": "^0.5.21"
14+
"@phila/constructs": "catalog:",
15+
"aws-cdk-lib": "catalog:",
16+
"cdk-nag": "catalog:",
17+
"constructs": "catalog:",
18+
"source-map-support": "catalog:"
1919
},
2020
"devDependencies": {
2121
"@repo/eslint-config": "workspace:*",
2222
"@repo/typescript-config": "workspace:*",
23-
"aws-cdk": "^2.1120.0",
24-
"ts-node": "^10.9.0",
25-
"typescript": "^6.0.3"
23+
"aws-cdk": "catalog:",
24+
"ts-node": "catalog:",
25+
"typescript": "catalog:"
2626
}
2727
}

apps/oem-flood-finder/frontend/package.json

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@
1616
"format:check": "prettier --check ."
1717
},
1818
"dependencies": {
19-
"@phila/phila-ui-bottom-sheet": "0.1.0-beta.13",
20-
"@phila/phila-ui-button": "2.3.0-beta.9",
21-
"@phila/phila-ui-charts": "0.1.0-beta.12",
22-
"@phila/phila-ui-checkbox": "0.1.1-beta.9",
23-
"@phila/phila-ui-collapse-panel": "0.2.0-beta.8",
24-
"@phila/phila-ui-core": "3.0.0-beta.8",
25-
"@phila/phila-ui-link": "1.1.0-beta.8",
26-
"@phila/phila-ui-logo": "0.1.3-beta.8",
27-
"@phila/phila-ui-table": "1.0.0-beta.8",
28-
"@phila/phila-ui-tabs": "1.0.0-beta.9",
29-
"@phila/phila-ui-tags": "0.1.0-beta.9",
19+
"@phila/phila-ui-core": "catalog:",
20+
"@phila/phila-ui-button": "catalog:",
21+
"@phila/phila-ui-tabs": "catalog:",
22+
"@phila/phila-ui-tags": "catalog:",
23+
"@phila/phila-ui-charts": "catalog:",
24+
"@phila/phila-ui-link": "catalog:",
25+
"@phila/phila-ui-logo": "catalog:",
26+
"@phila/phila-ui-table": "catalog:",
3027
"@pinboard/ui": "workspace:*",
3128
"hls.js": "^1.6.15",
3229
"vue": "catalog:",
@@ -36,10 +33,11 @@
3633
"devDependencies": {
3734
"@repo/eslint-config": "workspace:*",
3835
"@repo/typescript-config": "workspace:*",
39-
"@vitejs/plugin-vue": "^6.0.3",
40-
"npm-run-all2": "^8.0.4",
41-
"typescript": "^6.0.3",
42-
"vite": "^7.3.1",
43-
"vite-plugin-vue-devtools": "^8.0.5"
36+
"@vitejs/plugin-vue": "catalog:",
37+
"npm-run-all2": "catalog:",
38+
"prettier": "catalog:",
39+
"typescript": "catalog:",
40+
"vite": "catalog:",
41+
"vite-plugin-vue-devtools": "catalog:"
4442
}
4543
}
Lines changed: 11 additions & 219 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
11
<script setup lang="ts">
2-
import { PinboardShell, NavbarInfo, PinboardComposables } from '@pinboard/ui'
3-
import '@pinboard/ui/style.css'
4-
import { BottomSheet } from '@phila/phila-ui-bottom-sheet'
5-
import { CloseButton } from '@phila/phila-ui-button'
2+
import { PinboardShell } from '@pinboard/ui'
63
import { useEverbridgeNotifications } from './composables/useEverbridgeNotifications'
74
import type { AlertBanner } from './types'
8-
import {
9-
computed,
10-
onBeforeUnmount,
11-
onMounted,
12-
ref,
13-
useTemplateRef,
14-
watch,
15-
type ComputedRef,
16-
} from 'vue'
17-
import { useRoute, useRouter } from 'vue-router'
5+
import { computed, type ComputedRef } from 'vue'
6+
7+
const feedbackHref = 'https://phila.formstack.com/forms/oem_flood_monitoring_map_feedback'
188
199
const { everbridgeNotifications } = useEverbridgeNotifications(1)
2010
@@ -35,92 +25,16 @@ const alertBanner: ComputedRef<AlertBanner | null> = computed(() => {
3525
}
3626
return null
3727
})
38-
39-
const infoSheetOpen = ref(false)
40-
41-
/* Capture-phase click on the wrapper runs before the inner Tooltip's
42-
* bubble-phase listener, so stopPropagation suppresses the tooltip and
43-
* we open the bottom sheet instead. */
44-
function openInfoSheet(event: Event) {
45-
event.preventDefault()
46-
event.stopPropagation()
47-
infoSheetOpen.value = true
48-
}
49-
50-
function closeInfoSheet() {
51-
infoSheetOpen.value = false
52-
dragY.value = 0
53-
}
54-
55-
/* Drag-down-to-dismiss. BottomSheet's built-in drag is snap-point based
56-
* and a single snap point ([60]) clamps it to no movement, so we layer
57-
* our own pointer tracking on top: translate the sheet to follow the
58-
* pointer, dismiss past DRAG_DISMISS_THRESHOLD on release, otherwise
59-
* spring back. Clicks (zero delta) pass through. */
60-
const DRAG_DISMISS_THRESHOLD = 160
61-
const dragY = ref(0)
62-
const isDraggingSheet = ref(false)
63-
let dragStartY = 0
64-
65-
function onSheetPointerDown(e: PointerEvent) {
66-
dragStartY = e.clientY
67-
dragY.value = 0
68-
isDraggingSheet.value = true
69-
document.addEventListener('pointermove', onSheetPointerMove)
70-
document.addEventListener('pointerup', onSheetPointerUp)
71-
document.addEventListener('pointercancel', onSheetPointerUp)
72-
}
73-
74-
function onSheetPointerMove(e: PointerEvent) {
75-
if (!isDraggingSheet.value) return
76-
dragY.value = Math.max(0, e.clientY - dragStartY)
77-
}
78-
79-
function onSheetPointerUp() {
80-
if (!isDraggingSheet.value) return
81-
isDraggingSheet.value = false
82-
document.removeEventListener('pointermove', onSheetPointerMove)
83-
document.removeEventListener('pointerup', onSheetPointerUp)
84-
document.removeEventListener('pointercancel', onSheetPointerUp)
85-
if (dragY.value > DRAG_DISMISS_THRESHOLD) {
86-
closeInfoSheet()
87-
} else {
88-
dragY.value = 0
89-
}
90-
}
91-
92-
const isMobile = PinboardComposables.useIsMobile()
93-
94-
watch(isMobile, (mobile) => {
95-
if (!mobile) infoSheetOpen.value = false
96-
})
97-
98-
const route = useRoute()
99-
const router = useRouter()
100-
const navbarInfo = useTemplateRef<InstanceType<typeof NavbarInfo>>('navbarInfo')
101-
102-
onMounted(async () => {
103-
await router.isReady()
104-
105-
if (route.path === '/') {
106-
if (isMobile.value) {
107-
infoSheetOpen.value = true
108-
} else {
109-
navbarInfo.value?.show()
110-
}
111-
}
112-
})
113-
114-
onBeforeUnmount(() => {
115-
document.removeEventListener('pointermove', onSheetPointerMove)
116-
document.removeEventListener('pointerup', onSheetPointerUp)
117-
document.removeEventListener('pointercancel', onSheetPointerUp)
118-
})
11928
</script>
12029

12130
<template>
12231
<PinboardShell
12332
title="Flood Monitoring Map"
33+
info-title="About this tool"
34+
info-message="This map allows residents to keep an eye on water levels in parts of the city and make informed decisions prior to, during, and after a flooding event."
35+
info-link-text="Learn more"
36+
info-href="resources"
37+
:translations="false"
12438
:logo="{
12539
variant: 'city',
12640
layout: 'single-line',
@@ -130,131 +44,9 @@ onBeforeUnmount(() => {
13044
}"
13145
:banner-title="alertBanner?.title"
13246
:banner-message="alertBanner?.body"
47+
:feedback-href="feedbackHref"
48+
:show-header-tooltip="true"
13349
>
134-
<template #navbar-end>
135-
<div v-if="isMobile" class="navbar-info-mobile-wrap" @click.capture.stop="openInfoSheet">
136-
<NavbarInfo info-title="About this tool" label="About this tool" />
137-
</div>
138-
<NavbarInfo v-else ref="navbarInfo" info-title="About this tool" label="About this tool">
139-
<span class="has-text-body-small">
140-
This map allows residents to keep an eye on water levels in parts of the city and make
141-
informed decisions prior to, during, and after a flooding event.
142-
<a href="/resources">Learn more</a>
143-
</span>
144-
</NavbarInfo>
145-
</template>
146-
147-
<template #sub-footer>
148-
<a class="sub-footer-link" href="https://www.phila.gov/terms-of-use/">Terms of use</a>
149-
<a class="sub-footer-link" href="https://www.phila.gov/open-records-policy/">Right to know</a>
150-
<a class="sub-footer-link" href="https://www.phila.gov/privacypolicy/">Privacy Policy</a>
151-
<a class="sub-footer-link" href="https://www.phila.gov/accessibility-policy/"
152-
>Accessibility</a
153-
>
154-
<a
155-
class="sub-footer-link"
156-
target="_blank"
157-
href="https://phila.formstack.com/forms/oem_flood_monitoring_map_feedback"
158-
>Feedback</a
159-
>
160-
</template>
161-
16250
<RouterView />
16351
</PinboardShell>
164-
165-
<Teleport to="body">
166-
<Transition name="scrim-fade">
167-
<div v-if="infoSheetOpen" class="info-sheet-scrim" @click="closeInfoSheet" />
168-
</Transition>
169-
<BottomSheet
170-
v-if="infoSheetOpen"
171-
v-model="infoSheetOpen"
172-
class="info-sheet"
173-
:class="{ 'info-sheet--dragging': isDraggingSheet }"
174-
:style="{ zIndex: 101, '--drag-y': `${dragY}px` }"
175-
:snap-points="[60]"
176-
@pointerdown="onSheetPointerDown"
177-
>
178-
<CloseButton class="info-sheet-close" @click="closeInfoSheet" />
179-
<h2 class="has-text-heading-5">About this tool</h2>
180-
<span class="has-text-body-small">
181-
This map allows residents to keep an eye on water levels in parts of the city and make
182-
informed decisions prior to, during, and after a flooding event.
183-
<a href="/resources">Learn more</a>
184-
</span>
185-
</BottomSheet>
186-
</Teleport>
18752
</template>
188-
189-
<style>
190-
* {
191-
margin: 0;
192-
padding: 0;
193-
box-sizing: border-box;
194-
}
195-
196-
/*
197-
* Shim for design-token rename: the locally-linked map-core bundles CSS that
198-
* references --dimension-core-600 (post-revamp name), but the published
199-
* phila-ui-core consumed by @pinboard/ui only defines --scale-600. Without
200-
* this shim, .phila-input .content's height collapses to auto and the search
201-
* bar squishes. Remove once phila-ui-core ships with the renamed token.
202-
*/
203-
:root {
204-
--dimension-core-600: 3rem;
205-
}
206-
207-
#app {
208-
height: 100dvh;
209-
}
210-
211-
.sub-footer-link {
212-
font-weight: 400;
213-
}
214-
215-
.phila-navbar-brand {
216-
padding-left: var(--spacing-l);
217-
}
218-
219-
.info-sheet-scrim {
220-
position: fixed;
221-
inset: 0;
222-
z-index: 100;
223-
background: rgba(0, 0, 0, 0.25);
224-
}
225-
226-
/* Sheet sizes to its content; snap-points value is ignored visually.
227-
* --drag-y is set inline by the drag handler; transform-only transition
228-
* springs the sheet back when the user releases under threshold, while
229-
* keeping height static (animating to auto doesn't work cleanly). */
230-
.info-sheet .bottom-sheet {
231-
height: auto !important;
232-
max-height: 90dvh;
233-
padding: 0 var(--spacing-m) 50px;
234-
transform: translateY(var(--drag-y, 0px));
235-
transition: transform 0.25s ease-out !important;
236-
}
237-
238-
.info-sheet.info-sheet--dragging .bottom-sheet {
239-
transition: none !important;
240-
}
241-
242-
.scrim-fade-leave-active {
243-
transition: opacity 0.25s ease-out;
244-
pointer-events: none;
245-
}
246-
247-
.scrim-fade-leave-to {
248-
opacity: 0;
249-
}
250-
251-
.info-sheet-close {
252-
position: absolute;
253-
top: 8px;
254-
right: 12px;
255-
}
256-
257-
.info-sheet h2 {
258-
margin-bottom: var(--spacing-s);
259-
}
260-
</style>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
export default {
2+
tags: {},
3+
contact: 'Contact',
4+
website: 'Website',
5+
location: 'Location',
6+
callout: {
7+
title: 'About this tool',
8+
message:
9+
'This map allows residents to keep an eye on water levels in parts of the city and make informed decisions prior to, during, and after a flooding event.',
10+
linkText: 'Learn more',
11+
},
12+
app: {
13+
name: 'Flood Monitoring Map',
14+
subtitle: '',
15+
noResults: '',
16+
viewList: 'View list',
17+
viewMap: 'View map',
18+
aboutTitle: 'About this tool',
19+
aboutBody: '',
20+
},
21+
error: {
22+
fetchSites: 'Error retrieving primary care sites',
23+
},
24+
filters: {
25+
sort: 'Sort',
26+
distance: 'Distance',
27+
name: 'Name (A–Z)',
28+
},
29+
searchPlaceholder: 'Search by address or keyword...',
30+
introPage: {
31+
section1Title: '',
32+
p0: '',
33+
p05: '',
34+
p1: '',
35+
ol1: {
36+
li1: '',
37+
li2: '',
38+
li3: '',
39+
},
40+
section2Title: 'Insurance and cost',
41+
p2: "These health centers take many forms of insurance. This includes Medicare and Medicaid. You can get care even if you don't have insurance. If you're uninsured, you'll pay a small fee based on your income and family size.",
42+
section25Title: 'Need help getting health insurance?',
43+
p25: "Philadelphia's BenePhilly program offers free support to help residents apply for health insurance. To learn more, visit",
44+
section3Title: 'Language access',
45+
p3: "All health centers offer phone interpretation services. Some also offer in-person interpretation. View each location's details for a list of all languages spoken by staff. You can also search for a specific language.",
46+
section4Title: 'Establishing care',
47+
p4: 'You may need to establish care with a provider before you can access some services. Call to schedule a new patient appointment to become a patient at a health center.',
48+
section5Title: 'Updates to the finder',
49+
p5: 'We update the information for each health center every three months. If something is wrong, you can let us know through our',
50+
feedbackForm: 'feedback form',
51+
period: '.',
52+
},
53+
cards: {
54+
table1Intro:
55+
'These services may be specialized for children or adults. You may also need to become a patient, or establish care, at a health center before you can access some services.',
56+
table2Intro:
57+
"The rest of the services aren't divided by age. Some are open to anyone, but you may need to establish care at this health center before accessing others.",
58+
},
59+
}

apps/oem-flood-finder/frontend/src/i18n/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { createI18n } from 'vue-i18n'
22
import { pinboardMessages, mergeDeep } from '@pinboard/ui'
3+
import en from './en'
34

45
// oem stays English-only; it merges the shell defaults so @pinboard/ui's
56
// useI18n() calls resolve. No app catalog yet, no language switcher.
6-
const messages = mergeDeep(pinboardMessages, { en: {} })
7+
const appMessages = { en }
8+
const messages = mergeDeep(pinboardMessages, appMessages)
79

810
const i18n = createI18n({
911
legacy: false,

0 commit comments

Comments
 (0)