Skip to content

Commit 4a1d29e

Browse files
NGPixelhollowayrjsparks
authored
feat: add wiki button to agenda list for hackathon sessions (#8133)
* feat: add wiki button to agenda list for hackathon sessions * fix: update client/agenda/AgendaScheduleList.vue Co-authored-by: Matthew Holloway <[email protected]> * fix: broken tests --------- Co-authored-by: Matthew Holloway <[email protected]> Co-authored-by: Robert Sparks <[email protected]>
1 parent 98b2514 commit 4a1d29e

File tree

4 files changed

+37
-10
lines changed

4 files changed

+37
-10
lines changed

client/agenda/AgendaScheduleList.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ const meetingEvents = computed(() => {
284284
const purposesWithoutLinks = ['admin', 'closed_meeting', 'officehours', 'social']
285285
if (item.flags.showAgenda || (typesWithLinks.includes(item.type) && !purposesWithoutLinks.includes(item.purpose))) {
286286
if (item.flags.agenda) {
287+
// -> Meeting Materials
287288
links.push({
288289
id: `lnk-${item.id}-tar`,
289290
label: 'Download meeting materials as .tar archive',
@@ -305,7 +306,18 @@ const meetingEvents = computed(() => {
305306
color: 'red'
306307
})
307308
}
308-
if (agendaStore.usesNotes) {
309+
// -> Point to Wiki for Hackathon sessions, HedgeDocs otherwise
310+
if (item.name.toLowerCase().includes('hackathon')) {
311+
links.push({
312+
id: `lnk-${item.id}-wiki`,
313+
label: 'Wiki',
314+
icon: 'book',
315+
href: getUrl('hackathonWiki', {
316+
meetingNumber: agendaStore.meeting.number
317+
}),
318+
color: 'blue'
319+
})
320+
} else if (agendaStore.usesNotes) {
309321
links.push({
310322
id: `lnk-${item.id}-note`,
311323
label: 'Notepad for note-takers',

client/shared/urls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"bofDefinition": "https://www.ietf.org/how/bofs/",
3+
"hackathonWiki": "https://wiki.ietf.org/meeting/{meetingNumber}/hackathon",
34
"meetingCalIcs": "/meeting/{meetingNumber}/agenda.ics",
45
"meetingDetails": "/meeting/{meetingNumber}/session/{eventAcronym}/",
56
"meetingMaterialsPdf": "/meeting/{meetingNumber}/agenda/{eventAcronym}-drafts.pdf",

ietf/templates/meeting/agenda.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
<div id="app"></div>
102102
<div id="app-loading">
103103
<div id="app-loading-footer">
104-
<a class="btn btn-light text-body-secondary mb-3" href="/meeting/{{ meetingData.meetingNumber }}/agenda.txt"><small>Switch to text-only version &#11166;</small></a>
104+
<a class="btn btn-light text-body-secondary mb-3" href="/meeting/{{ meetingData.meetingNumber }}/agenda.txt"><small>Switch to text-only version &raquo;</small></a>
105105
</div>
106106
</div>
107107
{% endblock %}

playwright/tests/meeting/agenda.spec.js

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,17 @@ test.describe('past - desktop', () => {
286286
// No meeting materials yet warning badge
287287
await expect(eventButtons.locator('.no-meeting-materials')).toBeVisible()
288288
}
289-
// Notepad button
290-
const hedgeDocLink = `https://notes.ietf.org/notes-ietf-${meetingData.meeting.number}-${event.type === 'plenary' ? 'plenary' : event.acronym}`
291-
await expect(eventButtons.locator(`#btn-lnk-${event.id}-note`)).toHaveAttribute('href', hedgeDocLink)
292-
await expect(eventButtons.locator(`#btn-lnk-${event.id}-note > i.bi`)).toBeVisible()
289+
if (event.name.toLowerCase().includes('hackathon')) {
290+
// Hackathon Wiki button
291+
const hackathonWikiLink = `https://wiki.ietf.org/meeting/${meetingData.meeting.number}/hackathon`
292+
await expect(eventButtons.locator(`#btn-lnk-${event.id}-wiki`)).toHaveAttribute('href', hackathonWikiLink)
293+
await expect(eventButtons.locator(`#btn-lnk-${event.id}-wiki > i.bi`)).toBeVisible()
294+
} else {
295+
// Notepad button
296+
const hedgeDocLink = `https://notes.ietf.org/notes-ietf-${meetingData.meeting.number}-${event.type === 'plenary' ? 'plenary' : event.acronym}`
297+
await expect(eventButtons.locator(`#btn-lnk-${event.id}-note`)).toHaveAttribute('href', hedgeDocLink)
298+
await expect(eventButtons.locator(`#btn-lnk-${event.id}-note > i.bi`)).toBeVisible()
299+
}
293300
// Chat logs
294301
await expect(eventButtons.locator(`#btn-lnk-${event.id}-logs`)).toHaveAttribute('href', event.links.chatArchive)
295302
await expect(eventButtons.locator(`#btn-lnk-${event.id}-logs > i.bi`)).toBeVisible()
@@ -1162,10 +1169,17 @@ test.describe('future - desktop', () => {
11621169
// No meeting materials yet warning badge
11631170
await expect(eventButtons.locator('.no-meeting-materials')).toBeVisible()
11641171
}
1165-
// Notepad button
1166-
const hedgeDocLink = `https://notes.ietf.org/notes-ietf-${meetingData.meeting.number}-${event.type === 'plenary' ? 'plenary' : event.acronym}`
1167-
await expect(eventButtons.locator(`#btn-lnk-${event.id}-note`)).toHaveAttribute('href', hedgeDocLink)
1168-
await expect(eventButtons.locator(`#btn-lnk-${event.id}-note > i.bi`)).toBeVisible()
1172+
if (event.name.toLowerCase().includes('hackathon')) {
1173+
// Hackathon Wiki button
1174+
const hackathonWikiLink = `https://wiki.ietf.org/meeting/${meetingData.meeting.number}/hackathon`
1175+
await expect(eventButtons.locator(`#btn-lnk-${event.id}-wiki`)).toHaveAttribute('href', hackathonWikiLink)
1176+
await expect(eventButtons.locator(`#btn-lnk-${event.id}-wiki > i.bi`)).toBeVisible()
1177+
} else {
1178+
// Notepad button
1179+
const hedgeDocLink = `https://notes.ietf.org/notes-ietf-${meetingData.meeting.number}-${event.type === 'plenary' ? 'plenary' : event.acronym}`
1180+
await expect(eventButtons.locator(`#btn-lnk-${event.id}-note`)).toHaveAttribute('href', hedgeDocLink)
1181+
await expect(eventButtons.locator(`#btn-lnk-${event.id}-note > i.bi`)).toBeVisible()
1182+
}
11691183
// Chat room
11701184
await expect(eventButtons.locator(`#btn-lnk-${event.id}-room`)).toHaveAttribute('href', event.links.chat)
11711185
await expect(eventButtons.locator(`#btn-lnk-${event.id}-room > i.bi`)).toBeVisible()

0 commit comments

Comments
 (0)