-
Notifications
You must be signed in to change notification settings - Fork 6
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
[Request] Add some kind of heuristic for shortening names displayed on the Winger button #27
Comments
Hi @supersaiyansubtlety, user-defined regex for button badge text is in v2.8.0! It's just that at the moment, plus sample regex added in the help page. Also an emoji handling setting. Nothing complicated like heuristics, particularly name-fit checking - that's harder to do than it sounds. Let me know what you think. |
Awesome, thanks! This pattern is working pretty well for me: A couple things though:
For example my pattern above only gets one character for single-word labels that are longer than 3 characters. With this (gross hack): I could make it so that labels with only one word would instead get truncated to their first 3 letters |
Wow what does this do? :)
You're right, good catch. But for now wouldn't a conditional
Yeah we probably want that, will look into it.
Sorry if I didn't understand but my first thought here is that truncating anything to the first few letters doesn't seem necessary since the badge by design does that anyway. |
The first part makes it so if there are 3 or fewer characters, they're all kept.
yeah that works
The point of that regex is to make exceptions for multiple words which is done in the middle part. |
The Winger button can only actually display the first few characters of a name; I'd love a way to automatically shorten them.
Ideas:
Since the heuristic has to match the user's naming conventions, I think regex is especially useful for its flexibility.
Since regex is complicated, I think some predefined heuristics could also be useful.
(none of the heuristics would be applied if the whole name fits)
The text was updated successfully, but these errors were encountered: