Skip to content

Commit b9061ab

Browse files
committed
fix(WhatsNew): Whats New modal was not displaying
1 parent c2f1c82 commit b9061ab

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

src/App.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@
2323
</template>
2424

2525
<script setup lang="ts">
26-
import { defineAsyncComponent } from 'vue'
2726
import Header from './components/Header.vue'
2827
import Footer from './components/Footer.vue'
2928
import InfoBanner from './components/InfoBanner.vue'
3029
import ApiConfiguration from './components/ApiConfiguration.vue'
3130
import SearchContent from './components/Features/SearchContent.vue'
3231
import ComingSoon from './components/ComingSoon.vue'
33-
34-
const WhatsNew = defineAsyncComponent(() => import('./components/WhatsNew.vue'))
32+
import WhatsNew from './components/WhatsNew.vue'
3533
</script>
3634

3735
<style lang="scss" scoped>

src/components/Modal.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
aria-modal="true"
77
:aria-labelledby="`${id}-heading`"
88
:aria-describedby="`${id}-description`"
9+
tabindex="-1"
910
@cancel="emit('close')"
1011
@click="handleBackdropClick"
1112
>
@@ -97,11 +98,8 @@ watch(
9798
modal.value.showModal()
9899
document.body.style.overflow = 'hidden'
99100
100-
// Focus the first focusable element
101-
const focusableElements = getFocusableElements()
102-
if (focusableElements.length > 0) {
103-
focusableElements[0]?.focus()
104-
}
101+
// Focus the dialog element itself for screen reader announcement
102+
modal.value.focus()
105103
106104
// Add keydown listener for focus trap
107105
modal.value.addEventListener('keydown', handleKeyDown)

src/components/WhatsNew.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@
2525
</template>
2626

2727
<script setup lang="ts">
28-
import { ref, onMounted, defineAsyncComponent } from 'vue'
28+
import { ref, onMounted } from 'vue'
2929
import InfoBanner from './InfoBanner.vue'
30-
31-
const Modal = defineAsyncComponent(() => import('./Modal.vue'))
30+
import Modal from './Modal.vue'
3231
3332
interface Feature {
3433
id: string
@@ -156,6 +155,7 @@ onMounted(() => {
156155
157156
if (newFeatures.value.length > 0) {
158157
showModal.value = true
158+
console.log('New features since last visit:', newFeatures.value)
159159
}
160160
161161
updateLastVisitDate()

0 commit comments

Comments
 (0)