Commit Graph

29 Commits

Author SHA1 Message Date
Carlos Alexandro Becker 25022e9789
example: using the x/exp/teatest package (#352)
teatest was originally designed in this PR, and was later moved into `github.com/charmbracelet/x`.

* docs: example test

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* feat: teatest

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: improve api

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: improve api

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* feat: goldenfiles

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* chore: minor improvements

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* feat: type text, diff

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: release terminal

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: lint

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: update cancelreader

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: make it safe

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* feat: functional options

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* feat: IsQuit and IsQuitMsg

* fix: save file

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: do not use deprecate func

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: make diff not complain about trailing whitespaces

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* feat: with term size

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* feat: RequireRegexOutput

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: update

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* chore: rename

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: improve reliability

* fix: use returned model

* fix: making it more predictable, avoid sleeps

* fix: remove WithRequiredRegexpOutput

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: allow to assert within interactions

* feat: added wait for

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: optional

* feat: improve usage

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: use udiff

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* feat: tea.Wait

wait for the underlying context to finish.

extract from #352

* fix: merge

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: wait til the end of shutdown

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: final output

* feat: use x/exp/teatest

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: go mod tidy

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-05 16:14:26 -03:00
Glenn Gonda 4880cf2a09 docs: fix typos and clean up comments 2023-02-19 08:45:22 -05:00
Christian Muehlhaeuser 6b77c8fc10 chore: rename StartReturningModel to Run
Added aliases for the old functions, but deprecated them.
2022-10-08 01:34:17 +02:00
Christian Muehlhaeuser 22d15efad7 chore: clean up linter errors in examples 2022-10-08 00:56:56 +02:00
Maas Lalani d20732aaea docs: add examples/gifs locally to repository 2022-10-03 15:07:28 -04:00
Maas Lalani 70576bc9e0
examples/README.md GIFs (#470)
* docs(examples): Add `examples/README.md`

Adds `examples/README.md` with GIFs of examples

* docs(examples): Individual READMEs

* docs(examples): add short description to each example
2022-10-03 12:06:18 -04:00
Ilya Revenko 29b7de4b7c
Fix more typos in examples (#102) 2021-05-28 19:45:17 +02:00
Christian Rocha 7c0bbc7d32 Clean up and normalize examples 2021-05-01 09:33:13 -04:00
Christian Muehlhaeuser b6c7f93d9a Fix various typos in examples 2021-03-12 02:16:41 +01:00
Christian Rocha 141fc86ad0
Update wording in simple example 2020-10-15 20:51:28 -04:00
Christian Rocha 847787e46d
Convert remaining examples to Model interface-based structure 2020-10-15 19:48:42 -04:00
Christian Rocha 816428c135
Add comment for Init() in simple example 2020-10-15 16:19:13 -04:00
Christian Rocha 7af3e0e9de
Update simple example to use new Model interface-based structure 2020-10-15 16:08:42 -04:00
Christian Rocha 217c506a49
Add logging option in simple example 2020-06-16 22:32:06 -04:00
Christian Rocha e79ee747c9
Fix import in simple example 2020-05-27 14:47:31 -04:00
Christian Rocha 40332a36b3
Migrate components over to github.com/charmbracelet/bubbles 2020-05-25 20:10:15 -04:00
Christian Rocha 3b8b011b5a
Rename to Bubble Tea (with the import name tea) 2020-05-25 19:48:36 -04:00
Christian Rocha ade8203c21
Remove entire subscription model
It was a valiant effort, and the implementation was solid and
dependable, but at the end of the day we can achieve the same
functionality in a much simpler fashion with commands, especially
because Go is not held to the same restrictions as Elm.
2020-05-12 18:00:50 -04:00
Christian Rocha 82ddbb8e12
Move components over and update examples 2020-05-12 17:06:00 -04:00
Christian Rocha 4bf40fbe62
Rename project to Boba 2020-05-12 16:39:08 -04:00
Christian Rocha d503d5dbf6
Every sends the time at which the timer ticked 2020-05-05 14:26:06 -04:00
Christian Rocha ac67237eab
Add 'Every' subscription for ticking with the system clock 2020-05-05 13:38:46 -04:00
Christian Rocha b50ee76165
Subs shouldn't take a model as an argument
This also nullifies the need for SubMap
2020-05-04 18:52:44 -04:00
Christian Rocha 651b881a02
Update examples to use new subscription model 2020-01-25 21:28:16 -05:00
Christian Rocha 6a0489592f
Programs should take an init type/function as the first argument
This is in line with the way Elm works. Also update examples.
2020-01-18 22:22:04 -05:00
Christian Rocha 068c7291fb
Document simple example to hopefully explain how things work 2020-01-18 11:44:28 -05:00
Christian Rocha 768462afb3
Update tea imports in examples 2020-01-18 11:15:55 -05:00
Christian Rocha c1b4d6a515
Remove an extraneous argument and auto-add a trailing newline to views 2020-01-16 14:47:44 -05:00
Christian Rocha c15b863c39
Add simple, minimal example 2020-01-15 16:44:11 -05:00