-
Notifications
You must be signed in to change notification settings - Fork 420
feat: right side panel #6952
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
Open
LittleSound
wants to merge
21
commits into
main
Choose a base branch
from
rizumu/feat/right-side-panel
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: right side panel #6952
Changes from 11 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
9056052
wip: right side panel
LittleSound 2f2f65a
feat: outer layout
LittleSound cd3e809
feat: switch tabs
LittleSound c1bbb7b
feat: collapsible section
LittleSound fd6defc
feat: parameters + search + subgraph editor tab + multiple choice + i…
LittleSound 1677667
feat: appearance
LittleSound 7e9ece2
feat: search enhancement
LittleSound ff1b9ad
feat: widget field layout
LittleSound 2c33757
feat: info tab
LittleSound 464c9b2
feat: subgraph editor
LittleSound 828c836
Merge branch 'main' into rizumu/feat/right-side-panel
LittleSound d47af09
fix: update placeholder text in SidePanelSearch component to use tran…
LittleSound 56f8f29
fix: underline
LittleSound 8370166
fix: tab settings
LittleSound f2fcdd5
fix: widget item layout
LittleSound e10a0b9
fix: font size 12px to 14px on top tablist
LittleSound 0159622
fix: node state select button
LittleSound 4be493c
fix: color select
LittleSound aa429ee
fix: subgraph button + chevron style + splitter style
LittleSound 3774b6c
chore: clean subgraph code
LittleSound d7fa9a9
chore: rename components
LittleSound 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,230 @@ | ||
| <template> | ||
| <div class="node-help-content mx-auto w-full"> | ||
| <ProgressSpinner | ||
| v-if="isLoading" | ||
| class="m-auto" | ||
| :aria-label="$t('g.loading')" | ||
| /> | ||
| <!-- Markdown fetched successfully --> | ||
| <div | ||
| v-else-if="!error" | ||
| class="markdown-content" | ||
| v-html="renderedHelpHtml" | ||
| /> | ||
| <!-- Fallback: markdown not found or fetch error --> | ||
| <div v-else class="fallback-content space-y-6 text-sm"> | ||
| <p v-if="node.description"> | ||
| <strong>{{ $t('g.description') }}:</strong> {{ node.description }} | ||
| </p> | ||
|
|
||
| <div v-if="inputList.length"> | ||
| <p> | ||
| <strong>{{ $t('nodeHelpPage.inputs') }}:</strong> | ||
| </p> | ||
| <!-- Using plain HTML table instead of DataTable for consistent styling with markdown content --> | ||
| <table class="overflow-x-auto"> | ||
| <thead> | ||
| <tr> | ||
| <th>{{ $t('g.name') }}</th> | ||
| <th>{{ $t('nodeHelpPage.type') }}</th> | ||
| <th>{{ $t('g.description') }}</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr v-for="input in inputList" :key="input.name"> | ||
| <td> | ||
| <code>{{ input.name }}</code> | ||
| </td> | ||
| <td>{{ input.type }}</td> | ||
| <td>{{ input.tooltip || '-' }}</td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
|
|
||
| <div v-if="outputList.length"> | ||
| <p> | ||
| <strong>{{ $t('nodeHelpPage.outputs') }}:</strong> | ||
| </p> | ||
| <table class="overflow-x-auto"> | ||
| <thead> | ||
| <tr> | ||
| <th>{{ $t('g.name') }}</th> | ||
| <th>{{ $t('nodeHelpPage.type') }}</th> | ||
| <th>{{ $t('g.description') }}</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr v-for="output in outputList" :key="output.name"> | ||
| <td> | ||
| <code>{{ output.name }}</code> | ||
| </td> | ||
| <td>{{ output.type }}</td> | ||
| <td>{{ output.tooltip || '-' }}</td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { storeToRefs } from 'pinia' | ||
| import ProgressSpinner from 'primevue/progressspinner' | ||
| import { computed } from 'vue' | ||
|
|
||
| import type { ComfyNodeDefImpl } from '@/stores/nodeDefStore' | ||
| import { useNodeHelpStore } from '@/stores/workspace/nodeHelpStore' | ||
|
|
||
| const { node } = defineProps<{ node: ComfyNodeDefImpl }>() | ||
|
|
||
| const nodeHelpStore = useNodeHelpStore() | ||
| const { renderedHelpHtml, isLoading, error } = storeToRefs(nodeHelpStore) | ||
|
|
||
| const inputList = computed(() => | ||
| Object.values(node.inputs).map((spec) => ({ | ||
| name: spec.name, | ||
| type: spec.type, | ||
| tooltip: spec.tooltip || '' | ||
| })) | ||
| ) | ||
|
|
||
| const outputList = computed(() => | ||
| node.outputs.map((spec) => ({ | ||
| name: spec.name, | ||
| type: spec.type, | ||
| tooltip: spec.tooltip || '' | ||
| })) | ||
| ) | ||
| </script> | ||
|
|
||
| <style scoped> | ||
| @reference './../../assets/css/style.css'; | ||
|
|
||
| .node-help-content :deep(:is(img, video)) { | ||
| @apply max-w-full h-auto block mb-4; | ||
| } | ||
|
|
||
| .markdown-content, | ||
| .fallback-content { | ||
| @apply text-sm overflow-visible; | ||
| } | ||
|
|
||
| .markdown-content :deep(h1), | ||
| .fallback-content h1 { | ||
| @apply text-[22px] font-bold mt-8 mb-4 first:mt-0; | ||
| } | ||
|
|
||
| .markdown-content :deep(h2), | ||
| .fallback-content h2 { | ||
| @apply text-[18px] font-bold mt-8 mb-4 first:mt-0; | ||
| } | ||
|
|
||
| .markdown-content :deep(h3), | ||
| .fallback-content h3 { | ||
| @apply text-[16px] font-bold mt-8 mb-4 first:mt-0; | ||
| } | ||
|
|
||
| .markdown-content :deep(h4), | ||
| .markdown-content :deep(h5), | ||
| .markdown-content :deep(h6), | ||
| .fallback-content h4, | ||
| .fallback-content h5, | ||
| .fallback-content h6 { | ||
| @apply mt-8 mb-4 first:mt-0; | ||
| } | ||
|
|
||
| .markdown-content :deep(td), | ||
| .fallback-content td { | ||
| color: var(--drag-text); | ||
| } | ||
|
|
||
| .markdown-content :deep(a), | ||
| .fallback-content a { | ||
| color: var(--drag-text); | ||
| text-decoration: underline; | ||
| } | ||
|
|
||
| .markdown-content :deep(th), | ||
| .fallback-content th { | ||
| color: var(--fg-color); | ||
| } | ||
|
|
||
| .markdown-content :deep(ul), | ||
| .markdown-content :deep(ol), | ||
| .fallback-content ul, | ||
| .fallback-content ol { | ||
| @apply pl-8 my-2; | ||
| } | ||
|
|
||
| .markdown-content :deep(ul ul), | ||
| .markdown-content :deep(ol ol), | ||
| .markdown-content :deep(ul ol), | ||
| .markdown-content :deep(ol ul), | ||
| .fallback-content ul ul, | ||
| .fallback-content ol ol, | ||
| .fallback-content ul ol, | ||
| .fallback-content ol ul { | ||
| @apply pl-6 my-2; | ||
| } | ||
|
|
||
| .markdown-content :deep(li), | ||
| .fallback-content li { | ||
| @apply my-2; | ||
| } | ||
|
|
||
| .markdown-content :deep(*:first-child), | ||
| .fallback-content > *:first-child { | ||
| @apply mt-0; | ||
| } | ||
|
|
||
| .markdown-content :deep(code), | ||
| .fallback-content code { | ||
| color: var(--code-text-color); | ||
| background-color: var(--code-bg-color); | ||
| @apply rounded px-1.5 py-0.5; | ||
| } | ||
|
|
||
| .markdown-content :deep(table), | ||
| .fallback-content table { | ||
| @apply w-full border-collapse; | ||
| } | ||
|
|
||
| .markdown-content :deep(th), | ||
| .markdown-content :deep(td), | ||
| .fallback-content th, | ||
| .fallback-content td { | ||
| @apply px-2 py-2; | ||
| } | ||
|
|
||
| .markdown-content :deep(tr), | ||
| .fallback-content tr { | ||
| border-bottom: 1px solid var(--content-bg); | ||
| } | ||
|
|
||
| .markdown-content :deep(tr:last-child), | ||
| .fallback-content tr:last-child { | ||
| border-bottom: none; | ||
| } | ||
|
|
||
| .markdown-content :deep(thead), | ||
| .fallback-content thead { | ||
| border-bottom: 1px solid var(--p-text-color); | ||
| } | ||
|
|
||
| .markdown-content :deep(pre), | ||
| .fallback-content pre { | ||
| @apply rounded p-4 my-4 overflow-x-auto; | ||
| background-color: var(--code-block-bg-color); | ||
|
|
||
| code { | ||
| @apply bg-transparent p-0; | ||
| color: var(--p-text-color); | ||
| } | ||
| } | ||
|
|
||
| .markdown-content :deep(table) { | ||
| @apply overflow-x-auto; | ||
| } | ||
| </style> |
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.
Remove
aria-pressedor keep button always visible for consistency.The button is only rendered when the panel is closed (
v-if="!isRightSidePanelOpen"), which meansaria-pressedwill always befalsewhen the button is visible. This doesn't follow accessibility best practices for toggle buttons.Consider one of these approaches:
aria-pressedattribute since the button's visibility already indicates statearia-pressedbetween true/falseApply this diff to remove the unnecessary
aria-pressedattribute:<IconButton v-if="!isRightSidePanelOpen" v-tooltip.bottom="rightSidePanelTooltipConfig" type="transparent" size="sm" class="mr-2 transition-colors duration-200 ease-in-out hover:bg-secondary-background-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-background" - :aria-pressed="isRightSidePanelOpen" :aria-label="t('rightSidePanel.togglePanel')" @click="toggleRightSidePanel" >📝 Committable suggestion
🤖 Prompt for AI Agents