Skip to content

Commit 3569b03

Browse files
authored
Merge branch 'main' into patch-1
2 parents 85c0b4c + b337c84 commit 3569b03

43 files changed

Lines changed: 446 additions & 47 deletions

File tree

Some content is hidden

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

.github/scripts/assign-event-uids.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ for (const { mpath, meta } of metadatas) {
6161
// Insert uid line after the id line in the frontmatter
6262
const updated_content = content.replace(
6363
/^(---\nid: [^\n]+\n)/m,
64-
`$1uid: ${uid}\n`
64+
`$1uid: "${uid}"\n`
6565
);
6666
await fs.writeFile(contentPath, updated_content);
6767
} catch {

.github/scripts/process-edit-event-issue.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ async function main() {
255255
const markdownLines = [
256256
'---',
257257
`id: ${eventId}`,
258-
...(uid ? [`uid: ${uid}`] : []),
258+
...(uid ? [`uid: "${uid}"`] : []),
259259
'---',
260260
'',
261261
fullDescription,

.github/scripts/process-edit-event-issue.test.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const EXISTING_META = {
4545
intake: { issue_number: 99, submitted_by_github: 'olduser', submitted_date: '2026-01-01', maintainer_notes: '' },
4646
};
4747

48-
const EXISTING_CONTENT = `---\nid: ${TEST_EVENT_ID}\n---\n\nOld content here.\n`;
48+
const EXISTING_CONTENT = `---\nid: ${TEST_EVENT_ID}\nuid: "abc1234"\n---\n\nOld content here.\n`;
4949

5050
function makeEventPayload(body, { number = 10, login = 'edituser' } = {}) {
5151
return JSON.stringify({
@@ -228,6 +228,14 @@ describe('process-edit-event-issue', () => {
228228
assert.equal(content, EXISTING_CONTENT, 'content.md should be unchanged when full_description is blank');
229229
});
230230

231+
test('full_description provided rewrites content.md with quoted uid', async () => {
232+
const { outputs } = await runScript(makeValidEditBody(), { tmpDir, number: 16 });
233+
assert.equal(outputs.valid, 'true');
234+
235+
const content = await fs.readFile(path.join(TEST_EVENT_DIR, 'content.md'), 'utf8');
236+
assert.match(content, /^uid: "[0-9a-f]{7}"$/m, 'content.md uid must be quoted');
237+
});
238+
231239
test('all activities unchecked preserves existing event_activities', async () => {
232240
const body = makeValidEditBody({ activities: '- [ ] Live coding\n- [ ] Exhibition\n' });
233241
const { outputs } = await runScript(body, { tmpDir, number: 12 });

.github/scripts/process-new-event-issue.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ async function main() {
243243
const markdownLines = [
244244
'---',
245245
`id: ${eventId}`,
246-
`uid: ${uid}`,
246+
`uid: "${uid}"`,
247247
'---',
248248
'',
249249
...(fullDescription ? [fullDescription, ''] : []),

.github/scripts/process-new-event-issue.test.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,19 @@ describe('process-new-event-issue', () => {
193193
eventId,
194194
'metadata.json'
195195
);
196+
const contentPath = path.join(
197+
path.resolve(SCRIPTS_DIR, '../..'),
198+
'pcd-website/src/content/events',
199+
eventId,
200+
'content.md'
201+
);
196202
try {
197203
const meta = JSON.parse(await fs.readFile(metaPath, 'utf8'));
198204
assert.equal(meta.id, eventId);
199205
assert.match(meta.uid, /^[0-9a-f]{7}$/);
200206
assert.equal(meta.event_name, 'PCD @ Test City');
207+
const contentMd = await fs.readFile(contentPath, 'utf8');
208+
assert.match(contentMd, /^uid: "[0-9a-f]{7}"$/m);
201209
} finally {
202210
// Clean up the generated event dir
203211
await fs.rm(path.join(

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ No install needed — `open-location-code` is already available at `pcd-website/
6060
Event data lives in `src/content/events/<event-id>/`:
6161
- `metadata.json` — event fields (id, uid, name, location, dates, organizers, etc.)
6262
- `content.md` — markdown body (frontmatter must include `id:` and `uid:`)
63+
- `uid:` values in frontmatter **must always be quoted** (`uid: "abc1234"`) because unquoted hex strings like `1e46977` are parsed as scientific notation by YAML, destroying the value.
6364

6465
`src/lib/nodes.ts` loads all events at Astro build time using `import.meta.glob()` + `getCollection('events')`, validates plus codes with `OpenLocationCode`, decodes lat/lng, and returns a sorted `Node[]` array passed as props to `<MapView>`.
6566

@@ -84,6 +85,7 @@ Event data lives in `src/content/events/<event-id>/`:
8485
| `src/components/NodePanel.vue` | Slide-in event detail panel with minimap, calendar links, share button |
8586
| `src/components/NodeList.vue` | Alphabetical event list overlay with map style switcher + dark mode toggle |
8687
| `src/components/LanguageSwitcher.vue` | Language selector dropdown in the top bar |
88+
| `src/lib/analytics.ts` | `trackEvent()` Fathom helper + `AnalyticsEvent` type + event-name constants |
8789
| `src/lib/nodes.ts` | `Node` interface + `loadNodes()` |
8890
| `src/lib/format.ts` | `formatDate()`, `formatDateRange()`, `calendarLinks()`, etc. |
8991
| `src/lib/popup.ts` | Leaflet popup HTML generation (`makePopupContent()`) |

TODO.md

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,61 @@
1-
- [ ] Add form submission using Decap CMS or similar, to allow organizers to submit their events without needing a Github account or going through the issue/PR process.
2-
- [ ] Fractional zoom levels cause gaps in the map tiles on Chromium. (this is a known issue with Leaflet, see: https://github.com/Leaflet/Leaflet/issues/3575)
3-
- [ ] Add an optional total event count to the map view, showing the total number of events currently on the map. This can be added as a large badge in the top left corner of the map, with a tooltip that says "Total number of PCD events worldwide: XXX". Only show this badge if there are more than 10 events on the map.
4-
- [ ] Label "new" on the map for events that were added in the last 7 days, to help users discover new events that were recently added to the map. This can be a small badge or icon next to the event name in the popup and in the side panel.
5-
- [ ] Investigate translating the map labels to match the language selector.
1+
## Ready for work
2+
3+
- [ ] Add a default OG description for events that don't have a short or long description, a generic fallback like "Join the global celebration at Processing Community Day 2026 in [City]. Explore the map, or start a PCD in your community." Also change the default OG description to something more engaging and less generic, to encourage people to click through to the map and explore the events. Maybe something like "Discover the global celebration of creativity and coding at Processing Community Day 2026! Explore events worldwide, connect with local communities, and join the fun. Find an event near you or start your own PCD today!"
4+
- [ ] Add Fathom analytics
5+
- [ ] Group the list by country, and then sort alphabetically by city within each country, to make it easier for users to find events in their area.
6+
- [ ] The "Submit an event" button should open a modal with the 3 steps for submitting an event, instead of linking to the GitHub page. 1. Say hi in the thread. 2. Open a thread in the forum (can be a stub) 3. Create a PR with the event details. This will make it easier for users to understand the process and encourage more submissions, especially from those who may not be familiar with GitHub.
7+
- [ ] Hover state for "Submit an event" should be the same as the other large buttons.
8+
- [ ] If an event has a thread AND an event page, have two buttons on top of each other. The event page first, and the thread button below in a secondary color.
9+
- [ ] When the menu or panel is focused, the + and - buttons should controll the zoom of the page instead of the map, to allow users to zoom in on the text. Currently, the map zooms in and out when trying to zoom the page, which can be frustrating for users who are trying to read the event details.
10+
- [ ] Use a stylesheet for the markdown in the event details panel to support things like headings, lists, links, and other basic markdown formatting, to make the event descriptions more visually appealing and easier to read. No markdown in the short description, but the long description can support markdown formatting.
11+
- [ ] Add item to the review checklist to encourage reviewers to check that the forum link is correct.
12+
- [ ] Make the OSM links more robust (lat/lon maybe?) and add a link to Google Maps as well (dropdown similar to the add to calendar links in the event details panel).
13+
- [ ] Italicize the name in "This event is organized by [name] and is not affiliated..." in the event details side panel.
14+
- [ ] BUG: on Safari, tabbing from the burger menu button goes straight to markers on the map instead of the other header items.
15+
- [ ] In the panel-info-card, a "location TBD" should use a pin icon (not a link icon) unless it is a virtual event
16+
- [ ] BUG: the checkbox "Don't show again" cannot be toggled by pressing enter on the keyboard.
17+
18+
## Needs design or clarification:
19+
- [ ] When landing on an area of the map without any events, show a message encouraging users to submit an event in that area, and provide a link to the submission process. Something like "No events found in this area. Be the first to bring PCD to your community! [Submit an event](#)."
20+
- [ ] Add links to the modal for social media, discord, github repo, processing foundation website, to encourage people to connect with the community and learn more about Processing.
21+
- [ ] Add Discourse integration to post a message in the event thread when the PR is merged, with a link to the event on the map and a reminder to share the event.
22+
- [ ] Replace the close button in the menu with a double chevron that matches the open button, to make it clearer that it's a toggle for the menu.
23+
- [ ] In review feedback checklist, only refer to data that was changed in the edit form.
24+
- [ ] Add PCD or Processing Foundation favicon to the map page.
25+
- [ ] Add a "fullscreen" button to the details panel that opens the event details in a new page with a larger layout, to make it easier to read and navigate the event information.
26+
- [ ] Add OSM URI to the event details. Helps with venues inside of other buildings, and info (for example accessibility info) that may be on the OSM page for the venue.
627

728
## Later improvements (not for MVP):
29+
- [ ] Investigate translating the map labels to match the language selector (seems complicated)
30+
- [ ] Add an optional total event count to the map view, showing the total number of events currently on the map. This can be added as a large badge in the top left corner of the map, with a tooltip that says "Total number of PCD events worldwide: XXX". Only show this badge if there are more than 10 events on the map.
31+
- [ ] Label "new" on the map for events that were added in the last 7 days, to help users discover new events that were recently added to the map. This can be a small badge or icon next to the event name in the popup and in the side panel.
32+
- [ ] Add form submission using Decap CMS or similar, to allow organizers to submit their events without needing a Github account or going through the issue/PR process.
33+
- [ ] Support events with multiple locations (e.g. in-person event with multiple venues,). This may require changes to the data model and the way events are displayed on the map and in the details panel.
834
- [ ] Add submission form with confirmation email when the event is approved and published.
9-
- [ ] Allow organizers to edit their event information after it's published.
35+
- [ ] Allow organizers to edit their event information after it's published.
36+
- [ ] Add support for "related" events or locations around the main event, to allow organizers to link to nearby venues, cultural spaces, or related events happening around the same time even if not officially part of PCD.
37+
38+
## Feedback from Sebastian
39+
40+
Here is a good starter you can use as a template: https://web.archive.org/web/20250326143004/https://www.turbulence.berlin/portfolio
41+
42+
Note that events might have heavily varying accessibility despite being in the same venue
43+
44+
But still the venues have basic stuff that stays – at least regarding mobility. If you allow events to add a OSM place URL, you're future-proof :)
45+
46+
Something like this: https://www.openstreetmap.org/node/3215910341
47+
48+
A OSM URI is better [note: than plus codes] the venue might be inside another venue. OSM normally has infos then – e.g. when the place is indoors, and on which level it is
49+
50+
Maps are heavily difficult to make accessible. Simply add a list view that you can toggle, and have a hidden switch when the map is focused by the screenreader that allows toggling to the list view.
51+
52+
Have the menu inside a <nav> element would be the standard, and open it when you tab into it from the home/logo button
53+
54+
Like
55+
56+
<hidden link reachable via shift+tab on the home link that skips focus to main content>
57+
[menu items go here, if you tab into it the menu opens]
58+
</nav>
59+
<main>
60+
…main content, list, map, single open feature…
61+
</main>

pcd-website/src/components/InfoModal.vue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
44
import { Icon } from '@iconify/vue';
55
import { createFocusTrap, type FocusTrap } from 'focus-trap';
66
import fallbackBannerImage from '../images/community_background_2x.png?url';
7+
import { PCD_FORUM_THREAD_URL } from '../config';
78
89
const props = defineProps<{ open: boolean; bannerImageUrl?: string; autoOpened?: boolean }>();
910
const bannerImage = computed(() => props.bannerImageUrl ?? fallbackBannerImage);
@@ -76,6 +77,19 @@ onUnmounted(() => {
7677
/>
7778
<div class="info-modal-body">
7879
<h2 class="info-modal-title">{{ t('nav.info_modal_title') }}</h2>
80+
<a
81+
class="info-modal-info-box"
82+
:href="PCD_FORUM_THREAD_URL"
83+
target="_blank"
84+
:aria-label="`${t('nav.info_modal_info_box_title')} (${t('nav.opens_in_new_tab')})`"
85+
rel="noopener noreferrer"
86+
>
87+
<div class="info-modal-info-box-titlebar">{{ t('nav.info_modal_info_box_title') }}</div>
88+
<div class="info-modal-info-box-body">
89+
<span><strong>{{ t('nav.info_modal_info_box_this_october') }}</strong> {{ t('nav.info_modal_info_box') }}</span>
90+
<Icon icon="bi:box-arrow-up-right" width="0.875em" height="0.875em" aria-hidden="true" class="info-modal-info-box-icon" />
91+
</div>
92+
</a>
7993
<p class="info-modal-description">{{ t('nav.info_modal_description') }}</p>
8094
<button
8195
class="info-modal-show-map-btn"
@@ -169,6 +183,7 @@ onUnmounted(() => {
169183
border: 0;
170184
}
171185
186+
172187
.info-modal-description {
173188
margin: 0 0 var(--spacing-lg);
174189
font-size: 0.9375rem;

pcd-website/src/components/MapView.vue

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import LanguageSwitcher from './LanguageSwitcher.vue';
99
import InfoModal from './InfoModal.vue';
1010
import SubmitModal from './SubmitModal.vue';
1111
import { currentLocale } from '../i18n/localeState';
12+
import { trackEvent, SUBMIT_EVENT_BUTTON_CLICK } from '../lib/analytics';
1213
import { i18n } from '../i18n/index';
1314
1415
const props = defineProps<{
@@ -27,6 +28,16 @@ const infoModalOpen = ref(false);
2728
const infoModalAutoOpened = ref(false);
2829
const submitModalOpen = ref(false);
2930
31+
function handleSubmitClick() {
32+
submitModalOpen.value = true;
33+
trackEvent(SUBMIT_EVENT_BUTTON_CLICK);
34+
}
35+
36+
function handleInfoClick() {
37+
infoModalOpen.value = true;
38+
infoModalAutoOpened.value = false;
39+
}
40+
3041
function shouldAutoOpenInfoModal(): boolean {
3142
return localStorage.getItem(INFO_MODAL_SUPPRESS_KEY) !== 'true';
3243
}
@@ -698,13 +709,13 @@ onUnmounted(() => {
698709
<div class="host-btn-group">
699710
<button
700711
id="host-btn"
701-
@click="submitModalOpen = true"
712+
@click="handleSubmitClick()"
702713
>{{ t('nav.submit_event') }}</button>
703714
<button
704715
id="info-btn"
705716
:aria-label="t('nav.info_button_label')"
706717
@mouseenter="preloadBannerImage"
707-
@click="infoModalOpen = true; infoModalAutoOpened = false"
718+
@click="handleInfoClick()"
708719
>i</button>
709720
</div>
710721
<InfoModal :open="infoModalOpen" :bannerImageUrl="props.bannerImageUrl" :autoOpened="infoModalAutoOpened" @close="infoModalOpen = false" @suppress="suppressInfoModal" />

pcd-website/src/components/SubmitModal.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import { ref, watch, nextTick, onUnmounted } from 'vue';
33
import { useI18n } from 'vue-i18n';
44
import { createFocusTrap, type FocusTrap } from 'focus-trap';
55
import { SUBMIT_EVENT_URL, PCD_FORUM_THREAD_URL, PCD_FORUM_NEW_TOPIC_URL } from '../config';
6+
import { trackEvent, SUBMIT_STEP_1, SUBMIT_STEP_2, SUBMIT_STEP_3, type AnalyticsEvent } from '../lib/analytics';
7+
8+
function handleStepClick(event: AnalyticsEvent) {
9+
trackEvent(event);
10+
}
611
712
const props = defineProps<{ open: boolean }>();
813
const emit = defineEmits<{ close: [] }>();
@@ -70,6 +75,10 @@ onUnmounted(() => {
7075
>×</button>
7176
<div class="submit-modal-body">
7277
<h2 id="submit-modal-title" class="submit-modal-title">{{ t('nav.submit_modal_title') }}</h2>
78+
<div class="submit-modal-recommendation">
79+
<div class="submit-modal-recommendation-titlebar">{{ t('nav.submit_modal_tip_title') }}</div>
80+
<div class="submit-modal-recommendation-body">{{ t('nav.submit_modal_recommendation_pre') }}<strong>{{ t('nav.submit_modal_recommendation_highlight') }}</strong>{{ t('nav.submit_modal_recommendation_post') }}</div>
81+
</div>
7382
<ol class="submit-steps">
7483
<li class="submit-step">
7584
<span class="step-num" aria-hidden="true">1</span>
@@ -78,6 +87,7 @@ onUnmounted(() => {
7887
:href="PCD_FORUM_THREAD_URL"
7988
target="_blank"
8089
rel="noopener"
90+
@click="handleStepClick(SUBMIT_STEP_1)"
8191
:aria-label="`${t('nav.submit_modal_step1_heading')} — ${t('nav.submit_modal_step1_body')} (${t('nav.opens_in_new_tab')})`"
8292
>
8393
<span class="step-btn-text">
@@ -94,6 +104,7 @@ onUnmounted(() => {
94104
:href="PCD_FORUM_NEW_TOPIC_URL"
95105
target="_blank"
96106
rel="noopener"
107+
@click="handleStepClick(SUBMIT_STEP_2)"
97108
:aria-label="`${t('nav.submit_modal_step2_heading')} — ${t('nav.submit_modal_step2_body')} (${t('nav.opens_in_new_tab')})`"
98109
>
99110
<span class="step-btn-text">
@@ -110,6 +121,7 @@ onUnmounted(() => {
110121
:href="SUBMIT_EVENT_URL"
111122
target="_blank"
112123
rel="noopener"
124+
@click="handleStepClick(SUBMIT_STEP_3)"
113125
:aria-label="`${t('nav.submit_modal_step3_heading')} — ${t('nav.submit_modal_step3_body')} (${t('nav.opens_in_new_tab')})`"
114126
>
115127
<span class="step-btn-text">

0 commit comments

Comments
 (0)