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

feat: redesign chain serve output #3014

Merged
merged 72 commits into from
Dec 2, 2022
Merged

feat: redesign chain serve output #3014

merged 72 commits into from
Dec 2, 2022

Conversation

jeronimoalbi
Copy link
Member

Resolves #2458

@jeronimoalbi jeronimoalbi added the type:new To implement new feature. label Oct 28, 2022
@jeronimoalbi jeronimoalbi self-assigned this Oct 28, 2022
@jeronimoalbi jeronimoalbi marked this pull request as draft October 28, 2022 09:49
aljo242
aljo242 previously approved these changes Dec 1, 2022
tbruyelle
tbruyelle previously approved these changes Dec 1, 2022
Copy link
Contributor

@tbruyelle tbruyelle left a comment

Choose a reason for hiding this comment

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

WOW it's even more glossy now, well done :)

@jeronimoalbi jeronimoalbi dismissed stale reviews from tbruyelle and aljo242 via 6ee7997 December 1, 2022 17:45
@jeronimoalbi jeronimoalbi requested a review from Pantani as a code owner December 2, 2022 08:30
@jeronimoalbi jeronimoalbi merged commit 0c06ee5 into main Dec 2, 2022
@jeronimoalbi jeronimoalbi deleted the feat/serve-command-ui branch December 2, 2022 08:45
@aljo242 aljo242 added this to the v0.26.0 milestone Dec 13, 2022
Jchicode pushed a commit to Jchicode/cli that referenced this pull request Aug 9, 2023
* chore: add bubbletea and related dependencies

* chore(pkg/cliui): add lipgloss style for faint text

* feat(pkg/cliui): add events model

This model renders the ongoing status event, the past events and other
non status events.

* chore: add event progress status update

* refactor: update chain to use status update events

* chore: updated variables to be constants

* chore: fix linting issue

* refactor: change serve to use bubbletea to render the view

This changeset implements the starting view, which is the first of two
views that will be displayed by the serve command.

* chore: add stopped message on exit

* refactor(pkg/cliui): rename model Events to StatusEvents

* feat: add running view to serve command

* feat: add `IgnoreEvents` option to session

This option is required to be able to use the session and event bus
during the UI refactor.

* feat: add formatting function for model views

* refactor: add gracefull quit support to the new serve command UI

* refactor: change the style used to display accounts and mnemonics

* feat: print binary and data dir paths in serve command

* chore: remove redundant binary path definition

* feat(pkg/events): add event grouping support

* refactor: add bottom spinner to events model and improve UI

* refactor: change serve to handle refresh errors

Once serve command starts successfully it tracks code changes and if the
code has errors it displays the error and waits for a fix. This
changesets adds support to the view for that case.

* fix: chain serve command

* refactor: chage chain serve model to improve code

* chore: change key validation to check strings values

* refactor: move model definitions to a cmd sub package

* chore: add code documentation and small improvements

* fix: change session to work in verbose mode

Verbose mode output was wrong because of the session spinner. This
change disables the spinner when verbose mode is enabled.

* refactor: change serve command to support verbose mode

Verbose mode disables the UI and instead display the events output
directly using the session and a custom prefix.

* chore: update changelog

* ci: fix linting issue

* fix: change xexec.ResolveAbsPath to always return a path

* fix: change events indication constants to start from 0

* refactor: add model spinner that matches the existing spinner

* test: add tests for cliui event model views

* chore: update dummy events provider in cliui model tests

* chore: add initialization event to chain serve command

* chore: change accountview to wrap mnemonics

* refactor: change chain serve command to display keyring accounts

* test: add chain serve model view tests

* chore: review corrections

* chore: remove EOL constant

* chore: fix issue with the first event duration of rebuild view

* refactor: improve chain serve command handler implementation

Co-authored-by: Thomas Bruyelle <[email protected]>

* refactor: remove base command model type

* chore: update code documentation

* refactor: simplify/clean event message processing

* refactor: code improvements

* refactor: correct color style definitions

* chore: change `cmd/model` to use testdata instead of helpers file

* chore(cliui): remove `styles` package to favor `colors` package

* chore: change error check to use `errors.As`

Co-authored-by: Thomas Bruyelle <[email protected]>

* chore: wrap error messages to 80 characters

Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Thomas Bruyelle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:new To implement new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redesign chain serve output with bubbletea
4 participants