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.
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.