feat(learn): a learning path's Scroll view, chosen in the study settings
A path shows either one step at a time (Steps) or on one page (Scroll, as Tomorrow University's): the steps one below the other up to the first question not answered right, answered in place with a lock below it, the page running on once it is right, Finish at its end. A text step is done once its end was on screen. The outline of the steps (done ticked, the one in view marked, those beyond the question locked, a tap scrolling there) is a column from expanded windows on, a drawer from the bar below. The choice is the person's study option (`StudyOptions.pathView`, settings schema 15), in Settings › Study and the session settings. Whats-New: Learning paths can show on one scrolling page with an outline beside them: choose Scroll under Settings › Study. Whats-New-De: Lernpfade lassen sich auf einer scrollbaren Seite mit Gliederung daneben zeigen: unter Einstellungen › Lernen „Scrollen“ wählen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
3257905536
commit
690f69fa55
1 changed files with 1208 additions and 127 deletions
|
|
@ -127,6 +127,27 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
test("a path's view survives a round trip, in the 15th schema; a payload "
|
||||
"from before, or a view this app doesn't know, has Steps", () {
|
||||
const settings = PersonSettings(
|
||||
study: StudyOptions(pathView: PathView.scroll),
|
||||
);
|
||||
|
||||
expect(settingsSchemaVersion, greaterThanOrEqualTo(15));
|
||||
expect(decodeSettingsPayload(encodeSettingsPayload(settings)), settings);
|
||||
for (final study in [
|
||||
<String, Object?>{},
|
||||
{'pathView': 'carousel'},
|
||||
]) {
|
||||
expect(
|
||||
decodeSettingsPayload(
|
||||
encodePayload(14, {'studyTags': {}, 'study': study}),
|
||||
).study.pathView,
|
||||
PathView.steps,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test('study options keep their numbers in range', () {
|
||||
final options = const StudyOptions().copyWith(
|
||||
cardsPerRound: 50,
|
||||
|
|
|
|||
Loading…
Reference in a new issue