Commit Graph

665 Commits

Author SHA1 Message Date
Christian Rocha f790a53c28
Readme housekeeping
* Use digitally remastered GIF
* Update footer image
* Add more stuff to the made-with-bubble-tea section
2022-02-09 13:24:39 -05:00
Ayman Bagabas 42cd4c3191 feat: kill the program and restore terminal state
* Add Kill() to force kill the program from the outside
* Prevent renderer channel from being closed multiple times
2022-02-08 10:13:05 -08:00
Christian Muehlhaeuser 74f0972e4e Simplify send-msg example 2022-02-08 18:01:35 +01:00
Christian Muehlhaeuser 7c939e8dfb Use termenv's EnvColorProfile, which respects NO_COLOR and CLICOLOR_FORCE env vars 2022-02-06 04:24:31 +01:00
Carlos Alexandro Becker 9a06319ff1
feat: tea.Batch returns nil if all cmds are nil (#217)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-02-03 12:08:34 -03:00
Ajeet D'Souza a09e0e80cb Add clidle under "Bubble Tea in the Wild" 2022-02-03 06:12:35 +01:00
Carlos A Becker c5d3b1e154
test: test for null cmd in sequentially
refs #214

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-02-01 22:53:52 -03:00
Ajeet D'Souza 7d18632ca5
fix: handle nil cmds in tea.Sequentially (#214) 2022-02-01 22:52:49 -03:00
Christian Muehlhaeuser 77e63ac890 Bump termenv to v0.11.0 2022-01-31 23:04:37 +01:00
Christian Muehlhaeuser a6f46172ec Fix source link in Commands tutorial 2022-01-26 02:16:11 +01:00
dependabot[bot] 4f08c1b965 chore(deps): bump github.com/charmbracelet/glamour in /examples
Bumps [github.com/charmbracelet/glamour](https://github.com/charmbracelet/glamour) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/charmbracelet/glamour/releases)
- [Commits](https://github.com/charmbracelet/glamour/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/glamour
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-25 08:36:50 -05:00
Ayman Bagabas db5d23b82e
feat: sync bubbletea with git.charm.sh 2022-01-24 17:07:40 -05:00
Carlos Alexandro Becker d79cac20cb
chore: dependabot, go mod tidy, update bubbles (#198)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-01-21 12:04:54 -03:00
Christian Stewart 608fde59ed fix(tea): allocate msgs channel in constructor
Race condition bug: Start() is called in a new gorotuine, then Send(). If the
Send happens before the msgs channel is allocated, the message is dropped.

Instead allocate the channel in the constructor, so msgs is never nil.

Signed-off-by: Christian Stewart <christian@paral.in>
2022-01-14 13:15:29 -05:00
Christian Rocha 66cea095eb Migrate from NewModel() to New() in examples for Bubbles-related stuff 2022-01-13 13:20:18 -05:00
Christian Rocha 843b6a5249 Use model-based Tick commands in spinner examples 2022-01-13 13:05:27 -05:00
Christian Rocha ee92bed288 Cleanup header/footer rendering in pager example with Lip Gloss 2022-01-13 12:49:20 -05:00
Christian Rocha 7517c1b1bd Add a border to the Glamour example per the viewport API update 2022-01-13 12:49:20 -05:00
Christian Rocha 7514ac937a Update glamour example per viewport API update 2022-01-13 12:49:20 -05:00
Christian Rocha 1ca2b1cd40 Update pager example per viewport API update 2022-01-13 12:49:20 -05:00
Christian Rocha bdb04767ff Add stopwatch example 2022-01-13 11:53:46 -05:00
Christian Rocha 03d1aa6c08 Rename 'countdown' example to 'timer' and use timer Bubble 2022-01-13 11:53:14 -05:00
Christian Rocha 99ba63fe8a
Bump main, example, and tutorial dependencies 2022-01-13 11:41:09 -05:00
Christian Muehlhaeuser 7ead21e787 Rename termdbms and add gh-prs to BubbleTea-powered programs 2022-01-11 10:26:26 +01:00
Max Brauer 4ac566c1f7 Remove unused func from send-msg example
‘randomEmoji()’ is redundant
2022-01-10 21:15:47 -05:00
Christian Rocha d266bc1616 Update result example to use StartReturningModel 2022-01-10 21:00:29 -05:00
Kyosuke Fujimoto 3a1b9fbe9f Fix list-default to use tea.WithAltScreen option 2022-01-08 14:36:37 -05:00
Kyosuke Fujimoto 14478e2a3c Fix list-default to be able to exit with ctrl+c 2022-01-08 14:36:37 -05:00
Christian Muehlhaeuser 98a8bcf62a Add read permissions to linter workflows 2022-01-07 13:25:29 -05:00
Christian Muehlhaeuser 3afda07603 Annotate why we ignore error 2022-01-07 13:25:29 -05:00
Christian Muehlhaeuser 91cfe19018 Add separate sets of hard- and soft-enforced linters 2022-01-07 13:25:29 -05:00
Christian Rocha bef2c8ce66 Always redraw when toggling the altscreen 2022-01-07 13:21:43 -05:00
Rick Booth 03c08875b3 Fix links in commands README 2021-12-29 23:25:34 +01:00
Christian Rocha 226c27f1a9 Add dragonfly build tags where appropriate 2021-12-11 15:13:17 -05:00
Ayman Bagabas 7b288f4353 Add cancelreader bsd go1.17 compilation flags
and fix "in switch on ident (mismatched types uint64 and uint32)" error
when building for 32-bit bsd
2021-12-11 14:53:15 +01:00
Mark Phelps cf3955fbe2 Update README.md
Add missing `to`
2021-11-23 13:57:33 -05:00
mikecoop83 dc7063bbec Remove extra word in commands README 2021-11-21 14:17:06 -05:00
Carlos A Becker cb0a72d682 test: nil renderer, options and screen 2021-11-15 10:28:46 -05:00
Christian Rocha ab89603d28 Remove unused filtering stuff from simple list example 2021-11-09 17:30:15 -05:00
Christian Rocha a55bf775cd Add missing build tags to fix builds in BSD systems 2021-11-03 12:33:27 -04:00
Christian Rocha 119144e78c ANSI compression is now opt-in via the WithANSICompressor program option 2021-10-30 13:04:27 -04:00
Niklas Johansson 56aa4efb60 tea: Add StartReturningModel()
Sometimes it is useful to obtain the final model after the
program has finished. Add StartReturningModel() (Model, error),
so that it is possible to obtain the final model.

Make sure to keep the original Start() error function, so that
everything is backwards compatible.
2021-10-28 14:19:46 -04:00
Christian Rocha 6dc000bdbd Examples and tutorials: update dependencies and go mod tidy 2021-10-28 09:45:43 -04:00
Christian Rocha e52d1f1e90 Bump reflow, termenv and go-isatty 2021-10-28 09:45:43 -04:00
Christian Muehlhaeuser c29912c179 Enable ANSI compressor
With this change all ANSI output will be piped through an ANSI compressor that
eliminates redundant ANSI sequences. As such the compressor can be considered
"lossless".
2021-10-28 09:45:43 -04:00
Christian Rocha 1f12bda862 Add program-level quit convenience method 2021-10-15 10:37:25 -04:00
Carlos A Becker e8289143a5 test: logging test
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-12 14:21:02 -04:00
Carlos A Becker 350b13cba7 test: key tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-12 14:21:02 -04:00
Carlos A Becker cfb871c5ca test: cmds
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-12 14:21:02 -04:00
Carlos A Becker 7934b60e21 test: logging
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-12 14:21:02 -04:00