Commit Graph

757 Commits

Author SHA1 Message Date
Christian Rocha 5bc2504690 chore(lint): wrap various TTY-related errors 2023-07-07 16:30:57 +02:00
Carlos Alexandro Becker ea7ceb7f38
build: group dependabot updates (#773) 2023-07-06 13:42:53 -03:00
Roman Leonenkov c1b0b19d64
fix: index out of range in examples/credit-card-form when ccn is empty (#770) 2023-06-29 19:37:48 -04:00
Carlos Alexandro Becker cd63c32c73
feat(deps): update termenv (#768) 2023-06-28 16:40:08 +02:00
Christian Rocha f75684c986 chore: group handler type and methods together 2023-06-20 07:21:54 -04:00
Raphael 'kena' Poss b1e7f42ab0 fix(key): invert the control loop
Instead of reading messages in an array and then sending them into a
channel, this version of key.go writes to the channel directly.
2023-06-20 12:48:13 +02:00
Christian Rocha ed4f2ec1ca chore: go mod tidy to remove rogue bubbles dep 2023-06-19 19:08:37 -04:00
Raphael 'kena' Poss d9c675138c fix(key),test: simplify the input analysis code 2023-06-15 14:51:02 +02:00
Lukas Bloznelis c0cc6aa1fb
chore(docs): add typioca to Bubble Tea in the Wild (#763) 2023-06-14 10:25:09 -04:00
Carlos Alexandro Becker b80eb8303b
docs: fix lint issues in examples and tutorials (#759)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-09 13:33:53 -03:00
Carlos Alexandro Becker b2d2ac6504
chore: update example tests, test on ci (#735)
* chore: update example tests, test on ci

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

* fix: mark *.golden as binary

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

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-09 09:17:15 -03:00
tomfeigin f3e1b67605
(feat): Add option to set max FPS (#578)
* (feat): add option for setting FPS on renderer

Co-authored-by: Christian Rocha <christian@rocha.is>
2023-06-06 17:49:11 +02:00
Christian Muehlhaeuser 44f17fa1c0 fix: stop renderer before acquiring renderer mutex 2023-06-05 10:05:38 +02:00
Maas Lalani 444e04bbb3
docs(examples): filepicker AllowedTypes example (#713) 2023-05-31 17:18:24 -04:00
Maas Lalani 8254e0e472
fix(examples/file-picker): use `CurrentDirectory` instead of Path 2023-05-31 14:20:18 -04:00
Maas Lalani 5f7a07b03c
chore(deps): bump bubbles to v0.16.1 2023-05-31 14:08:43 -04:00
Maas Lalani 26dc0b5b32
chore(deps): bump bubbles to v0.16.1 2023-05-31 14:08:34 -04:00
Christian Rocha c267762438
fix(regression): auto-open a TTY when stdin is not a TTY (#746)
The regression was introduced in precisely this revision:
fcc805f3da

Closes #745.
2023-05-24 12:31:00 -04:00
Ayman Bagabas d1a16bd883
fix(ci): remove soft-serve workflow 2023-05-12 14:15:17 -04:00
Carlos Alexandro Becker f5a91f0a59
docs: update license
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-11 12:37:50 +00:00
Carlos Alexandro Becker d9df8c3de6
chore: go mod tidy
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-08 17:47:01 +00:00
Carlos Alexandro Becker 326b0b2df9
chore: updates
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-08 17:46:37 +00:00
Christian Rocha fcc805f3da chore: make input options mutually exclusive 2023-05-05 15:41:46 -04:00
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
Carlos Alexandro Becker 5326d76c40
feat: allow to disable signals (#721)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-05-04 16:33:25 -03:00
Carlos Alexandro Becker 9cc3861bab
feat: tea.Wait (#722)
* feat: tea.Wait

wait for the underlying context to finish.

extract from #352

* fix: wait til the end of shutdown

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

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-04 16:30:30 -03:00
Ayman Bagabas 29254a08f1
fix(output): reuse termenv output (#715)
If the passed io.Writer is a termenv.Output, use it instead of creating
a new termenv.Output.
2023-04-26 16:04:14 -04:00
Christian Muehlhaeuser c56884c0e2
feat: add generic event filter (#536)
`WithFilter` lets you supply an event filter that will be invoked
before Bubble Tea processes a `tea.Msg`. The event filter can return
any `tea.Msg` which will then get handled by Bubble Tea instead of
the original event. If the event filter returns nil, the event
will be ignored and Bubble Tea will not process it.

As an example, this could be used to prevent a program from
shutting down if there are unsaved changes.

Based on the fantastic work by @aschey and supersedes #521.

Resolves #472.
2023-04-17 22:02:55 +02:00
bashbunni 8514d90b9e
docs: remove british spelling (#719) 2023-04-11 12:48:34 -07:00
bashbunni 5b809a3da8
docs: update issue templates (#712)
* docs: update issue templates

* add source code instructions
2023-04-06 10:34:23 -07:00
Christian Muehlhaeuser 58c5e01d8c chore: fix linter warnings 2023-04-04 13:27:12 +02:00
Christian Muehlhaeuser 273f59bd11 fix: adapt to lipgloss API change 2023-04-04 13:27:12 +02:00
Christian Muehlhaeuser 6eb0209d13 chore: bump termenv, lipgloss, x/term 2023-04-04 13:27:12 +02:00
muesli 248eb83001 chore: go mod tidy tutorials and examples 2023-03-16 10:09:43 +00:00
dependabot[bot] 9c161cb98b chore(deps): bump actions/setup-go from 3 to 4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-16 11:09:15 +01:00
Christian Muehlhaeuser 35c31f2168 chore: bump console dep 2023-03-13 18:09:44 +01:00
Carlos Alexandro Becker adb0065256
feat: LogToFileWith (#692)
Allows to log to file with custom loggers, provided they implement
SetOutput and SetPrefix.
2023-03-09 11:46:44 -03:00
Christian Rocha de6740db2e
chore(meta): tiny copy edit to Discord item in issues 2023-03-08 09:27:11 -05:00
Carlos A Becker 02b6aa2e1a
docs: point to discord link 2023-03-08 10:19:08 -03:00
Carlos Alexandro Becker ec2c3dd5f2
docs: issue template (#389) 2023-03-08 09:51:43 -03:00
Vernon Miller 03060def9f docs(readme): add link to countdown project 2023-03-07 15:05:32 -05:00
Andrian Budantsov 40923b4491 Add WG Commander to README.md 2023-03-07 14:52:03 -05:00
Omar kamoun f0389a218d
feat(README): add eks-node-viewer to "Bubble Tea in the Wild" list (#619)
* docs: add awslabs/eks-node-viewer to Bubble Tea in the Wild
2023-03-07 14:50:41 -05:00
Christian Muehlhaeuser 402d2b4e2b fix: stop renderer before launching a child process.
Stops the renderer before starting a child process, which prevents
the repaint race condition that writes to non-altscreen.
2023-03-07 10:09:36 +01:00
Maas Lalani 90c9124b0a
Filepicker Example (#683)
* feat: filepicker example

* fix: use new API

* docs(examples): update file selection comment in filepicker example

* chore: bump bubbles

---------

Co-authored-by: Christian Rocha <christian@rocha.is>
2023-03-06 11:54:26 -05:00
Christian Muehlhaeuser a136799ed3 fix: renderer only stops once
Ensure the tea renderer can be stopped and restarted more than once.
2023-03-06 14:38:49 +01:00
Carlos Alexandro Becker 32e3027ec1
feat(ci): auto go mod tidy examples (#561)
* feat(ci): auto go mod tidy examples

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

* fix: tutorials as well

* fix: checkout

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-02-23 13:51:15 -03:00
Carlos A Becker ae652b6a57
feat: go 1.17
This was actually done on #674, and merged in
388c67d573.

This commit is just for the sake of complete changelog.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-02-23 13:33:07 -03:00
dependabot[bot] 388c67d573
feat(deps): bump golang.org/x/text from 0.3.7 to 0.3.8 (#674) 2023-02-23 16:29:25 +00:00
Ayman Bagabas c61e4fd291
chore: update deps
Fixes: CVE-2022-27664 https://github.com/advisories/GHSA-69cg-p879-7622
2023-02-21 12:43:58 -05:00