-
Notifications
You must be signed in to change notification settings - Fork 673
Load video trim node (Design Prototype) #13293
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
Closed
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
24b25b3
update
uytieu 2295d78
Removed loadVideoTrim.noVideo keys that were unused
uytieu 9a1e1d0
chore: remove unused i18n key and exported type
uytieu bffa754
set start and end frame button interaction and trim frame logic
uytieu 648e2f2
Probe MP4 frame rate and resource byte size
uytieu 41ae776
tooltip fix
uytieu a2fd9cc
added disabled state for set and and frame buttons
uytieu d50d219
Merge branch 'main' into load-video-trim-node
uytieu ca11b77
resolve code rabbit errors
uytieu 4cb82ed
Merge branch 'load-video-trim-node' of https://github.com/Comfy-Org/C…
uytieu 29da036
Merge branch 'main' into load-video-trim-node
uytieu f89ab3a
fix: align NodeId types after merge
uytieu 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,4 +96,7 @@ vitest.config.*.timestamp* | |
| # Weekly docs check output | ||
| /output.txt | ||
|
|
||
| .amp | ||
| .amp | ||
| .vercel | ||
| .env* | ||
| !.env_example | ||
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,16 @@ | ||
| <script setup lang="ts"> | ||
| import type { TooltipRootEmits, TooltipRootProps } from 'reka-ui' | ||
| import { TooltipRoot, useForwardPropsEmits } from 'reka-ui' | ||
|
|
||
| // eslint-disable-next-line vue/no-unused-properties -- forwarded to Reka via useForwardPropsEmits | ||
| const props = defineProps<TooltipRootProps>() | ||
| const emits = defineEmits<TooltipRootEmits>() | ||
|
|
||
| const forwarded = useForwardPropsEmits(props, emits) | ||
| </script> | ||
|
|
||
| <template> | ||
| <TooltipRoot v-bind="forwarded"> | ||
| <slot /> | ||
| </TooltipRoot> | ||
| </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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| <script setup lang="ts"> | ||
| import type { TooltipContentEmits, TooltipContentProps } from 'reka-ui' | ||
| import { | ||
| TooltipArrow, | ||
| TooltipContent, | ||
| TooltipPortal, | ||
| useForwardPropsEmits | ||
| } from 'reka-ui' | ||
| import type { HTMLAttributes } from 'vue' | ||
| import { computed } from 'vue' | ||
|
|
||
| import { cn } from '@comfyorg/tailwind-utils' | ||
|
|
||
| defineOptions({ | ||
| inheritAttrs: false | ||
| }) | ||
|
|
||
| const { | ||
| sideOffset = 4, | ||
| class: className, | ||
| arrowClass, | ||
| ...restProps | ||
| } = defineProps< | ||
| TooltipContentProps & { | ||
| class?: HTMLAttributes['class'] | ||
| arrowClass?: HTMLAttributes['class'] | ||
| } | ||
| >() | ||
| const emits = defineEmits<TooltipContentEmits>() | ||
|
|
||
| const delegatedProps = computed(() => ({ | ||
| sideOffset, | ||
| ...restProps | ||
| })) | ||
|
|
||
| const forwarded = useForwardPropsEmits(delegatedProps, emits) | ||
| </script> | ||
|
|
||
| <template> | ||
| <TooltipPortal> | ||
| <TooltipContent | ||
| v-bind="{ ...forwarded, ...$attrs }" | ||
| :class=" | ||
| cn( | ||
| 'z-50 w-fit rounded-md border bg-base-background px-3 py-1.5 text-sm text-base-foreground shadow-md', | ||
| 'animate-in fade-in-0 zoom-in-95', | ||
| 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', | ||
| 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2', | ||
| 'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', | ||
| className | ||
| ) | ||
| " | ||
| > | ||
| <slot /> | ||
| <TooltipArrow | ||
| :class="cn('fill-base-background', arrowClass)" | ||
| :width="10" | ||
| :height="5" | ||
| /> | ||
| </TooltipContent> | ||
| </TooltipPortal> | ||
| </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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| import type { Meta, StoryObj } from '@storybook/vue3-vite' | ||
|
|
||
| import TooltipHint from './TooltipHint.vue' | ||
| import Button from '@/components/ui/button/Button.vue' | ||
|
|
||
| const meta: Meta<typeof TooltipHint> = { | ||
| title: 'Components/Tooltip/TooltipHint', | ||
| component: TooltipHint, | ||
| tags: ['autodocs'], | ||
| args: { | ||
| content: 'Tooltip hint', | ||
| side: 'top', | ||
| delayDuration: 300, | ||
| disabled: false | ||
| } | ||
| } | ||
|
|
||
| export default meta | ||
| type Story = StoryObj<typeof meta> | ||
|
|
||
| export const Default: Story = { | ||
| render: (args) => ({ | ||
| components: { TooltipHint, Button }, | ||
| setup() { | ||
| return { args } | ||
| }, | ||
| template: ` | ||
| <div class="flex items-center justify-center p-16"> | ||
| <TooltipHint v-bind="args"> | ||
| <Button variant="secondary">Hover me</Button> | ||
| </TooltipHint> | ||
| </div> | ||
| ` | ||
| }) | ||
| } | ||
|
|
||
| export const Disabled: Story = { | ||
| args: { | ||
| disabled: true, | ||
| content: 'Hidden tooltip' | ||
| }, | ||
| render: Default.render | ||
| } | ||
|
|
||
| export const IconButton: Story = { | ||
| args: { | ||
| content: 'Set start frame' | ||
| }, | ||
| render: (args) => ({ | ||
| components: { TooltipHint }, | ||
| setup() { | ||
| return { args } | ||
| }, | ||
| template: ` | ||
| <div class="flex items-center justify-center p-16"> | ||
| <TooltipHint v-bind="args"> | ||
| <button | ||
| type="button" | ||
| class="flex size-8 cursor-pointer items-center justify-center rounded-lg bg-component-node-widget-background text-component-node-foreground" | ||
| aria-label="Set start frame" | ||
| > | ||
| <i class="icon-[lucide--skip-back] size-4" /> | ||
| </button> | ||
| </TooltipHint> | ||
| </div> | ||
| ` | ||
| }) | ||
| } |
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,45 @@ | ||
| <script setup lang="ts"> | ||
| import type { TooltipContentProps } from 'reka-ui' | ||
|
|
||
| import Tooltip from '@/components/ui/tooltip/Tooltip.vue' | ||
| import TooltipContent from '@/components/ui/tooltip/TooltipContent.vue' | ||
| import TooltipProvider from '@/components/ui/tooltip/TooltipProvider.vue' | ||
| import TooltipTrigger from '@/components/ui/tooltip/TooltipTrigger.vue' | ||
| import { cn } from '@comfyorg/tailwind-utils' | ||
|
|
||
| const { | ||
| content, | ||
| side = 'top', | ||
| sideOffset = 4, | ||
| delayDuration = 300, | ||
| disabled = false | ||
| } = defineProps<{ | ||
| content: string | ||
| side?: TooltipContentProps['side'] | ||
| sideOffset?: number | ||
| delayDuration?: number | ||
| disabled?: boolean | ||
| }>() | ||
| </script> | ||
|
|
||
| <template> | ||
| <TooltipProvider :delay-duration="delayDuration"> | ||
| <Tooltip :disabled="disabled"> | ||
| <TooltipTrigger as-child> | ||
| <slot /> | ||
| </TooltipTrigger> | ||
| <TooltipContent | ||
| :side | ||
| :side-offset="sideOffset" | ||
| :class=" | ||
| cn( | ||
| 'rounded-md border border-node-component-tooltip-border bg-node-component-tooltip-surface px-2.5 py-1 text-xs leading-none text-node-component-tooltip shadow-none' | ||
| ) | ||
| " | ||
| arrow-class="fill-node-component-tooltip-surface" | ||
| > | ||
| {{ content }} | ||
| </TooltipContent> | ||
| </Tooltip> | ||
| </TooltipProvider> | ||
| </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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <script setup lang="ts"> | ||
| import type { TooltipProviderProps } from 'reka-ui' | ||
| import { TooltipProvider } from 'reka-ui' | ||
|
|
||
| const { ...restProps } = defineProps<TooltipProviderProps>() | ||
| </script> | ||
|
|
||
| <template> | ||
| <TooltipProvider v-bind="restProps"> | ||
| <slot /> | ||
| </TooltipProvider> | ||
| </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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <script setup lang="ts"> | ||
| import type { TooltipTriggerProps } from 'reka-ui' | ||
| import { TooltipTrigger } from 'reka-ui' | ||
|
|
||
| const { ...restProps } = defineProps<TooltipTriggerProps>() | ||
| </script> | ||
|
|
||
| <template> | ||
| <TooltipTrigger v-bind="restProps"> | ||
| <slot /> | ||
| </TooltipTrigger> | ||
| </template> |
Oops, something went wrong.
Oops, something went wrong.
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.
📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
Consider explicitly tracking
.env.exampleif used as a template.The
.env*pattern also ignores.env.example. If your repository uses.env.exampleas a documented template for required environment variables, add an explicit exception:.env* +!.env.exampleThis is a common pattern to prevent accidental secret commits while keeping the template visible to developers.
📝 Committable suggestion
🤖 Prompt for AI Agents