WIP: rework progress #48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "wip/progress"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
resolves #47.
resolves #40.
should try #34
this PR reworks log and progress, and adds many more treats to make that a reality.
progress
node signaling is done by providing a
progress.Rootto every node,dispatching events to it when the node changes. the root is connected to
an observer to construct a UI out of it. this commit adds two built in
observers:
attachToScreenbinds a root to a TTY screen (via the log.Widget API).the primary use of this is to implement the top level
progress.start.encodeStreamconverts these events into aReadableStream. bybatching events together, the stream contents remain small, that way the
code that constructs progress nodes do not have to worry about calling
many setters at once, it gets debounced be the serializer. a server may:
and
decodeStreamon the client:this feature is something that my work is interested in using. while
progress.tswill not be the home of a React hook -- it's trivial toimplement
progressas a top level modulelib/progress514ea69eb3e773ba61b0to8bb79abf0e8bb79abf0etofe9f388e08fe9f388e08to4e7327b8a04e7327b8a0to579daf6285579daf6285to98ec92288c98ec92288ctod95b9681a3d95b9681a3to5b51eef8195b51eef819to22117eb74dchanging branch name, no longer using
wipPull request closed