chore: change goal text, correct output for gestures, allow step specific reducing, fix tests/ add tests for new things

This commit is contained in:
Björn Otgaar
2026-01-05 16:38:06 +01:00
parent 111400bd82
commit 216b136a75
6 changed files with 122 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ import styles from './GestureValueEditor.module.css'
type GestureValueEditorProps = {
value: string;
setValue: (value: string) => void;
setType: (value: boolean) => void;
placeholder?: string;
};
@@ -443,6 +444,7 @@ const GESTURE_SINGLES = [
export default function GestureValueEditor({
value,
setValue,
setType,
placeholder = "Gesture name",
}: GestureValueEditorProps) {
@@ -465,10 +467,12 @@ export default function GestureValueEditor({
if (newMode === "single") {
setValue(customValue || value);
setType(false);
setFilteredSuggestions(GESTURE_SINGLES);
setShowSuggestions(true);
} else {
// Clear value if it does not match a valid tag
setType(true);
const isValidTag = GESTURE_TAGS.some(
tag => tag.toLowerCase() === value.toLowerCase()
);