Commit Graph

681 Commits

Author SHA1 Message Date
Christian Rocha b2c726a182 Make README footer more consistent with newer Charm READMEs 2021-06-07 20:59:16 -04:00
Christian Rocha 22244e0af4 Add Slides and Typer to stuff built with Bubble Tea 2021-06-07 20:59:16 -04:00
Christian Rocha 6547773a3f Clear output and render "nothing" when a view returns the empty string
Closes #100.
2021-06-02 14:49:54 -04:00
Christian Rocha 1f773e8f20 Fix a race where artifacts could print when exiting a program
This commit also consolidates the exit operations for consistency's
sake, and adds a kill() method to renderers for stopping them without
performing any final rendering.
2021-06-02 14:49:54 -04:00
Christian Rocha 85ab476698 Add ProgramOptions for entering the altscreen and enabling the mouse
Because they run ansyncronously, the analogous commands, when run in
a Model's Init() function, could fire after the renderer has starting
writing to output, rendering artifacts to the commandline.
2021-06-02 14:49:54 -04:00
Christian Rocha ec2fbf024b Cycle through cursor modes in textinputs example per Bubbles v0.8.0 2021-06-02 12:44:32 -04:00
Christian Rocha 035d2abd3e Properly cast inputStatus types + mark related linter false positive 2021-05-31 10:43:31 -04:00
Christian Rocha 3e98f55adf Add linter ignore rule for windows-related false positive on unix 2021-05-31 10:43:31 -04:00
Christian Rocha 955ce5c82c Extract magic number in X10 mouse parser 2021-05-31 10:43:31 -04:00
Christian Rocha 3256fae4d4 Force a full repaint when resizing the window
v0.13.4 introduced a regression where lines weren't always cleared when
resizing the window resulting in the presence of rendering artifacts.
This commit fixes that.
2021-05-31 10:37:32 -04:00
Ilya Revenko 29b7de4b7c
Fix more typos in examples (#102) 2021-05-28 19:45:17 +02:00
irevenko da9e8ee75a Fix typo in examples/result 2021-05-26 16:47:01 -04:00
Christian Rocha 6eabfd726e Cleanup styling spinner and tui-daemon-combo examples 2021-05-14 22:30:46 -04:00
Christian Rocha 65df16238d Fix coloring glitch in Glamour example 2021-05-14 22:30:46 -04:00
Christian Rocha 70be13948a Re-render all lines if the total number of lines increases
If the number of lines increased there's a chance that the increase in
lines caused the terminal to scroll (even in the altscreen). Because of
this we must repaint everything, as skipping lines will mis-render.

Thanks to @fiws for reporting this bug.
2021-05-14 20:04:40 -04:00
Christian Rocha 54da5489a0 Add fm and StormForge to projects using Bubble Tea in the README 2021-05-10 12:46:45 -04:00
Christian Rocha fb64f34bd0 Only render lines that have changed since the last render 2021-05-10 12:28:49 -04:00
Christian Rocha c07cbd1e32 Pull batch processing into the internal message switch 2021-05-06 18:10:17 -04:00
Christian Rocha 4fbe50adb6 Disable mouse when exiting due to a panic 2021-05-05 18:11:56 -04:00
Christian Rocha 3dff6d4b58 Deprecate Program.EnterAltScreen Program.ExitAltScreen methods
The EnterAltScreen/ExitAltScreen commands should be used instead.
2021-05-05 18:11:56 -04:00
Christian Rocha 5c150ebf38 Add cmds for toggling mouse mode + deprecate equivalent Program methods
Also automatically disable mouse mode on exit.
2021-05-05 18:11:56 -04:00
Christian Rocha 7c0bbc7d32 Clean up and normalize examples 2021-05-01 09:33:13 -04:00
Elio Esteves Duarte 64ae19f37e Add paginator example 2021-05-01 08:54:57 -04:00
Tobias Klauser 295f7bd246 Use golang.org/x/term
The golang.org/x/crypto/ssh/terminal package is deprecated and merely a
wrapper around golang.org/x/term. Use the latter directly and avoid the
dependency on the former altogether.
2021-04-29 15:05:50 +02:00
Christian Rocha b9e853eb2d Edits to library descriptions in README 2021-04-14 22:18:27 +02:00
Christian Muehlhaeuser edc7d8c0a9 Add lipgloss to README links, move projects below it 2021-04-14 22:18:27 +02:00
Christian Rocha 42f02edf29 Update spinner, textinput and pipe examples for Bubbles v0.7.7 2021-04-13 22:21:09 -04:00
sora233 ebf80ebf89 Fix stack overflow in examples/http 2021-04-09 10:02:40 +02:00
Kiyon 2d602a1244 Remove redundant lock in listen 2021-04-08 03:47:22 +02:00
Kiyon 1ee40507ef Add lock for updating width and height 2021-04-08 03:45:08 +02:00
Christian Muehlhaeuser ab65f2391f
Bump bubbletea dependency for examples & tutorials 2021-04-03 02:03:23 +02:00
Christian Muehlhaeuser 72ce94f47d
Bump termenv to v0.8.1 2021-04-03 01:43:33 +02:00
Christian Rocha 9d89d162c2 Clear the bottom line before exiting 2021-03-18 13:10:32 -04:00
Christian Rocha 9e9020afce Fix typo in Glamour example 2021-03-18 13:10:15 -04:00
Christian Rocha 5d54a46124
Fix the build badge again
This is why we do PRs first
2021-03-18 12:36:25 -04:00
Christian Rocha 9bc82e4ce6
Whoops, use the Bubble Tea workflow badge instead of Glow's 2021-03-18 12:33:54 -04:00
Christian Muehlhaeuser a72db29ae0 Mutex protect buffer access in standard renderer 2021-03-13 04:31:34 +01:00
Christian Muehlhaeuser ac28669943
Enable golint as linter 2021-03-12 02:19:09 +01:00
Christian Muehlhaeuser f981b991c0 Fix ineffectual assignment in spinner example 2021-03-12 02:17:27 +01:00
Christian Muehlhaeuser b6c7f93d9a Fix various typos in examples 2021-03-12 02:16:41 +01:00
Christian Muehlhaeuser d2c1d9bfb0 Omit unhandled error 2021-03-12 01:25:54 +01:00
Christian Muehlhaeuser b664dee939 Fix typo 2021-03-12 01:24:38 +01:00
Christian Rocha 231fa2cb73
Make altscreen demo slightly fancier 2021-03-11 15:15:08 -05:00
Christian Rocha 01878b5650
Make tui-daemon-combo demo look a little more enticing 2021-03-11 15:03:52 -05:00
Christian Rocha a87e82a3e8
Bump Bubble Tea and Termenv dependencies in examples 2021-03-11 15:03:25 -05:00
Christian Rocha c310475b99
Add Gembro to list of things made with Bubble Tea 2021-03-11 10:15:27 -05:00
Kiyon 7621fad279 Add item for Bubble Tea in the Wild section 2021-03-09 03:52:23 +01:00
Kiyon ac36017f86 WithOutput option should take io.Writer as argument. 2021-03-09 03:51:34 +01:00
Christian Rocha 65e8067a82 Implement String() on type Key and make key constants type KeyType 2021-03-08 19:11:02 -05:00
kiyon 86b93a31c0
Add commands for toggling the altscreen (#62)
* Add commands EnterAltScreen and ExitAltScreen for toggling the altscreen
* Add altscreen toggling example
* ignore .idea

Co-authored-by: Christian Rocha <christian@rocha.is>
2021-03-08 12:48:34 -05:00