Remove the warningMessage field for command args (#7005)
This commit is contained in:
@ -159,11 +159,6 @@ function CommandBarSelectionInput({
|
|||||||
: `Please select ${
|
: `Please select ${
|
||||||
arg.multiple ? 'one or more ' : 'one '
|
arg.multiple ? 'one or more ' : 'one '
|
||||||
}${getSemanticSelectionType(arg.selectionTypes).join(' or ')}`}
|
}${getSemanticSelectionType(arg.selectionTypes).join(' or ')}`}
|
||||||
{arg.warningMessage && (
|
|
||||||
<p className="text-warn-80 bg-warn-10 px-2 py-1 rounded-sm mt-3 mr-2 -mb-2 w-full text-sm cursor-default">
|
|
||||||
{arg.warningMessage}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
<span data-testid="cmd-bar-arg-name" className="sr-only">
|
<span data-testid="cmd-bar-arg-name" className="sr-only">
|
||||||
{arg.name}
|
{arg.name}
|
||||||
</span>
|
</span>
|
||||||
|
@ -133,11 +133,6 @@ export default function CommandBarSelectionMixedInput({
|
|||||||
Continue without selection
|
Continue without selection
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
{arg.warningMessage && (
|
|
||||||
<p className="text-warn-80 bg-warn-10 px-2 py-1 rounded-sm mt-3 mr-2 -mb-2 w-full text-sm cursor-default">
|
|
||||||
{arg.warningMessage}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
<span data-testid="cmd-bar-arg-name" className="sr-only">
|
<span data-testid="cmd-bar-arg-name" className="sr-only">
|
||||||
{arg.name}
|
{arg.name}
|
||||||
</span>
|
</span>
|
||||||
|
@ -91,11 +91,6 @@ function CommandBarTextareaInput({
|
|||||||
autoFocus
|
autoFocus
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
{arg.warningMessage && (
|
|
||||||
<p className="text-warn-80 bg-warn-10 px-2 py-1 rounded-sm mt-3 mr-2 -mb-2 w-full text-sm cursor-default">
|
|
||||||
{arg.warningMessage}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</form>
|
</form>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ import {
|
|||||||
KCL_DEFAULT_DEGREE,
|
KCL_DEFAULT_DEGREE,
|
||||||
KCL_DEFAULT_LENGTH,
|
KCL_DEFAULT_LENGTH,
|
||||||
KCL_DEFAULT_TRANSFORM,
|
KCL_DEFAULT_TRANSFORM,
|
||||||
ML_EXPERIMENTAL_MESSAGE,
|
|
||||||
} from '@src/lib/constants'
|
} from '@src/lib/constants'
|
||||||
import type { components } from '@src/lib/machine-api'
|
import type { components } from '@src/lib/machine-api'
|
||||||
import type { Selections } from '@src/lib/selections'
|
import type { Selections } from '@src/lib/selections'
|
||||||
@ -962,7 +961,6 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
|
|||||||
allowCodeSelection: true,
|
allowCodeSelection: true,
|
||||||
},
|
},
|
||||||
skip: false,
|
skip: false,
|
||||||
warningMessage: ML_EXPERIMENTAL_MESSAGE,
|
|
||||||
},
|
},
|
||||||
prompt: {
|
prompt: {
|
||||||
inputType: 'text',
|
inputType: 'text',
|
||||||
|
@ -138,7 +138,6 @@ export type CommandArgumentConfig<
|
|||||||
commandBarContext: { argumentsToSubmit: Record<string, unknown> }, // Should be the commandbarMachine's context, but it creates a circular dependency
|
commandBarContext: { argumentsToSubmit: Record<string, unknown> }, // Should be the commandbarMachine's context, but it creates a circular dependency
|
||||||
machineContext?: C
|
machineContext?: C
|
||||||
) => boolean)
|
) => boolean)
|
||||||
warningMessage?: string
|
|
||||||
/** If `true`, arg is used as passed-through data, never for user input */
|
/** If `true`, arg is used as passed-through data, never for user input */
|
||||||
hidden?:
|
hidden?:
|
||||||
| boolean
|
| boolean
|
||||||
@ -280,7 +279,6 @@ export type CommandArgument<
|
|||||||
) => boolean)
|
) => boolean)
|
||||||
skip?: boolean
|
skip?: boolean
|
||||||
machineActor?: Actor<T>
|
machineActor?: Actor<T>
|
||||||
warningMessage?: string
|
|
||||||
/** For showing a summary display of the current value, such as in
|
/** For showing a summary display of the current value, such as in
|
||||||
* the command bar's header
|
* the command bar's header
|
||||||
*/
|
*/
|
||||||
|
@ -175,7 +175,6 @@ export function buildCommandArgument<
|
|||||||
skip: arg.skip,
|
skip: arg.skip,
|
||||||
machineActor,
|
machineActor,
|
||||||
valueSummary: arg.valueSummary,
|
valueSummary: arg.valueSummary,
|
||||||
warningMessage: arg.warningMessage ?? '',
|
|
||||||
} satisfies Omit<CommandArgument<O, T>, 'inputType'>
|
} satisfies Omit<CommandArgument<O, T>, 'inputType'>
|
||||||
|
|
||||||
if (arg.inputType === 'options') {
|
if (arg.inputType === 'options') {
|
||||||
|
Reference in New Issue
Block a user