Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[new release] minttea (3 packages) (0.0.3) #25273

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

leostera
Copy link
Contributor

@leostera leostera commented Feb 16, 2024

A fun, functional, and stateful way to build terminal apps in OCaml heavily inspired by Go's BubbleTea

CHANGES:

0.0.3

Mint Tea

  • Upgrade to Riot 0.0.8 – this release brings stability fixes, performance
    fixes, and includes new microsecond resolution timers.

  • Add better trace logs

  • Make sure we restore and show the cursor on exit

  • Fix bug where alt-screen rendering cleaned extra lines - thanks @jmcavanillas 👏

  • Small doc fixes – thanks @sam-huckaby

Spices

  • Expose color type as Tty.Color.t for more flexibility and supporting fallback
    colors

  • Implement rendering of padding – thanks @wonbyte 🚀

Leaves

  • Add new Virtualized Table component with support for columns and moving a
    cursor around – thanks @sabine 🧡

  • Progress bar now defaults color to gray if the terminal profile isn't
    supported

  • Progress bar now can toggle the percentage number – thanks @wesleimp 🌈

CHANGES:

## 0.0.3

#### Mint Tea

* Upgrade to Riot 0.0.8 – this release brings stability fixes, performance
  fixes, and includes new microsecond resolution timers.

* Add better trace logs

* Make sure we restore and show the cursor on exit

* Fix bug where alt-screen rendering cleaned extra lines - thanks @jmcavanillas 👏

* Small doc fixes – thanks @sam-huckaby ✨

#### Spices

* Expose color type as Tty.Color.t for more flexibility and supporting fallback
  colors

* Implement rendering of padding – thanks @wonbyte 🚀

#### Leaves

* Add new Virtualized Table component with support for columns and moving a
  cursor around – thanks @sabine 🧡

* Progress bar now defaults color to gray if the terminal profile isn't
  supported

* Progress bar now can toggle the percentage number – thanks @wesleimp 🌈

## 0.0.2

#### Mint Tea

* Add support for custom events – any Riot message sent to a Mint Tea app will
  become an `Event.Custom msg` event, which enables sending data into TUIs from
  other processes.

* Add `key` type for key down events – this means we now get better
  discoverability of what key down events we can match on, and its easier to
  keep examples working

* Capture more key events: arrows (left,down,up,right), backspace, space,
  enter, escape.

* Move `initial_state` to the application start invocation – you can now run
  your app with multiple initial states, which makes it ideal for starting apps
  in the middle of other flows, or to test specific scenarios.

* Fix bug where TTY was not restored from RAW mode during normal shutdown.

* Now the `Event.Frame time` event includes the frame time, and all examples
  are updated to work with it.

* Add new `Hide_cursor` and `Show_cursor` commands, and always restore the
  cursor to visible on exit

#### Leaves

* New `Leaves.Fps` to specify a frame rate and cap updates at that rate (Thanks
  to @sabine)

* New `Leaves.Sprite` module to create frame-based animations that are ticked
  at a specific frame-rate (Thanks to @sabine)

* New `Leaves.Spinner` contains several spinners ready to be used in
  applications (Thanks to @sabine)

* New `Leaves.Text_input` field ready to be used in applications (Thanks to
  @lessp_)

* New `Leaves.Cursor` that can be used to highlight where the cursor is in a
  given text (Thanks to @nguermond)

* Reworked `Leaves.Progress` to support plain and gradient progress bars with
  customizable empty/full/trail characters, and to fit right into the
  make/update/view pattern.

#### Spices

* Implemented support for gradients between two RGB colors

#### Examples

* New Spinners example showcasing several spinners (Thanks to @sabine)

* New Emojis game example showcasing a tilemap and moving a player around

* New Basic example for the README tutorial

* New Progress bars examples showcasing plain, gradient, and emoji progress bars

* New Text input field example (Thanks to @lessp_)

* Updated other examples to use the new progress bars

#### Docs

* New tutorial starting from zero and building a small shopping list app
  (Thanks to @metame)

## 0.0.1

Initial release for the 3 packages.

#### MintTea

* Let people create TUI apps using The-Elm-Architecture
* Introduce basic events for KeyDown, Frame, and Timers
* Introduce basic commands for setting timers, entering/exiting the AltScreen, exiting, and sequencing commands

#### Examples

* Add `views` example showcasing an application with multiples sections
* Add `altscreen-toggle` example to showcase the AltScreen
* Add `fullscreen` example with a timer
* Add `stopwatch` example
* Add `fps` counter example

#### Spices

* Introduce `color` and `style`
* Support basic styles (bold, italic, underscore, etc) and layouting (padding)

#### Leaves

* Add a Checkbox leaf
* Add a Progress bar leaf
@dinosaure
Copy link
Contributor

The distribution is broken, spices requires minttea. Can you fix that?

@leostera leostera marked this pull request as draft February 19, 2024 16:12
@mseri
Copy link
Member

mseri commented Feb 20, 2024

Seems to be ready for merge to me. @leostera can I undraft or you are planning changes?

@leostera leostera marked this pull request as ready for review February 21, 2024 10:46
@leostera
Copy link
Contributor Author

Thanks @mseri 🙏🏼 GOAT as usual!

I think I just need to fix #25201 before we can merge this since Mint Tea 0.0.3 uses Riot 0.0.8

@mseri
Copy link
Member

mseri commented Feb 21, 2024

Thanks, I had overlooked that only spices had built and all the rest was skipped. Let's wait for riot then, thanks!

"riot" {= "0.0.8"}
"mdx" {with-test & >= "2.3.1"}
"tty" {>= "0.0.2"}
"uuseg"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"uuseg"
"uuseg" {>= "15.1.0"}

Due to the use of Uuseg_string

@mseri
Copy link
Member

mseri commented Mar 5, 2024

minttea and leaves tests are failing with unclear errors:

#=== ERROR while compiling minttea.0.0.3 ======================================#
# context              2.2.0~beta2~dev | linux/x86_64 | ocaml-base-compiler.5.1.1 | pinned(https://github.com/leostera/minttea/releases/download/0.0.3/minttea-0.0.3.tbz)
# path                 ~/.opam/5.1/.opam-switch/build/minttea.0.0.3
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p minttea -j 39 @install @runtest
# exit-code            1
# env-file             ~/.opam/log/minttea-7-261c61.env
# output-file          ~/.opam/log/minttea-7-261c61.out
### output ###
# File "dune", line 1, characters 0-26:
# 1 | (mdx
# 2 |  (libraries minttea))
# (cd _build/default && ./mdx_gen.bc README.md) > _build/default/.mdx/README.md.corrected
# Command exited with code 1.

and for leaves it just wants to produce an empty readme...

@leostera leostera marked this pull request as draft March 6, 2024 13:15
@samoht
Copy link
Member

samoht commented Apr 2, 2024

@leostera ping - do you understand why the minttea tests are failing in the CI?

@leostera
Copy link
Contributor Author

leostera commented Apr 2, 2024

Yup! Just haven’t found time to fix them. We also fixed a few more things in Riot that we may want to release before Minttea 0.0.3 to improve stability and CPU usage considerably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants