Repository navigation
Lets a setup end more than one way - #280
Merged
Merged
Conversation
A myapp.setup root runs a setup's steps and declares done plus one ending, raised when a named button's press meets a condition. The card-reader setup uses it: a test card the reader did not read ends the setup with site_visit_needed. Library.Setups' outcomes answer the new set, and the onboarding's subchart declares it and writes what each setup finished with to last_setup. The Journey page's heading and ended notice name the Path's own document; the signup Path keeps its wording. The settings page draws a sentence per setup written for a librarian, kept in Library.Setups beside the one list. Refs: se-qb73
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs: se-qb73
What changes
myapp.setup(StatifierExamples.Library.Setup), is a composite: acore.groupwhosebodyis exposed as a pass-through slot for the setup'smyapp.stepblocks, and whose rail holds onecore.on_eventwhen the config names an ending. Its params areending(the outcome),ending_on(the button whose press can end it) andending_when(a condition on what the press carried).declared_outcomes/1answersdoneand then the ending, so a compile for use as a child gives the document both root outcomes. The step records the press first; the handler then abandons the group with the ending's outcome.core.sequencetomyapp.setupwithending: site_visit_needed, raised when the test-card screen's Finish reportsnot_read. The catalogue sync and the reading-list import keep theircore.sequenceroots and finish as before.Library.Setups.outcomes/1answers the set:["done", "site_visit_needed"]for the card-reader setup,["done"]for the other two.last_setup.Library.Setups(description/1) beside the one list, in place of each document's own metadata description, which is written for whoever edits the document.Provenance
card_reader_setup_screens.jsonwould change a fileUpgradedScreensTestpins as the upgrade task's byte-for-byte rewrite, so the screens documents are unchanged.Library.Setupsrather than in the documents: the list of setups and how a page offers them is that module's.myapp.setupis registered through a newStatifierExamples.Library.block_types/0, as the card and signup domains register theirs.Tests
Library.SetupsTest: the declared outcomes per setup; a test-only copy whose ending is on the first step ends there under its condition and moves on otherwise; each librarian sentence names no block type or file; doctests ofLibrary.Setup.Library.OnboardingTest, "how a setup ended": the card-reader child finishes withsite_visit_neededon a card it did not read and withdoneon one it read, and the onboarding'slast_setupholds that outcome before it moves on to the next pick.SettingsLiveTest: the librarian sentence is drawn and the document's description is not; the Journey page's heading and ended notice name the card-reader setup.Gate
Full
mix qualitygreen on the committed tree (format, compile with warnings as errors, deps, credo, dialyzer, the full suite at 88.2% coverage). The commit is the staged tree that run went green on, with the gate lock and a machine slot held across both, so the commit did not re-run it.Review tier
More than 300 changed lines outside docs and test fixtures, so this takes a cold review pass before it merges.