From 6a88c0fc4e5f1dda848b469a57a97e6762d65eb1 Mon Sep 17 00:00:00 2001 From: Liam Stanley Date: Tue, 19 Jul 2022 18:33:51 -0400 Subject: [PATCH] feat: add bubblezone to readme (closes #368) (#372) * feat: add bubblezone to readme (closes #368) - also fixed a handful of grammar-related items in the readme. Signed-off-by: Liam Stanley * chore: promote BubbleZone to main resource section Co-authored-by: Christian Rocha --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9f437f6..e015b72 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ This tutorial assumes you have a working knowledge of Go. ## Enough! Let's get to it. -For this tutorial we're making a shopping list. +For this tutorial, we're making a shopping list. To start we'll define our package and import some libraries. Our only external import will be the Bubble Tea library, which we'll call `tea` for short. @@ -88,8 +88,8 @@ type model struct { ## Initialization -Next we’ll define our application’s initial state. In this case we’re defining -a function to return our initial model, however we could just as easily define +Next, we’ll define our application’s initial state. In this case, we’re defining +a function to return our initial model, however, we could just as easily define the initial model as a variable elsewhere, too. ```go @@ -106,8 +106,8 @@ func initialModel() model { } ``` -Next we define the `Init` method. `Init` can return a `Cmd` that could perform -some initial I/O. For now, we don't need to do any I/O, so for the command +Next, we define the `Init` method. `Init` can return a `Cmd` that could perform +some initial I/O. For now, we don't need to do any I/O, so for the command, we'll just return `nil`, which translates to "no command." ```go @@ -188,7 +188,7 @@ the Bubble Tea runtime to quit, exiting the program. ## The View Method At last, it’s time to render our UI. Of all the methods, the view is the -simplest. We look at the model in it's current state and use it to return +simplest. We look at the model in its current state and use it to return a `string`. That string is our UI! Because the view describes the entire UI of your application, you don’t have to @@ -277,15 +277,20 @@ actually watch out what address the first `dlv` run tells you to connect to. * [Bubbles][bubbles]: Common Bubble Tea components such as text inputs, viewports, spinners and so on * [Lip Gloss][lipgloss]: Style, format and layout tools for terminal applications * [Harmonica][harmonica]: A spring animation library for smooth, natural motion +* [BubbleZone][bubblezone]: Easy mouse event tracking for Bubble Tea components * [Termenv][termenv]: Advanced ANSI styling for terminal applications * [Reflow][reflow]: Advanced ANSI-aware methods for working with text [bubbles]: https://github.com/charmbracelet/bubbles [lipgloss]: https://github.com/charmbracelet/lipgloss [harmonica]: https://github.com/charmbracelet/harmonica +[bubblezone]: https://twitter.com/charmcli/status/1541772151660761088https://github.com/lrstanley/bubblezone [termenv]: https://github.com/muesli/termenv [reflow]: https://github.com/muesli/reflow +## Additional utility libraries to use with Bubble Tea + + ## Bubble Tea in the Wild For some Bubble Tea programs in production, see: