Skip to content

Conversation

@rainersigwald
Copy link
Member

@rainersigwald rainersigwald commented Jul 19, 2023

Right-justify target and duration. To do this, I changed the localization mechanism for in-progress targets to be a bit less flexible at the translation level (the order is now fixed in code), but that allows determining a bunch of per-message length characteristics, unlocking right-justification and context-aware truncation.

right-justified-gnome-terminal

right-justified-max-width

@rainersigwald rainersigwald requested a review from baronfel July 19, 2023 22:24
@rainersigwald rainersigwald force-pushed the right-justify branch 3 times, most recently from a5bde06 to 2faecf2 Compare August 1, 2023 17:49
@rainersigwald rainersigwald added this to the VS 17.9 milestone Sep 19, 2023
@rainersigwald rainersigwald marked this pull request as ready for review October 30, 2023 20:46
Copy link
Member

@baronfel baronfel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this - the UX has got my thumbs up.

Instead of the rendered string, with its invisible control characters.
I wanted control over equality, and we don't need the auto-generated stuff.
Move cursor right (it stops at end of line), then back to justify the
output. This makes the localization less flexible since the formatting +
justification is handled in code, but makes it a lot easier to
understand. In the future reordering in translations would need to be
handled fairly carefully.

Avoid a bunch of overwrite problems by simplifiying the
should-we-do-a-fancy-overwrite decision to "is just time tick" or "just
overwrite it all".
@YuliiaKovalova
Copy link
Member

Looks good !

@rokonec rokonec self-assigned this Dec 6, 2023
@rokonec rokonec assigned rainersigwald and unassigned rokonec Dec 11, 2023
@rainersigwald rainersigwald merged commit 23b938b into dotnet:main Dec 11, 2023
@rainersigwald rainersigwald deleted the right-justify branch December 11, 2023 16:27
@rainersigwald rainersigwald restored the right-justify branch December 13, 2023 15:54
@rainersigwald rainersigwald deleted the right-justify branch December 13, 2023 16:59
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.

5 participants