Skip to content

議程資訊頁面#105

Draft
mirumodapon wants to merge 8 commits intofeat/session-uifrom
feat/session-popup
Draft

議程資訊頁面#105
mirumodapon wants to merge 8 commits intofeat/session-uifrom
feat/session-popup

Conversation

@mirumodapon
Copy link
Copy Markdown
Collaborator

No description provided.

@mirumodapon mirumodapon requested a review from Copilot April 19, 2026 06:01
@mirumodapon mirumodapon linked an issue Apr 19, 2026 that may be closed by this pull request
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a session detail overlay/page under the existing sessions table, along with router scroll behavior adjustments to preserve scroll position when navigating between session routes.

Changes:

  • Add app/pages/session/[id].vue to display session details in a modal-style overlay.
  • Nest the session detail route under app/pages/session.vue via <NuxtPage />.
  • Add global router scrollBehavior customization for session-to-session navigation.
  • Render session abstracts and speaker bios via <MDC> in CpSessionInfoCard.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
app/router.options.ts Adds custom scroll behavior, including special handling for session routes.
app/pages/session/[id].vue Implements the session detail overlay page and close/escape handling.
app/pages/session.vue Adds <NuxtPage /> to render nested session detail routes.
app/components/feature/CpSessionInfoCard.vue Switches description/bio rendering from plain text to MDC/markdown rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/pages/session/[id].vue
Comment thread app/router.options.ts Outdated
Comment thread app/pages/session/[id].vue
Comment thread app/pages/session/[id].vue Outdated
Comment thread app/pages/session/[id].vue Outdated
Comment on lines +43 to +57
onMounted(() => {
document.body.style.overflow = 'hidden'

function onKeydown(e: KeyboardEvent) {
if (e.key === 'Escape') {
close()
}
}

window.addEventListener('keydown', onKeydown)

onUnmounted(() => {
document.body.style.overflow = ''
window.removeEventListener('keydown', onKeydown)
})
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

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

This modal forces document.body.style.overflow = 'hidden' and restores it to an empty string on unmount. If the body had a non-empty overflow style before opening (or if multiple overlays can stack), this will restore the wrong value. Capture the previous document.body.style.overflow before overwriting it and restore that exact value during teardown.

Suggested change
onMounted(() => {
document.body.style.overflow = 'hidden'
function onKeydown(e: KeyboardEvent) {
if (e.key === 'Escape') {
close()
}
}
window.addEventListener('keydown', onKeydown)
onUnmounted(() => {
document.body.style.overflow = ''
window.removeEventListener('keydown', onKeydown)
})
let previousBodyOverflow = ''
function onKeydown(e: KeyboardEvent) {
if (e.key === 'Escape') {
close()
}
}
onMounted(() => {
previousBodyOverflow = document.body.style.overflow
document.body.style.overflow = 'hidden'
window.addEventListener('keydown', onKeydown)
})
onUnmounted(() => {
document.body.style.overflow = previousBodyOverflow
window.removeEventListener('keydown', onKeydown)

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

暫時不需要,目前不會有其他的值

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

議程頁面

2 participants