Disable control widgets on link to parent (#8112)

When a link is made to a widget with control (like seed) , the control
widget can no longer be used to update it's state. To better communicate
this, the control widgets are now given the disabled property when their
parent widget is linked.

| Before | After |
| ------ | ----- |
| <img width="360" alt="before"
src="https://github.com/user-attachments/assets/9b6c6c02-2481-486a-bb07-c19d00abe36d"
/> | <img width="360" alt="after"
src="https://github.com/user-attachments/assets/837000ac-8a12-4d51-879b-a58e0577ff10"
/>|

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8112-Disable-control-widgets-on-link-to-parent-2ea6d73d365081afad77db6c5f56e085)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
AustinMroz
2026-01-16 21:11:00 -08:00
committed by github-actions[bot]
parent 4bf6a19600
commit 91a1071583
3 changed files with 6 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -139,6 +139,9 @@ export function addValueControlWidgets(
'Allows the linked widget to be changed automatically, for example randomizing the noise seed.'
valueControl[IS_CONTROL_WIDGET] = true
updateControlWidgetLabel(valueControl)
Object.defineProperty(valueControl, 'disabled', {
get: () => targetWidget.computedDisabled
})
const widgets: [IComboWidget, ...IStringWidget[]] = [valueControl]
const isCombo = isComboWidget(targetWidget)
@@ -160,6 +163,9 @@ export function addValueControlWidgets(
updateControlWidgetLabel(comboFilter)
comboFilter.tooltip =
"Allows for filtering the list of values when changing the value via the control generate mode. Allows for RegEx matches in the format /abc/ to only filter to values containing 'abc'."
Object.defineProperty(comboFilter, 'disabled', {
get: () => targetWidget.computedDisabled
})
widgets.push(comboFilter)
}