Skip to content

Adds the newer screen types to the palette - #277

Merged
johnnyt merged 2 commits into
mainfrom
se-gb7u-palette-new-types
Nov 27, 2026
Merged

johnnyt merged 2 commits into
mainfrom
se-gb7u-palette-new-types

Conversation

@johnnyt

@johnnyt johnnyt commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Refs: se-gb7u

What changes:

The screen editor's palette offers the element types and fields riddler 0.9.0 admits beyond the original ones, each written in riddler's shape by the walk (StatifierExamples.ScreenEditor.Walk.screen_document/1):

  • myapp.screens.image: src and alt (both required, alt not blank), and the size and fit hints.
  • myapp.screens.divider: the two fields every element carries, nothing else.
  • myapp.screens.link: label and href (both required), and the style hint.
  • The date formats: date, time and datetime are choices of a text question's format, not new types, because the document spells them as a text question's format. Under those formats min and max stay the text they are (a value in the format's shape); under every other format they are walked to numbers as before.
  • The slider hint: a text question's style (offered as an open list: multiline, slider, stepper) and its step, written as text and walked to a number.
  • An option description: a choice question's option_descriptions rows, value=Description, each naming an option once; the walk puts each on its option and leaves the field out of the document.
  • A check: every question type's checks rows, code: condition => message, walked to riddler's check objects (condition, code, message).

The URL rule stays riddler's: the editor holds src and href to being there, and a URL riddler refuses is refused when Try admits the walked document.

The patron registration fixture gains the library's logo image, a divider before the PIN, a date of birth question (format date, min 1900-01-01) whose check holds it to not being after context.today, a slider for how many items a patron borrows at once, a description on the student card option, and a link to the lending rules. Each new question is optional, so every existing Journey over the fixture submits as before. Try still walks and starts it.

Two host pieces follow from the palette: the Try renderer (StatifierExamplesWeb.SignupElements) draws an image, a divider and a link as plain HTML instead of raising on them, and the Journey's check (StatifierExamples.Signup.Validation) has a reader-facing message for the date and time formats, so Try no longer refuses a document that uses them.

Tests:

  • The walk carries each new element and field into riddler's shape, refuses a check row, an option description or a step it cannot read, and keeps a date or time bound as text.
  • The date of birth check decides: a future date is the check's finding with the author's message, a past one is admitted, against a root carrying context.today.
  • Try presents the image, divider, date question, link, slider and option description riddler resolves for the fixture.
  • The Journey page draws the image, the divider, a date input, the link and a range input through riddler_live_view.
  • The palette's fields, hint candidates and findings for the new types.

Every new test carries the mutation it was sabotaged with in a comment above it; each turned red on an assertion and the file was restored from a copy.

Provenance:

Engineering choices taken in this change, reversible inside the app: the date formats as format choices rather than types; option descriptions and checks as rows on the question, in the editor's existing row convention; alt held to not blank, so a decorative image (an empty alt) is not offered by the editor; the check reads today from context, as riddler's record says the host supplies it.

Gate:

Full mix quality green on the committed tree. The branch is the reviewed commit plus one cure commit (the time and datetime reader messages name both the minutes and the seconds shapes and a datetime's Z or offset, and the format choices test carries its sabotage note); it is not rebased onto main's newer commit, which moves mix.lock only. Review tier: size (the change exceeds 300 lines outside docs and fixtures), and it also touches contract surfaces: the new public modules StatifierExamples.ScreenEditor.Image, Divider and Link, and StatifierExamples.Signup.Validation.formats/0, which now answers six formats.

The screen editor's palette gains an image, a divider and a link; a
text question gains the date, time and datetime formats, a style hint
(a slider among them) and a step; a choice question gains option
descriptions; and every question gains checks. The walk turns each
into riddler's shape, and the patron registration fixture uses one of
each and still starts under Try.

The Try renderer draws the image, divider and link, and the Journey's
check has a reader-facing message for the date and time formats.

Refs: se-gb7u
The reader messages for time and datetime name both the minutes and
the seconds shapes, and a datetime's Z or offset. The date and time
format choices test carries the mutation it was sabotaged with.

Refs: se-gb7u
@johnnyt
johnnyt merged commit bcdc55a into main Nov 27, 2026
4 checks passed
@johnnyt
johnnyt deleted the se-gb7u-palette-new-types branch November 27, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant