tui: Ink's counter, borders, use-focus and static side by side, a text field, and the README's front - #404
Merged
Conversation
…a text field, and run every example headless
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.
PLAN step 6, the examples half.
Four of Ink's examples, ported.
examples/ink/{counter,borders,use-focus,static}.rip, each the same program as Ink's<name>.tsxbeside it (copied unmodified;NOTICEnames them). Each port was run against Ink 7.1.1's own frames for the same program: every frame is identical, so no stated difference was needed. Lines, non-blank and non-comment, counted bytest/lines.ripand asserted bytest/examples.rip:Two behaviors stated in the file headers:
borderssaysflexDirection: 'row'on its two rows since aBoxhere is a column;staticcallsquit()at its tenth test, since Ink's process ends when its last timer drains whilerunholds stdin.A text field.
examples/input.rip, 40 code lines: typing inserts one code point at the cursor, arrows, Home and End move it, Backspace and Delete take one grapheme cluster, a paste inserts whole, Enter prints the value above the frame and clears, Escape clears; the cursor is placed bycursor:with the column measured over the clusters before it. This is the text-input example PLAN step 4's exit named.Every example runs headless through
mountintest/examples.rip(7 tests): the timer counter driven byview.tick, focus by Tab, the static scrollback and live frame, the field's frame andview.cursorafter each key. Each also runs from a terminal (rip examples/ink/counter.rip) through therun X if import.meta.mainguard.README. The top reads, in order: the thesis in plain words; a quick start on the keyboard counter with the two commands; the feature matrix reconciled with what is built (every row of "Matches Ink" and "Beyond Ink" is built and under test; TODO lists the open work within them); the four examples side by side with their lines; the examples table. A
<!-- bench -->marker holds the place for the published numbers, which the bench half writes.One gap found and listed in TODO, not fixed: a
stdout.columnsof 0 draws empty frames whereundefinedreads as 80.Suites unchanged plus examples 7; root style gate passes.