Unable to distribute expanded or conditional material to component type

Description

To conditionally disable components via distributions for the UIOptions demo, I attempted a few schemes, such as

fluid.defaults("fluid.prefs.panelHolder.selfVoicingIfAvailable", { distributeOptions: { selfVoicingIfAvailable: { target: "{that selfVoicing}.type", record: "@expand:fluid.prefs.selfVoicingIfAvailable()" } } });

or

fluid.defaults("fluid.prefs.panelHolder.selfVoicingIfAvailable", { selfVoicingPanelGrade: "@expand:fluid.prefs.selfVoicingIfAvailable()", distributeOptions: { selfVoicingIfAvailable: { target: "{that selfVoicing}.type", source: "{that}.options.selfVoicingPanelGrade" } } });

or perhaps

fluid.defaults("fluid.prefs.panelHolder.selfVoicingIfAvailable", { gradeNames: ["fluid.contextAware"], contextAwareness: { textToSpeech: { checks: { supportsTTS: { contextValue: "{fluid.supportsTTS}", gradeNames: "fluid.prefs.panel.selfVoicing" } }, defaultGradeNames: "fluid.emptySubcomponent" } } });

None of these succeed in disabling the component via the ancient "fluid.emptySubcomponent" scheme which is only recognised via the "type" field, which it seems is unresponsive to expanders. We should really use a modern lensed/dynamic component system.

Environment

None

Activity

Details

Assignee

Reporter

Components

Affects versions

Priority

Created September 29, 2022 at 12:50 PM
Updated September 29, 2022 at 12:50 PM
Resolved September 29, 2022 at 12:50 PM