Skip to content

Commit 9a6daa4

Browse files
committed
Make dismissal of InfoModal clearer. Big purple "Go to the map" button instead of close button lost in the image. Removed link to the forum (will add via clearer submission flow)
1 parent d6da071 commit 9a6daa4

11 files changed

Lines changed: 35 additions & 55 deletions

File tree

pcd-website/src/components/InfoModal.vue

Lines changed: 15 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<script setup lang="ts">
22
import { ref, watch, nextTick, onUnmounted, computed } from 'vue';
33
import { useI18n } from 'vue-i18n';
4-
import { Icon } from '@iconify/vue';
54
import { createFocusTrap, type FocusTrap } from 'focus-trap';
6-
import { PCD_FORUM_THREAD_URL } from '../config';
75
import fallbackBannerImage from '../images/community_background_2x.png?url';
86
97
const props = defineProps<{ open: boolean; bannerImageUrl?: string; autoOpened?: boolean }>();
@@ -14,7 +12,7 @@ const dontShowAgain = ref(false);
1412
1513
function handleClose() {
1614
if (dontShowAgain.value) emit('suppress');
17-
emit('close');
15+
else emit('close');
1816
}
1917
2018
const { t } = useI18n();
@@ -62,13 +60,6 @@ onUnmounted(() => {
6260
:aria-label="t('nav.info_modal_title')"
6361
class="info-modal"
6462
>
65-
<button
66-
class="info-modal-close"
67-
:aria-label="t('nav.info_modal_close')"
68-
@click="handleClose()"
69-
>
70-
<Icon icon="bi:x-lg" width="1.125em" height="1.125em" aria-hidden="true" />
71-
</button>
7263
<img
7364
:src="bannerImage"
7465
class="info-modal-banner"
@@ -78,16 +69,12 @@ onUnmounted(() => {
7869
<div class="info-modal-body">
7970
<h2 class="info-modal-title">{{ t('nav.info_modal_title') }}</h2>
8071
<p class="info-modal-description">{{ t('nav.info_modal_description') }}</p>
81-
<a
82-
:href="PCD_FORUM_THREAD_URL"
83-
target="_blank"
84-
rel="noopener noreferrer"
85-
class="info-modal-forum-btn"
86-
:aria-label="t('nav.info_modal_forum_btn_new_tab')"
72+
<button
73+
class="info-modal-show-map-btn"
74+
@click="handleClose()"
8775
>
88-
{{ t('nav.info_modal_forum_btn') }}
89-
<Icon icon="bi:box-arrow-up-right" width="1em" height="1em" aria-hidden="true" style="margin-left: 0.5rem; vertical-align: -0.1em;" />
90-
</a>
76+
{{ props.autoOpened ? t('nav.info_modal_go_to_map') : t('nav.info_modal_back_to_map') }}
77+
</button>
9178
<label v-if="props.autoOpened" class="info-modal-suppress">
9279
<input type="checkbox" v-model="dontShowAgain" />
9380
{{ t('nav.info_modal_dont_show_again') }}
@@ -120,28 +107,6 @@ onUnmounted(() => {
120107
overflow: hidden;
121108
}
122109
123-
.info-modal-close {
124-
position: absolute;
125-
top: var(--spacing-sm);
126-
right: var(--spacing-sm);
127-
z-index: 1;
128-
width: 32px;
129-
height: 32px;
130-
display: flex;
131-
align-items: center;
132-
justify-content: center;
133-
background: rgba(0, 0, 0, 0.35);
134-
color: #fff;
135-
border: none;
136-
border-radius: 50%;
137-
cursor: pointer;
138-
transition: background-color 0.15s ease;
139-
}
140-
141-
.info-modal-close:hover {
142-
background: rgba(0, 0, 0, 0.55);
143-
}
144-
145110
.info-modal-banner {
146111
display: block;
147112
width: 100%;
@@ -172,25 +137,31 @@ onUnmounted(() => {
172137
color: var(--color-text-muted);
173138
}
174139
175-
.info-modal-forum-btn {
140+
.info-modal-show-map-btn {
176141
display: block;
177142
width: 100%;
178143
padding: 0.625rem 1rem;
179144
background: var(--color-primary);
180145
color: #fff;
181146
text-align: center;
182-
text-decoration: none;
183147
font-size: 0.9375rem;
184148
font-weight: 600;
149+
border: none;
185150
border-radius: 6px;
151+
cursor: pointer;
186152
box-sizing: border-box;
187153
transition: opacity 0.15s ease;
188154
}
189155
190-
.info-modal-forum-btn:hover {
156+
.info-modal-show-map-btn:hover {
191157
opacity: 0.85;
192158
}
193159
160+
.info-modal-show-map-btn:focus-visible {
161+
outline: 2px solid var(--color-focus);
162+
outline-offset: 2px;
163+
}
164+
194165
.info-modal-suppress {
195166
display: flex;
196167
align-items: center;

pcd-website/src/components/MapView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,8 @@ onMounted(async () => {
648648
document.addEventListener('keydown', handleKeydown);
649649
650650
651-
// Auto-open info modal on first visit
652-
if (shouldAutoOpenInfoModal()) {
651+
// Auto-open info modal on first visit, unless arriving via a direct event link
652+
if (shouldAutoOpenInfoModal() && !linkedNode) {
653653
infoModalOpen.value = true;
654654
infoModalAutoOpened.value = true;
655655
}

pcd-website/src/i18n/locales/de.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"info_modal_description": "Der Processing Community Day (PCD) ist eine weltweite Veranstaltungsreihe, die von lokalen Communities organisiert wird und Kunst, Code und kreative Open-Source-Tools feiert. Finde deine lokale Veranstaltung auf der Karte oder fang an, deine eigene zu organisieren!",
1515
"info_modal_forum_btn": "Mehr im Forum erfahren",
1616
"info_modal_forum_btn_new_tab": "Visit the forum thread (opens in new tab)",
17-
"info_modal_close": "Close",
17+
"info_modal_go_to_map": "Zur Karte",
18+
"info_modal_back_to_map": "Zurück zur Karte",
1819
"info_modal_dont_show_again": "Nicht mehr anzeigen"
1920
},
2021
"node_list": {

pcd-website/src/i18n/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"info_modal_description": "Processing Community Day (PCD) is a worldwide series of community-led events celebrating art, code, and open-source creative tools. Events are organized by local communities around the globe. Find your local event on the map, or start organizing your own!",
1515
"info_modal_forum_btn": "Learn more on the forum",
1616
"info_modal_forum_btn_new_tab": "Visit the forum thread (opens in new tab)",
17-
"info_modal_close": "Close",
17+
"info_modal_go_to_map": "Go to the map",
18+
"info_modal_back_to_map": "Back to the map",
1819
"info_modal_dont_show_again": "Don't show this again"
1920
},
2021
"node_list": {

pcd-website/src/i18n/locales/es.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"info_modal_description": "Processing Community Day (PCD) es una serie mundial de eventos organizados por comunidades locales que celebran el arte, el código y las herramientas creativas de código abierto. Encuentra tu evento local en el mapa, ¡o empieza a organizar el tuyo!",
1515
"info_modal_forum_btn": "Más información en el foro",
1616
"info_modal_forum_btn_new_tab": "Visit the forum thread (opens in new tab)",
17-
"info_modal_close": "Close",
17+
"info_modal_go_to_map": "Ir al mapa",
18+
"info_modal_back_to_map": "Volver al mapa",
1819
"info_modal_dont_show_again": "No volver a mostrar"
1920
},
2021
"node_list": {

pcd-website/src/i18n/locales/fr.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"info_modal_description": "Processing Community Day (PCD) est une série mondiale d'événements organisés par des communautés locales, célébrant l'art, le code et les outils créatifs open source. Trouvez votre événement local sur la carte, ou commencez à organiser le vôtre !",
1515
"info_modal_forum_btn": "En savoir plus sur le forum",
1616
"info_modal_forum_btn_new_tab": "Visit the forum thread (opens in new tab)",
17-
"info_modal_close": "Close",
17+
"info_modal_go_to_map": "Aller à la carte",
18+
"info_modal_back_to_map": "Retour à la carte",
1819
"info_modal_dont_show_again": "Ne plus afficher"
1920
},
2021
"node_list": {

pcd-website/src/i18n/locales/ja.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"info_modal_description": "Processing Community Day(PCD)は、アート・コード・オープンソースのクリエイティブツールを祝う、世界各地のコミュニティが主催するイベントシリーズです。地図からお近くのイベントを見つけるか、自分でイベントを主催してみましょう!",
1515
"info_modal_forum_btn": "フォーラムで詳しく見る",
1616
"info_modal_forum_btn_new_tab": "Visit the forum thread (opens in new tab)",
17-
"info_modal_close": "Close",
17+
"info_modal_go_to_map": "地図を見る",
18+
"info_modal_back_to_map": "地図に戻る",
1819
"info_modal_dont_show_again": "今後表示しない"
1920
},
2021
"node_list": {

pcd-website/src/i18n/locales/ko.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"info_modal_description": "Processing Community Day(PCD)는 예술, 코드, 오픈소스 창작 도구를 기념하는 전 세계 커뮤니티 주도 이벤트 시리즈입니다. 지도에서 가까운 이벤트를 찾거나 직접 이벤트를 조직해 보세요!",
1515
"info_modal_forum_btn": "포럼에서 자세히 알아보기",
1616
"info_modal_forum_btn_new_tab": "Visit the forum thread (opens in new tab)",
17-
"info_modal_close": "Close",
17+
"info_modal_go_to_map": "지도로 이동",
18+
"info_modal_back_to_map": "지도로 돌아가기",
1819
"info_modal_dont_show_again": "다시 표시하지 않기"
1920
},
2021
"node_list": {

pcd-website/src/i18n/locales/pt.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"info_modal_description": "O Processing Community Day (PCD) é uma série mundial de eventos organizados por comunidades locais que celebram a arte, o código e as ferramentas criativas de código aberto. Encontre o seu evento local no mapa ou comece a organizar o seu próprio!",
1515
"info_modal_forum_btn": "Saiba mais no fórum",
1616
"info_modal_forum_btn_new_tab": "Visit the forum thread (opens in new tab)",
17-
"info_modal_close": "Close",
17+
"info_modal_go_to_map": "Ir para o mapa",
18+
"info_modal_back_to_map": "Voltar ao mapa",
1819
"info_modal_dont_show_again": "Não mostrar novamente"
1920
},
2021
"node_list": {

pcd-website/src/i18n/locales/zh-CN.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"info_modal_description": "Processing Community Day(PCD)是由全球各地社区主办的系列活动,旨在庆祝艺术、代码与开源创意工具。在地图上找到您附近的活动,或者开始组织您自己的活动!",
1515
"info_modal_forum_btn": "在论坛了解更多",
1616
"info_modal_forum_btn_new_tab": "Visit the forum thread (opens in new tab)",
17-
"info_modal_close": "Close",
17+
"info_modal_go_to_map": "前往地图",
18+
"info_modal_back_to_map": "返回地图",
1819
"info_modal_dont_show_again": "不再显示"
1920
},
2021
"node_list": {

0 commit comments

Comments
 (0)