-
Notifications
You must be signed in to change notification settings - Fork 557
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This model renders the ongoing status event, the past events and other non status events.
This changeset implements the starting view, which is the first of two views that will be displayed by the serve command.
This option is required to be able to use the session and event bus during the UI refactor.
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.
…/serve-command-ui
aljo242
reviewed
Dec 1, 2022
aljo242
previously approved these changes
Dec 1, 2022
tbruyelle
reviewed
Dec 1, 2022
tbruyelle
previously approved these changes
Dec 1, 2022
There was a problem hiding this 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 :)
…/serve-command-ui
Co-authored-by: Thomas Bruyelle <[email protected]>
tbruyelle
approved these changes
Dec 1, 2022
aljo242
approved these changes
Dec 1, 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #2458