Skip to content

Conversation

@Kami
Copy link
Contributor

@Kami Kami commented Feb 17, 2020

This pull request makes maximum length values which are used for truncating long executable names in the sidebar in the Changes, Timeline and Comparison views configurable.

Right now those default to relatively small values which means that names might get truncated too early which may make those executable names indistinguishable at a glance when the same common prefix is used for all the executable names (e.g. ``Python 2.7.17 - conf 1, Python 2.7.17 - conf 2, etc. - in this scenarios, last part which is the unique would would get truncated).

I know there are other ways around that (e.g. not having a common prefix, etc.), but I still think it doesn't hurt to make those limits user configurable.

Another potentially complementary change would also be allowing user to decide how to truncate executable names - e.g. truncate at the end (current behavior) or in the middle (potential new behavior).

Kami added 2 commits February 17, 2020 19:47
the Executable sidebar in the Changes, Timeline and Comparision views
configurable.

This comes handy in scenarios where longer executable names are used
(in such scenarios, names might be truncated which makes executable
indistinguishable at a glance).
for it.

This way it's easier to test those functions and also gives us more
flexibility to introduce different truncating mechanism (e.g. truncate
in the middle instead of at the end).
@Kami
Copy link
Contributor Author

Kami commented Feb 17, 2020

Refactored it into utility function (to make it easier to test and give us more flexibility with truncation algorithms in the future) and added tests in 36007a0.

Copy link
Owner

@tobami tobami left a comment

Choose a reason for hiding this comment

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

Cool, thanks for the polish

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.

2 participants