Cleanup: Properties Panel (#7137)

## Summary

- Code cleanup
- Copy, padding, color, alignment of components
- Subgraph Edit mode changes
- Partial fix for the Node Info location (need to do context menu still)
- Editing node title

### Still to-do

- Bi-directionality in values

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7137-WIP-Cleanup-Properties-Panel-2be6d73d3650813e9430f6bcb09dfb4d)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Alexander Brown
2025-12-05 21:33:52 -08:00
committed by GitHub
parent cde49d5b64
commit f74c176423
45 changed files with 419 additions and 386 deletions

View File

@@ -83,6 +83,7 @@ import WidgetDOM from '@/renderer/extensions/vueNodes/widgets/components/WidgetD
import WidgetLegacy from '@/renderer/extensions/vueNodes/widgets/components/WidgetLegacy.vue'
import {
getComponent,
shouldExpand,
shouldRenderAsVue
} from '@/renderer/extensions/vueNodes/widgets/registry/widgetRegistry'
import type { SimplifiedWidget, WidgetValue } from '@/types/simplifiedWidget'
@@ -192,28 +193,11 @@ const processedWidgets = computed((): ProcessedWidget[] => {
return result
})
// TODO: Derive from types in widgetRegistry
const EXPANDING_TYPES = [
'textarea',
'TEXTAREA',
'multiline',
'customtext',
'markdown',
'MARKDOWN',
'progressText',
'load3D',
'LOAD_3D'
] as const
const gridTemplateRows = computed((): string => {
const widgets = toValue(processedWidgets)
return widgets
.filter((w) => !w.simplified.options?.hidden)
.map((w) =>
EXPANDING_TYPES.includes(w.type as (typeof EXPANDING_TYPES)[number])
? 'auto'
: 'min-content'
)
.map((w) => (shouldExpand(w.type) ? 'auto' : 'min-content'))
.join(' ')
})
</script>

View File

@@ -197,3 +197,12 @@ export const isEssential = (type: string): boolean => {
export const shouldRenderAsVue = (widget: Partial<SafeWidgetData>): boolean => {
return !widget.options?.canvasOnly && !!widget.type
}
const EXPANDING_TYPES = ['textarea', 'markdown', 'load3D'] as const
export function shouldExpand(type: string): boolean {
const canonicalType = getCanonicalType(type)
return EXPANDING_TYPES.includes(
canonicalType as (typeof EXPANDING_TYPES)[number]
)
}