8000 feat(agenda): Agenda meeting materials in overflow menu by holloway · Pull Request #8698 · ietf-tools/datatracker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(agenda): Agenda meeting materials in overflow menu #8698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 48 additions & 12 deletions client/agenda/AgendaScheduleList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,12 @@
:options='item.links'
key-field='id'
:render-icon='renderLinkIcon'
:render-label='renderLinkLabel'
:render-label='renderLink'
)
n-button(size='tiny')
i.bi.bi-three-dots
.agenda-table-cell-links-buttons(v-else-if='item.links && item.links.length > 0')
template(v-if='item.flags.agenda')
n-popover
template(#trigger)
i.bi.bi-collection(
:id='`btn-lnk-` + item.key + `-mat`'
@click='showMaterials(item.key)'
)
span Show meeting materials
template(v-else-if='item.type === `regular`')
template(v-if='!item.flags.agenda && item.type === `regular`')
n-popover
template(#trigger)
i.no-meeting-materials
Expand All @@ -142,7 +134,16 @@
span No meeting materials yet.
n-popover(v-for='lnk of item.links', :key='lnk.id')
template(#trigger)
button(
v-if="lnk.click"
type="button"
:id='`btn-` + lnk.id'
@click='lnk.click'
:aria-label='lnk.label'
:class='`border-0 bg-transparent text-` + lnk.color'
): i.bi(:class='`bi-` + lnk.icon')
a(
v-else
:id='`btn-` + lnk.id'
:href='lnk.href'
:aria-label='lnk.label'
Expand Down Expand Up @@ -280,13 +281,28 @@ const meetingEvents = computed(() => {
}
acc.lastTypeName = typeName

// -> Populate event links
//
/**
* -> Populate event menu items
*
* links is an array of either,
* 1. { href: "...", click: undefined, ...sharedProps }
* 2. { click: () => {...}, href: undefined, ...sharedProps }
*/
const links = []
const typesWithLinks = ['regular', 'plenary', 'other']
const purposesWithoutLinks = ['admin', 'closed_meeting', 'officehours', 'social']
if (item.flags.showAgenda || (typesWithLinks.includes(item.type) && !purposesWithoutLinks.includes(item.purpose))) {
if (item.flags.agenda) {
// -> Meeting Materials
links.push({
id: `btn-${item.id}-mat`,
label: 'Show meeting materials',
icon: 'collection',
href: undefined,
click: () => showMaterials(item.id),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the new prop click which causes it to be rendered as a button.

color: 'black'
})
links.push({
id: `lnk-${item.id}-tar`,
label: 'Download meeting materials as .tar archive',
Expand Down Expand Up @@ -584,7 +600,11 @@ function renderLinkIcon (opt) {
return h('i', { class: `bi bi-${opt.icon} text-${opt.color}` })
}

function renderLinkLabel (opt) {
function renderLink (opt) {
if (opt.click) {
return h('button', { type: 'button', class: 'overflow-button', onClick: opt.click }, opt.label)
}

return h('a', { href: opt.href, target: '_blank' }, opt.label)
}

Expand Down Expand Up @@ -1559,6 +1579,22 @@ onBeforeUnmount(() => {
}
}

.overflow-button {
font-size: inherit;
padding: 0;
border: 0;
background: transparent;

&:before {
content: "";
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
}

@keyframes fadeInAnim {
0% {
opacity: 0;
Expand Down
8 changes: 4 additions & 4 deletions playwright/tests/meeting/agenda.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ test.describe('past - desktop', () => {
const eventButtons = row.locator('.agenda-table-cell-links > .agenda-table-cell-links-buttons')
if (event.flags.agenda) {
// Show meeting materials button
await expect(eventButtons.locator('i.bi.bi-collection')).toBeVisible()
await expect(eventButtons.locator(`#btn-btn-${event.id}-mat`)).toBeVisible()
// ZIP materials button
await expect(eventButtons.locator(`#btn-lnk-${event.id}-tar`)).toHaveAttribute('href', `/meeting/${meetingData.meeting.number}/agenda/${event.acronym}-drafts.tgz`)
await expect(eventButtons.locator(`#btn-lnk-${event.id}-tar > i.bi`)).toBeVisible()
Expand Down Expand Up @@ -425,7 +425,7 @@ test.describe('past - desktop', () => {
})
})
// Open dialog
await page.locator(`#agenda-rowid-${event.id} #btn-lnk-${event.id}-mat`).click()
await page.locator(`#agenda-rowid-${event.id} #btn-btn-${event.id}-mat`).click()
await expect(page.locator('.agenda-eventdetails')).toBeVisible()
// Header
await expect(page.locator('.agenda-eventdetails .n-card-header__main > .detail-header > .bi')).toBeVisible()
Expand Down Expand Up @@ -507,7 +507,7 @@ test.describe('past - desktop', () => {
})
})
// Open dialog
await page.locator(`#btn-lnk-${event.id}-mat`).click()
await page.locator(`#btn-btn-${event.id}-mat`).click()
await expect(page.locator('.agenda-eventdetails')).toBeVisible()
// Slides Tab
await page.locator('.agenda-eventdetails .detail-nav > a').nth(1).click()
Expand Down Expand Up @@ -1158,7 +1158,7 @@ test.describe('future - desktop', () => {
if (event.flags.showAgenda || (['regular', 'plenary', 'other'].includes(event.type) && !['admin', 'closed_meeting', 'officehours', 'social'].includes(event.purpose))) {
if (event.flags.agenda) {
// Show meeting materials button
await expect(eventButtons.locator('i.bi.bi-collection')).toBeVisible()
await expect(eventButtons.locator(`#btn-btn-${event.id}-mat`)).toBeVisible()
// ZIP materials button
await expect(eventButtons.locator(`#btn-lnk-${event.id}-tar`)).toHaveAttribute('href', `/meeting/${meetingData.meeting.number}/agenda/${event.acronym}-drafts.tgz`)
await expect(eventButtons.locator(`#btn-lnk-${event.id}-tar > i.bi`)).toBeVisible()
Expand Down
Loading
0