refactor: Colors and Improved Formatting of Responses#13
Merged
Conversation
Replaces direct fmt print statements in command files with new functions from internal/ui/format.go for consistent colored and emoji-enhanced output. Adds internal/ui/format.go, which provides color constants, emoji constants, and utility functions for printing success, error, warning, info, muted messages, separators, and formatted durations. This improves the user experience with clearer, visually distinct CLI feedback and centralizes output formatting logic.
Replaces 'Estimated Earnings' with 'Earnings' in output messages for consistency and clarity across manual and stats commands.
This file contains hidden or 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
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.
Pull Request Checklist
mainbranch of tmpo.Description
This pull request refactors the user interface output for several CLI commands by replacing direct
fmtprint statements with standardized helper functions from the newuipackage. This change ensures consistent formatting, improved readability, and better user experience across commands likeinit,log,manual,start,export, andstats.The most important changes are:
User Interface Standardization:
fmt-based output and error handling incmd/init.go,cmd/log.go,cmd/manual.go,cmd/start.go,cmd/export.go, andcmd/stats.gowith calls to the newuipackage functions such asPrintError,PrintSuccess,PrintWarning,PrintInfo,PrintMuted,PrintSeparator,NewlineAbove, andNewlineBelow. This includes error messages, warnings, info, and success messages, as well as formatting for durations and muted text. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25]Command Output Improvements:
Codebase Consistency:
uipackage. [1] [2] [3] [4] [5] [6]These changes make the CLI output more user-friendly and maintainable by centralizing formatting logic and improving consistency across commands.
Screenshots
N/A