Repository navigation
fix: make quest popup body scrollable to prevent overflow #84
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
Changes from all commits
75b73cd
d4a4455
23d494c
72087fa
b50aa3b
aa785a6
5724dd1
7eac5f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "name": "RetroQuest — The Awakening", | ||
| "short_name": "RetroQuest", | ||
| "description": "A classic text adventure game", | ||
| "start_url": "/", | ||
| "display": "fullscreen", | ||
| "orientation": "portrait", | ||
| "background_color": "#1a1a2e", | ||
| "theme_color": "#1a1a2e", | ||
| "icons": [ | ||
| { | ||
| "src": "/icons/favicon.png", | ||
| "sizes": "any", | ||
| "type": "image/png", | ||
| "purpose": "any maskable" | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,34 +94,39 @@ function closeSuggestions() { | |
| class="flex gap-1.5 px-3 py-2 border-t border-border bg-bg-secondary shrink-0 overflow-x-auto max-[375px]:px-2 max-[375px]:py-1.5" | ||
| > | ||
| <button | ||
| class="inline-flex items-center gap-1 px-3.5 py-1.5 rounded-full bg-chip-bg border border-border text-text-primary cursor-pointer text-sm whitespace-nowrap transition-colors hover:bg-chip-hover max-[375px]:min-h-11 max-[375px]:min-w-11 max-[375px]:px-3 max-[375px]:py-2" | ||
| aria-label="Look" | ||
| class="inline-flex items-center gap-1 px-3.5 py-1.5 rounded-full bg-chip-bg border border-border text-text-primary cursor-pointer text-sm whitespace-nowrap transition-colors hover:bg-chip-hover max-md:px-2.5 max-md:min-h-11 max-md:min-w-11" | ||
| @click="$emit('submitCommand', 'look')" | ||
| > | ||
| 👀 Look | ||
| 👀<span class="max-md:hidden"> Look</span> | ||
| </button> | ||
| <button | ||
| class="inline-flex items-center gap-1 px-3.5 py-1.5 rounded-full bg-chip-bg border border-border text-text-primary cursor-pointer text-sm whitespace-nowrap transition-colors hover:bg-chip-hover max-[375px]:min-h-11 max-[375px]:min-w-11 max-[375px]:px-3 max-[375px]:py-2" | ||
| aria-label="Search" | ||
| class="inline-flex items-center gap-1 px-3.5 py-1.5 rounded-full bg-chip-bg border border-border text-text-primary cursor-pointer text-sm whitespace-nowrap transition-colors hover:bg-chip-hover max-md:px-2.5 max-md:min-h-11 max-md:min-w-11" | ||
| @click="$emit('submitCommand', 'search')" | ||
| > | ||
| 🔍 Search | ||
| 🔍<span class="max-md:hidden"> Search</span> | ||
| </button> | ||
| <button | ||
| class="inline-flex items-center gap-1 px-3.5 py-1.5 rounded-full bg-chip-bg border border-border text-text-primary cursor-pointer text-sm whitespace-nowrap transition-colors hover:bg-chip-hover max-[375px]:min-h-11 max-[375px]:min-w-11 max-[375px]:px-3 max-[375px]:py-2" | ||
| aria-label="Inventory" | ||
| class="inline-flex items-center gap-1 px-3.5 py-1.5 rounded-full bg-chip-bg border border-border text-text-primary cursor-pointer text-sm whitespace-nowrap transition-colors hover:bg-chip-hover max-md:px-2.5 max-md:min-h-11 max-md:min-w-11" | ||
| @click="$emit('submitCommand', 'inventory')" | ||
| > | ||
| 🎒 Inventory | ||
| 🎒<span class="max-md:hidden"> Inventory</span> | ||
| </button> | ||
| <button | ||
| class="inline-flex items-center gap-1 px-3.5 py-1.5 rounded-full bg-chip-bg border border-border text-text-primary cursor-pointer text-sm whitespace-nowrap transition-colors hover:bg-chip-hover max-[375px]:min-h-11 max-[375px]:min-w-11 max-[375px]:px-3 max-[375px]:py-2" | ||
| aria-label="Spells" | ||
| class="inline-flex items-center gap-1 px-3.5 py-1.5 rounded-full bg-chip-bg border border-border text-text-primary cursor-pointer text-sm whitespace-nowrap transition-colors hover:bg-chip-hover max-md:px-2.5 max-md:min-h-11 max-md:min-w-11" | ||
| @click="$emit('submitCommand', 'spells')" | ||
| > | ||
| ✨ Spells | ||
| ✨<span class="max-md:hidden"> Spells</span> | ||
| </button> | ||
| <button | ||
| class="inline-flex items-center gap-1 px-3.5 py-1.5 rounded-full bg-chip-bg border border-border text-text-primary cursor-pointer text-sm whitespace-nowrap transition-colors hover:bg-chip-hover max-[375px]:min-h-11 max-[375px]:min-w-11 max-[375px]:px-3 max-[375px]:py-2" | ||
| aria-label="Help" | ||
| class="inline-flex items-center gap-1 px-3.5 py-1.5 rounded-full bg-chip-bg border border-border text-text-primary cursor-pointer text-sm whitespace-nowrap transition-colors hover:bg-chip-hover max-md:px-2.5 max-md:min-h-11 max-md:min-w-11" | ||
| @click="$emit('submitCommand', 'help')" | ||
| > | ||
| ❓ Help | ||
| ❓<span class="max-md:hidden"> Help</span> | ||
| </button> | ||
|
Comment on lines
96
to
130
|
||
| </div> | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,18 +33,31 @@ onUnmounted(() => { | |
| @click.self="$emit('dismiss')" | ||
| > | ||
| <div | ||
| class="bg-bg-card border border-border rounded-xl p-6 max-w-[480px] w-[90%] shadow-[0_12px_40px_rgba(0,0,0,0.5)]" | ||
| data-testid="quest-modal-card" | ||
| class="bg-bg-card border border-border rounded-xl p-4 md:p-6 max-w-[480px] w-[90%] max-h-[90vh] flex flex-col shadow-[0_12px_40px_rgba(0,0,0,0.5)]" | ||
| > | ||
| <div class="text-[1.1rem] font-bold text-quest mb-3">{{ title }}</div> | ||
| <!-- eslint-disable-next-line vue/no-v-html --> | ||
| <div class="leading-relaxed mb-4" v-html="body"></div> | ||
| <button | ||
| class="float-right px-6 py-2 rounded-md bg-accent text-white border-none cursor-pointer text-[0.9rem] hover:opacity-85" | ||
| @click="$emit('dismiss')" | ||
| > | ||
| Continue | ||
| </button> | ||
| <div class="clear-both"></div> | ||
| <div class="text-[1.1rem] font-bold text-quest mb-3 shrink-0"> | ||
| {{ title }} | ||
| </div> | ||
| <!-- eslint-disable vue/no-v-html --> | ||
| <div class="relative flex-1 min-h-0"> | ||
| <div | ||
| class="h-full overflow-y-auto leading-relaxed pr-1 touch-pan-y overscroll-contain" | ||
| v-html="body" | ||
| ></div> | ||
| <div | ||
| class="pointer-events-none absolute bottom-0 inset-x-0 h-6 bg-gradient-to-t from-bg-card to-transparent" | ||
| ></div> | ||
| </div> | ||
| <!-- eslint-enable vue/no-v-html --> | ||
| <div class="shrink-0 flex justify-end pt-2"> | ||
|
Comment on lines
+42
to
+53
|
||
| <button | ||
| class="px-6 py-2 rounded-md bg-accent text-white border-none cursor-pointer text-[0.9rem] hover:opacity-85" | ||
| @click="$emit('dismiss')" | ||
| > | ||
| Continue | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </template> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR title/description focus on the QuestModal overflow fix, but this diff also introduces fullscreen behavior (auto-enter on first interaction + toggle button), a PWA manifest/meta changes, global mobile font-size change, and an entity-menu ghost-click guard. Either update the PR description to cover these additional features/risks or split them into separate PRs so the quest modal fix can be reviewed/rolled back independently.