Compare commits

...

6 Commits

Author SHA1 Message Date
Benjamin Lu
0bff8eaf99 typo 2025-04-16 15:42:09 -04:00
Benjamin Lu
bbf369c25b Revert extraneous eslint/tsconfig changes 2025-04-16 15:41:27 -04:00
Benjamin Lu
2063b39346 Add mobile viewport playwright test 2025-04-16 09:33:26 -04:00
Benjamin Lu
30f2fb0e7c Merge branch 'main' of https://github.com/Comfy-Org/ComfyUI_frontend into mobile-dvh 2025-04-16 09:09:40 -04:00
Benjamin Lu
bdcb8b1137 svh to dvh 2025-04-13 15:04:00 -04:00
Benjamin Lu
28ab12e666 Selective 100vh to 100svh replacement 2025-04-13 14:32:07 -04:00
5 changed files with 39 additions and 4 deletions

View File

@@ -0,0 +1,35 @@
import { expect } from '@playwright/test'
import { comfyPageFixture as test } from '../fixtures/ComfyPage'
test.describe('Mobile viewport', () => {
test.beforeEach(async ({ comfyPage }) => {
await comfyPage.setSetting('Comfy.UseNewMenu', 'Top')
})
test('@mobile App UI is not hidden under mobile browser UI', async ({
comfyPage
}) => {
const viewportSize = await comfyPage.page.viewportSize()
// Top menu is visible
const topMenu = comfyPage.page.locator('.comfyui-menu')
await expect(topMenu).toBeVisible()
// Top menu is not cut off from the top
const topMenuBox = await topMenu.boundingBox()
expect(topMenuBox?.y).toBeGreaterThanOrEqual(0)
// Graph is visible
const graphView = comfyPage.page.locator('.lgraphcanvas')
await expect(graphView).toBeVisible()
// Graph is not cut off from the bottom
const graphViewBox = await graphView.boundingBox()
expect(graphViewBox).not.toBeNull()
expect(viewportSize).not.toBeNull()
expect(graphViewBox!.y + graphViewBox!.height).toBeLessThanOrEqual(
viewportSize!.height
)
})
})

View File

@@ -2,7 +2,7 @@
<router-view />
<ProgressSpinner
v-if="isLoading"
class="absolute inset-0 flex justify-center items-center h-screen"
class="absolute inset-0 flex justify-center items-center h-dvh"
/>
<GlobalDialog />
<BlockUI full-screen :blocked="isLoading" />

View File

@@ -42,7 +42,7 @@
body {
width: 100vw;
height: 100vh;
height: 100dvh;
margin: 0;
overflow: hidden;
background: var(--bg-color) var(--bg-img);

View File

@@ -1,5 +1,5 @@
<template>
<div class="comfyui-body grid h-screen w-screen overflow-hidden">
<div class="comfyui-body grid h-dvh w-screen overflow-hidden">
<div id="comfyui-body-top" class="comfyui-body-top">
<TopMenubar v-if="useNewMenu === 'Top'" />
</div>

View File

@@ -1,5 +1,5 @@
<template>
<main class="w-full min-h-screen overflow-hidden relative">
<main class="w-full min-h-dvh overflow-hidden relative">
<router-view />
</main>
</template>