-
Notifications
You must be signed in to change notification settings - Fork 535
Linear mode bug fixes #8054
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
Merged
Merged
Linear mode bug fixes #8054
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cde5266
Replace remaining "linear" instances with "simple"
AustinMroz 4737aee
Hide topbar feedback label on mobile
AustinMroz f747c04
Fix notes z-index, allow global output scroll
AustinMroz 11b1e34
Add node error indicators to linear mode
AustinMroz 9223332
Make feedback description link when on mobile
AustinMroz 5e317a9
Make notes in notes popover readonly
AustinMroz 9269c58
Reowkr 3d Preview
AustinMroz 47570cb
Fix clickign of non image outputs
AustinMroz 47311a2
Re-add click on drop zone to upload
AustinMroz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -23,6 +23,7 @@ import { useCommandStore } from '@/stores/commandStore' | |||||
| import { useExecutionStore } from '@/stores/executionStore' | ||||||
| import { useQueueSettingsStore } from '@/stores/queueStore' | ||||||
| import type { SimplifiedWidget } from '@/types/simplifiedWidget' | ||||||
| import { cn } from '@/utils/tailwindUtil' | ||||||
|
|
||||||
| const commandStore = useCommandStore() | ||||||
| const executionStore = useExecutionStore() | ||||||
|
|
@@ -55,27 +56,35 @@ function nodeToNodeData(node: LGraphNode) { | |||||
| ? undefined | ||||||
| : { | ||||||
| iconClass: 'icon-[lucide--image]', | ||||||
| label: t('linearMode.dragAndDropImage') | ||||||
| label: t('linearMode.dragAndDropImage'), | ||||||
| onClick: () => node.widgets?.[1]?.callback?.(undefined) | ||||||
| } | ||||||
| const nodeData = extractVueNodeData(node) | ||||||
| for (const widget of nodeData.widgets ?? []) widget.slotMetadata = undefined | ||||||
|
|
||||||
| return { | ||||||
| ...nodeData, | ||||||
| //note lastNodeErrors uses exeuctionid, node.id is execution for root | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| hasErrors: !!executionStore.lastNodeErrors?.[node.id], | ||||||
|
|
||||||
| dropIndicator, | ||||||
| onDragDrop: node.onDragDrop, | ||||||
| onDragOver: node.onDragOver | ||||||
| } | ||||||
| } | ||||||
| const partitionedNodes = computed(() => { | ||||||
| return partition( | ||||||
| const parts = partition( | ||||||
| graphNodes.value | ||||||
| .filter((node) => node.mode === 0 && node.widgets?.length) | ||||||
| .map(nodeToNodeData) | ||||||
| .reverse(), | ||||||
| (node) => ['MarkdownNote', 'Note'].includes(node.type) | ||||||
| ) | ||||||
| for (const noteNode of parts[0]) { | ||||||
| for (const widget of noteNode.widgets ?? []) | ||||||
| widget.options = { ...widget.options, read_only: true } | ||||||
| } | ||||||
| return parts | ||||||
| }) | ||||||
|
|
||||||
| const batchCountWidget: SimplifiedWidget<number> = { | ||||||
|
|
@@ -165,7 +174,7 @@ defineExpose({ runButtonClick }) | |||||
| <Popover | ||||||
| v-if="partitionedNodes[0].length" | ||||||
| align="start" | ||||||
| class="overflow-y-auto overflow-x-clip max-h-(--reka-popover-content-available-height)" | ||||||
| class="overflow-y-auto overflow-x-clip max-h-(--reka-popover-content-available-height) z-100" | ||||||
| :reference="notesTo" | ||||||
| side="left" | ||||||
| :to="notesTo" | ||||||
|
|
@@ -217,7 +226,13 @@ defineExpose({ runButtonClick }) | |||||
| > | ||||||
| <NodeWidgets | ||||||
| :node-data | ||||||
| class="py-3 gap-y-4 **:[.col-span-2]:grid-cols-1 text-sm **:[.p-floatlabel]:h-35 rounded-lg" | ||||||
| :class=" | ||||||
| cn( | ||||||
| 'py-3 gap-y-3 **:[.col-span-2]:grid-cols-1 not-has-[textarea]:flex-0 rounded-lg', | ||||||
| nodeData.hasErrors && | ||||||
| 'ring-2 ring-inset ring-node-stroke-error' | ||||||
| ) | ||||||
| " | ||||||
| :style="{ background: applyLightThemeColor(nodeData.bgcolor) }" | ||||||
| /> | ||||||
| </DropZone> | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| <script setup lang="ts"> | ||
| import { useTemplateRef, watch } from 'vue' | ||
|
|
||
| import AnimationControls from '@/components/load3d/controls/AnimationControls.vue' | ||
| import { useLoad3dViewer } from '@/composables/useLoad3dViewer' | ||
|
|
||
| const { modelUrl } = defineProps<{ | ||
| modelUrl: string | ||
| }>() | ||
|
|
||
| const containerRef = useTemplateRef('containerRef') | ||
|
|
||
| const viewer = useLoad3dViewer() | ||
|
|
||
| watch([containerRef, () => modelUrl], async () => { | ||
| if (!containerRef.value || !modelUrl) return | ||
|
|
||
| await viewer.initializeStandaloneViewer(containerRef.value, modelUrl) | ||
| }) | ||
|
|
||
| //TODO: refactor to add control buttons | ||
| </script> | ||
| <template> | ||
| <div | ||
| ref="containerRef" | ||
| class="relative w-full h-full" | ||
| @mouseenter="viewer.handleMouseEnter" | ||
| @mouseleave="viewer.handleMouseLeave" | ||
| @resize="viewer.handleResize" | ||
| > | ||
| <div class="pointer-events-none absolute top-0 left-0 size-full"> | ||
| <AnimationControls | ||
| v-if="viewer.animations.value && viewer.animations.value.length > 0" | ||
| v-model:animations="viewer.animations.value" | ||
| v-model:playing="viewer.playing.value" | ||
| v-model:selected-speed="viewer.selectedSpeed.value" | ||
| v-model:selected-animation="viewer.selectedAnimation.value" | ||
| v-model:animation-progress="viewer.animationProgress.value" | ||
| v-model:animation-duration="viewer.animationDuration.value" | ||
| @seek="viewer.handleSeek" | ||
| /> | ||
| </div> | ||
| </div> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nit: Does this go through i18n?
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.
As best I can tell the label is only used in automation scripts to generate entries in locales/en/commands.json (which is keyed by id) and are never used afterwards.