Skip to content
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

[chore] Update primevue to 4.2.5 #2304

Merged
merged 6 commits into from
Jan 20, 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
12 changes: 8 additions & 4 deletions browser_tests/nodeSearchBox.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,14 @@ test.describe('Node search box', () => {
test('Has correct aria-labels on search results', async ({ comfyPage }) => {
const node = 'Load Checkpoint'
await comfyPage.doubleClickCanvas()
await comfyPage.searchBox.fillAndSelectFirstNode(node)
Copy link
Member Author

Choose a reason for hiding this comment

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

fillAndSelectFirstNode do the click in the first dropdown item, which will cause the searchbox to be dismissed. This will cause issue for the subsequent check of dropdown element, so change to inline those selection logic.

const firstResult = comfyPage.page
.locator('li.p-autocomplete-option')
.first()
await comfyPage.searchBox.input.waitFor({ state: 'visible' })
await comfyPage.searchBox.input.fill(node)
await comfyPage.searchBox.dropdown.waitFor({ state: 'visible' })
// Wait for some time for the auto complete list to update.
// The auto complete list is debounced and may take some time to update.
await comfyPage.page.waitForTimeout(500)

const firstResult = comfyPage.searchBox.dropdown.locator('li').first()
await expect(firstResult).toHaveAttribute('aria-label', node)
})

Expand Down
62 changes: 31 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
"@comfyorg/comfyui-electron-types": "^0.4.11",
"@comfyorg/litegraph": "^0.8.61",
"@primevue/themes": "^4.0.5",
"@primevue/themes": "^4.2.5",
"@sentry/vue": "^8.48.0",
"@tiptap/core": "^2.10.4",
"@tiptap/extension-link": "^2.10.4",
Expand All @@ -105,7 +105,7 @@
"loglevel": "^1.9.2",
"pinia": "^2.1.7",
"primeicons": "^7.0.0",
"primevue": "^4.0.5",
"primevue": "^4.2.5",
"three": "^0.170.0",
"tiptap-markdown": "^0.8.10",
"vue": "^3.4.31",
Expand Down
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import GlobalDialog from '@/components/dialog/GlobalDialog.vue'
import config from '@/config'
import { useWorkspaceStore } from '@/stores/workspaceStore'

import { isElectron, showNativeMenu } from './utils/envUtil'
import { electronAPI, isElectron } from './utils/envUtil'

const workspaceStore = useWorkspaceStore()
const isLoading = computed<boolean>(() => workspaceStore.spinner)
Expand All @@ -34,7 +34,7 @@ const showContextMenu = (event: PointerEvent) => {
case target instanceof HTMLTextAreaElement:
case target instanceof HTMLInputElement && target.type === 'text':
// TODO: Context input menu explicitly for text input
showNativeMenu({ type: 'text' })
electronAPI()?.showContextMenu({ type: 'text' })
return
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/actionbar/ComfyQueueButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</template>
<template #item="{ item }">
<Button
:label="item.label"
:label="String(item.label)"
:icon="item.icon"
:severity="item.key === queueMode ? 'primary' : 'secondary'"
size="small"
Expand Down
10 changes: 5 additions & 5 deletions src/components/common/ElectronFileDownload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
:label="$t('g.download') + ' (' + fileSize + ')'"
size="small"
outlined
:disabled="props.error"
:disabled="!!props.error"
@click="triggerDownload"
v-if="status === null || status === 'error'"
icon="pi pi-download"
Expand All @@ -30,7 +30,7 @@
v-if="status === 'in_progress' || status === 'paused'"
>
<!-- Temporary fix for issue when % only comes into view only if the progress bar is large enough
https://comfy-organization.slack.com/archives/C07H3GLKDPF/p1731551013385499
https://comfy-organization.slack.com/archives/C07H3GLKDPF/p1731551013385499
-->
<ProgressBar
class="flex-1"
Expand All @@ -42,7 +42,7 @@
class="file-action-button"
size="small"
outlined
:disabled="props.error"
:disabled="!!props.error"
@click="triggerPauseDownload"
v-if="status === 'in_progress'"
icon="pi pi-pause-circle"
Expand All @@ -53,7 +53,7 @@
class="file-action-button"
size="small"
outlined
:disabled="props.error"
:disabled="!!props.error"
@click="triggerResumeDownload"
v-if="status === 'paused'"
icon="pi pi-play-circle"
Expand All @@ -64,7 +64,7 @@
class="file-action-button"
size="small"
outlined
:disabled="props.error"
:disabled="!!props.error"
@click="triggerCancelDownload"
icon="pi pi-times-circle"
severity="danger"
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/FileDownload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:label="$t('g.download') + ' (' + fileSize + ')'"
size="small"
outlined
:disabled="props.error"
:disabled="!!props.error"
:title="props.url"
@click="download.triggerBrowserDownload"
/>
Expand Down
22 changes: 2 additions & 20 deletions src/components/common/FormColorPicker.vue
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
<template>
<div class="color-picker-wrapper flex items-center gap-2">
<ColorPicker v-model="modelValue">
Copy link
Member Author

Choose a reason for hiding this comment

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

Remove incorrectly generated code. ColorPicker does not have a header slot.

<template #header>
<div class="flex items-center justify-between p-2">
<span>{{ props.label }}</span>
<Button
v-if="props.defaultValue"
icon="pi pi-refresh"
text
size="small"
@click="resetColor"
/>
</div>
</template>
</ColorPicker>
<ColorPicker v-model="modelValue" />
<InputText v-model="modelValue" class="w-28" :placeholder="label" />
</div>
</template>

<script setup lang="ts">
import Button from 'primevue/button'
import ColorPicker from 'primevue/colorpicker'
import InputText from 'primevue/inputtext'

const modelValue = defineModel<string>('modelValue')
const props = defineProps<{
defineProps<{
defaultValue?: string
label?: string
}>()

const resetColor = () => {
modelValue.value = props.defaultValue || '#000000'
}
</script>
66 changes: 0 additions & 66 deletions src/components/common/LogTerminal.vue

This file was deleted.

1 change: 1 addition & 0 deletions src/components/common/SystemStatsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
v-for="device in props.stats.devices"
:key="device.index"
:header="device.name"
:value="device.index"
>
<DeviceInfo :device="device" />
</TabPanel>
Expand Down
10 changes: 6 additions & 4 deletions src/components/common/TreeExplorer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
selectionMode="single"
:pt="{
nodeLabel: 'tree-explorer-node-label',
nodeContent: ({ props }) => ({
onClick: (e: MouseEvent) => onNodeContentClick(e, props.node),
onContextmenu: (e: MouseEvent) => handleContextMenu(props.node, e)
nodeContent: ({ context }) => ({
onClick: (e: MouseEvent) =>
onNodeContentClick(e, context.node as RenderedTreeExplorerNode),
onContextmenu: (e: MouseEvent) =>
handleContextMenu(e, context.node as RenderedTreeExplorerNode)
}),
nodeToggleButton: () => ({
onClick: (e: MouseEvent) => {
Expand Down Expand Up @@ -152,7 +154,7 @@ const menuItems = computed<MenuItem[]>(() =>
}))
)

const handleContextMenu = (node: RenderedTreeExplorerNode, e: MouseEvent) => {
const handleContextMenu = (e: MouseEvent, node: RenderedTreeExplorerNode) => {
menuTargetNode.value = node
emit('contextMenu', node, e)
if (menuItems.value.filter((item) => item.visible).length > 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/install/DesktopSettingsConfiguration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ import ToggleSwitch from 'primevue/toggleswitch'
import { ref } from 'vue'

const showDialog = ref(false)
const autoUpdate = defineModel('autoUpdate', { required: true })
const allowMetrics = defineModel('allowMetrics', { required: true })
const autoUpdate = defineModel<boolean>('autoUpdate', { required: true })
const allowMetrics = defineModel<boolean>('allowMetrics', { required: true })

const showMetricsInfo = () => {
showDialog.value = true
Expand Down
Loading
Loading