-
Notifications
You must be signed in to change notification settings - Fork 650
Additional linear tweaks #8375
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
Additional linear tweaks #8375
Changes from 6 commits
44449f1
68a5b36
771a0dd
c845308
f284944
684c1a0
e72f136
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
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. This is pretty close to being a component... 😉
Collaborator
Author
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. For collapsible? I think too many of my styling tweaks are specific to this use case and still manage to leave some usability problems half solved. I'd rather return to this after I've had more time to think things over.
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. For a collapsible menu. I agree with your instincts. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,58 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <script setup lang="ts"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CollapsibleRoot, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CollapsibleTrigger, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CollapsibleContent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } from 'reka-ui' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import WorkflowsSidebarTab from '@/components/sidebar/tabs/WorkflowsSidebarTab.vue' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import Button from '@/components/ui/button/Button.vue' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import Popover from '@/components/ui/Popover.vue' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { useWorkflowTemplateSelectorDialog } from '@/composables/useWorkflowTemplateSelectorDialog' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { t } from '@/i18n' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { useCommandStore } from '@/stores/commandStore' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </script> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <template> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <CollapsibleRoot class="flex flex-col"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <CollapsibleTrigger as-child> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button variant="secondary" class="size-10 self-end m-4 mb-2"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <i class="icon-[lucide--menu] size-8" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+18
to
+20
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. Add an accessible label to the icon-only menu trigger. ✅ Suggested fix- <Button variant="secondary" class="size-10 self-end m-4 mb-2">
+ <Button
+ variant="secondary"
+ class="size-10 self-end m-4 mb-2"
+ :aria-label="t('linearMode.openMenu')"
+ >
<i class="icon-[lucide--menu] size-8" />
</Button>Based on learnings, “If a button has no visible label, provide a clear aria-label or associate with an aria-labelledby describing its action.” 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </CollapsibleTrigger> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <CollapsibleContent class="flex gap-2 flex-col"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div class="w-full border-b-2 border-border-subtle" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Popover> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <template #button> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button variant="secondary" size="lg" class="w-full"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <i class="icon-[comfy--workflow]" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{ t('Workflows') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </template> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <WorkflowsSidebarTab class="h-300 w-[80vw]" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </Popover> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variant="secondary" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| size="lg" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| class="w-full" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @click="useWorkflowTemplateSelectorDialog().show('menu')" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <i class="icon-[comfy--template]" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{ t('sideToolbar.templates') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variant="secondary" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| size="lg" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| class="w-full" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @click=" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| useCommandStore().execute('Comfy.ToggleLinear', { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| metadata: { source: 'button' } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+33
to
+49
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. 🧹 Nitpick | 🔵 Trivial Hoist composables/stores out of the template handlers. ♻️ Suggested refactor<script setup lang="ts">
import { useWorkflowTemplateSelectorDialog } from '@/composables/useWorkflowTemplateSelectorDialog'
import { t } from '@/i18n'
import { useCommandStore } from '@/stores/commandStore'
+const workflowTemplateSelectorDialog = useWorkflowTemplateSelectorDialog()
+const commandStore = useCommandStore()
</script>- `@click`="useWorkflowTemplateSelectorDialog().show('menu')"
+ `@click`="workflowTemplateSelectorDialog.show('menu')"- `@click`="
- useCommandStore().execute('Comfy.ToggleLinear', {
- metadata: { source: 'button' }
- })
- "
+ `@click`="
+ commandStore.execute('Comfy.ToggleLinear', {
+ metadata: { source: 'button' }
+ })
+ "📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <i class="icon-[lucide--log-out]" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{ t('linearMode.graphMode') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div class="w-full border-b-2 border-border-subtle" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </CollapsibleContent> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </CollapsibleRoot> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </template> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ import Splitter from 'primevue/splitter' | |
| import SplitterPanel from 'primevue/splitterpanel' | ||
| import { ref, useTemplateRef } from 'vue' | ||
|
|
||
| import ModeToggle from '@/components/sidebar/ModeToggle.vue' | ||
| import TopbarBadges from '@/components/topbar/TopbarBadges.vue' | ||
| import WorkflowTabs from '@/components/topbar/WorkflowTabs.vue' | ||
| import TypeformPopoverButton from '@/components/ui/TypeformPopoverButton.vue' | ||
|
|
@@ -17,6 +18,7 @@ import type { AssetItem } from '@/platform/assets/schemas/assetSchema' | |
| import { useSettingStore } from '@/platform/settings/settingStore' | ||
| import LinearControls from '@/renderer/extensions/linearMode/LinearControls.vue' | ||
| import LinearPreview from '@/renderer/extensions/linearMode/LinearPreview.vue' | ||
| import MobileMenu from '@/renderer/extensions/linearMode/MobileMenu.vue' | ||
| import OutputHistory from '@/renderer/extensions/linearMode/OutputHistory.vue' | ||
| import { useNodeOutputStore } from '@/stores/imagePreviewStore' | ||
| import type { ResultItemImpl } from '@/stores/queueStore' | ||
|
|
@@ -58,6 +60,7 @@ const linearWorkflowRef = useTemplateRef('linearWorkflowRef') | |
| v-if="mobileDisplay" | ||
| class="justify-center border-border-subtle border-t overflow-y-scroll h-[calc(100%-38px)] bg-comfy-menu-bg" | ||
| > | ||
| <MobileMenu /> | ||
| <div class="flex flex-col text-muted-foreground"> | ||
| <LinearPreview | ||
| :latent-preview=" | ||
|
|
@@ -84,12 +87,13 @@ const linearWorkflowRef = useTemplateRef('linearWorkflowRef') | |
| " | ||
| /> | ||
| <LinearControls ref="linearWorkflowRef" mobile /> | ||
| <div class="text-base-foreground flex items-center gap-4 justify-end m-4"> | ||
| <a | ||
| href="https://form.typeform.com/to/gmVqFi8l" | ||
| v-text="t('linearMode.beta')" | ||
| /> | ||
| <TypeformPopoverButton data-tf-widget="gmVqFi8l" /> | ||
| <div class="text-base-foreground flex items-center gap-4"> | ||
| <div class="border-r border-border-subtle"> | ||
| <ModeToggle class="m-2" /> | ||
| </div> | ||
| <div class="flex-1" /> | ||
|
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. Alternative:
Collaborator
Author
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. Agreed (and neat) |
||
| <div v-text="t('linearMode.beta')" /> | ||
| <TypeformPopoverButton data-tf-widget="gmVqFi8l" class="mx-2" /> | ||
| </div> | ||
| </div> | ||
| <Splitter | ||
|
|
||
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.
Option: You could do
as='a'to render the button as an anchor. It'd accept the anchor properties too.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.
Much better. Thanks.