Skip to content

Commit 264110e

Browse files
Staacksclaude
andcommitted
Clearing an experiment restores an input element's default
The maintainer's ruling on the ambiguity the Android session surfaced: after a clear the buffer gets the DEFAULT, not the position the control was left in. Clearing is how a user deliberately returns an experiment to its starting state, and it is what makes clearGroup coherent - a setting that should survive the trash is exactly what that attribute exists for, so without this ruling it would be answering a question clearing did not ask. Recorded on the default attribute of edit, toggle and dropdown: a value the user has set is not overwritten while it is in the buffer, and clearing it restores the default. Android's toggle keeps the widget position and is the thing to change; its edit already does the right thing and is the shape to copy, and the dropdown has not been established either way. iOS already complies - seedInputDefaults fills the emptied buffer and the switch view reads it without writing back - so its item is a test to pin it, since it holds by construction rather than by intent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 5f395d8 commit 264110e

1 file changed

Lines changed: 27 additions & 15 deletions

File tree

spec/views.yml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -906,11 +906,15 @@ elements:
906906
remark: >-
907907
Applied whenever the buffer is EMPTY, not only once at load: when the
908908
experiment is opened, after the data is cleared, and at the start of
909-
each analysis cycle. A value the user has entered is never
910-
overwritten. Without the last two an experiment loses the setting the
911-
moment anything empties the buffer - a clear, or an analysis input
912-
without keep - and only gets it back if that element's own view
913-
happens to be on screen.
909+
each analysis cycle. Without the last two an experiment loses the
910+
setting the moment anything empties the buffer - a clear, or an
911+
analysis input without keep - and only gets it back if that element's
912+
own view happens to be on screen. A value the user has set is not
913+
overwritten while it is in the buffer; CLEARING IT RESTORES THE
914+
DEFAULT, even though the control was showing something else, because
915+
clearing is how a user deliberately returns an experiment to its
916+
starting state. An author who wants a setting to survive that says so
917+
with clearGroup on the data container, which is what it is for.
914918
default: 0.0
915919
summary: Value the field starts with.
916920
agreement: agreed
@@ -1015,11 +1019,15 @@ elements:
10151019
remark: >-
10161020
Applied whenever the buffer is EMPTY, not only once at load: when the
10171021
experiment is opened, after the data is cleared, and at the start of
1018-
each analysis cycle. A value the user has entered is never
1019-
overwritten. Without the last two an experiment loses the setting the
1020-
moment anything empties the buffer - a clear, or an analysis input
1021-
without keep - and only gets it back if that element's own view
1022-
happens to be on screen.
1022+
each analysis cycle. Without the last two an experiment loses the
1023+
setting the moment anything empties the buffer - a clear, or an
1024+
analysis input without keep - and only gets it back if that element's
1025+
own view happens to be on screen. A value the user has set is not
1026+
overwritten while it is in the buffer; CLEARING IT RESTORES THE
1027+
DEFAULT, even though the control was showing something else, because
1028+
clearing is how a user deliberately returns an experiment to its
1029+
starting state. An author who wants a setting to survive that says so
1030+
with clearGroup on the data container, which is what it is for.
10231031
default: 0.0
10241032
summary: State the switch starts in.
10251033
agreement: agreed
@@ -1145,11 +1153,15 @@ elements:
11451153
remark: >-
11461154
Applied whenever the buffer is EMPTY, not only once at load: when the
11471155
experiment is opened, after the data is cleared, and at the start of
1148-
each analysis cycle. A value the user has entered is never
1149-
overwritten. Without the last two an experiment loses the setting the
1150-
moment anything empties the buffer - a clear, or an analysis input
1151-
without keep - and only gets it back if that element's own view
1152-
happens to be on screen.
1156+
each analysis cycle. Without the last two an experiment loses the
1157+
setting the moment anything empties the buffer - a clear, or an
1158+
analysis input without keep - and only gets it back if that element's
1159+
own view happens to be on screen. A value the user has set is not
1160+
overwritten while it is in the buffer; CLEARING IT RESTORES THE
1161+
DEFAULT, even though the control was showing something else, because
1162+
clearing is how a user deliberately returns an experiment to its
1163+
starting state. An author who wants a setting to survive that says so
1164+
with clearGroup on the data container, which is what it is for.
11531165
default: 0.0
11541166
summary: Value selected initially.
11551167
agreement: agreed

0 commit comments

Comments
 (0)