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

Fixes #3418. TextFormatter bugs. #3429

Closed
wants to merge 10 commits into from

Conversation

BDisp
Copy link
Collaborator

@BDisp BDisp commented Apr 23, 2024

Fixes

Proposed Changes/Todos

  • Fix somes bugs on calling GetWidestLineLength method
  • Allowing resetting alignments when justify checkbox is checked on the TextAlignmentsAndDirections scenario
  • Add unit tests for multiline justified horizontal and vertical

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
  • My code follows the Terminal.Gui library design guidelines
  • I ran dotnet test before commit
  • I have made corresponding changes to the API documentation (using /// style comments)
  • My changes generate no new warnings
  • I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working

@BDisp BDisp requested a review from tig as a code owner April 23, 2024 11:36
@BDisp BDisp marked this pull request as draft April 23, 2024 20:07
@BDisp BDisp marked this pull request as ready for review April 23, 2024 23:20
@BDisp BDisp marked this pull request as draft April 24, 2024 10:40
@BDisp
Copy link
Collaborator Author

BDisp commented Apr 24, 2024

Horizontal:

image

Vertical:

image

Horizontal Justified:

image

Vertical Justified:

image

Horizontal without wrap:

image

Vertical without wrap:

image

Horizontal with wrap:

image

Vertical with wrap:

image

Horizontal Justified with wrap:

image

Vertical Justified with wrap:

image

Horizontal with wrap and 2 lines:

image

Vertical with wrap and 2 lines:

image

The horizontal and vertical justified behavior with word wrap is considered the left and top alignments respectively, for obvious reason, of course.

@BDisp BDisp marked this pull request as ready for review April 24, 2024 14:32
@tig tig mentioned this pull request Apr 27, 2024
@BDisp
Copy link
Collaborator Author

BDisp commented Apr 27, 2024

@tig I fixed the issue you mentioned on the #3418 (comment). Maybe it help you with your PR. Cheers.

@BDisp
Copy link
Collaborator Author

BDisp commented Apr 28, 2024

I already have this working well here and I'll submit a PR to your branch #3416 after I reviewed it.

WindowsTerminal_AvaMFFJYwT

@BDisp
Copy link
Collaborator Author

BDisp commented Apr 28, 2024

@tig shouldn't labels respect new lines? Or am I mistaken? Notice that there is a new line between the two words.

image

@tig
Copy link
Collaborator

tig commented Apr 28, 2024

Yes, if Text has new lines in it, they should be respected.

@tig
Copy link
Collaborator

tig commented Apr 29, 2024

I am not going to spend any time looking at this PR.

If you want to continue to use it, please mark it as draft.

@BDisp BDisp closed this Apr 29, 2024
@BDisp BDisp deleted the v2_textformatter-bugs-fix_3418 branch April 29, 2024 15:31
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.

None yet

2 participants