Skip to content

feat: New log and spinner feature#181

Closed
epsjunior wants to merge 3 commits intomainfrom
new-log-and-spinner
Closed

feat: New log and spinner feature#181
epsjunior wants to merge 3 commits intomainfrom
new-log-and-spinner

Conversation

@epsjunior
Copy link
Contributor

@epsjunior epsjunior commented Feb 14, 2025

Refactor: Introduce BaseAction with Improved Logging and UI Feedback

Summary

As discussed on Slack, this PR does not include contract actions. it introduces a new BaseAction class to enhance logging, improve CLI feedback, and standardize spinner and progress bar handling across commands.

Key Changes

  • ImprovedBaseAction class

    • Integrated Ora for spinners and progress bars
    • Integrated Chalk for consistent and readable CLI output
    • Standardized logging across all CLI actions
  • Did not use charm.sh libraries

    • charm.sh does not provide native TypeScript support or type definitions
    • Requires calling external commands instead of direct integration
    • Opted for Ora and Chalk, which are the recommended libraries for TypeScript projects
  • Refactored multiple CLI commands to extend BaseAction

    • Applied UI improvements to validators, stop, keygen, config, and update commands
    • In update, reduced excessive progress messages by displaying only a progress bar followed by success/failure messages

Next Steps

  • Plan to extend BaseAction to more commands (init, up) (needs refactoring)
  • Will discuss potential genlayer-js client improvements during Monday’s planning

@cristiam86 cristiam86 self-requested a review February 17, 2025 13:27
@epsjunior epsjunior closed this Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant