Fix table line-breaking for narrow terminals - Closes #15Fix table line-breaking for narrow terminals - Closes #15Fix table line-breaking for narrow terminals - Closes #15Fix table line-breaking for narrow terminals - Closes #15Feature/line breaking issue 15 #39
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.
Summary
This PR addresses issue #15 by implementing smart table line-breaking utilities to improve CLI table display in narrow terminals.
Changes Made
1. Added Text Wrapping Utilities (
good_first_issues/utils/__init__.py)wrap_text_for_table(): Intelligent text wrapping at word boundaries with ellipsis truncation for extremely long words/URLsformat_issues_for_display(): Format issue lists with configurable column widths for better table display2. Updated Search Command (
good_first_issues/commands/search.py)tabulate3. Comprehensive Test Suite (
tests/test_utils.py)format_issues_for_display()functionality with custom widthsExamples
Before (issue description scenario):
After (with smart wrapping):
Features
Testing
All existing tests pass. Added 15+ new test methods covering:
Closes #15
This implementation fully addresses the table formatting issue described in #15, providing a robust solution for displaying issue data in narrow terminal environments while maintaining readability and functionality.