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

Fix artist name alignment when track name too long #16

Merged

Conversation

dbkosky
Copy link
Contributor

@dbkosky dbkosky commented Oct 15, 2020

Found a quick solution to issue #11.
The condition is not met when the song title is too long and has to be truncated.
This way, all songs titles are appended with at least one space.

@ceuk
Copy link
Owner

ceuk commented Oct 15, 2020

Hey, this was a good fix, but I noticed when testing that there was a space between the end of the track text and the ellipses which looked a bit weird, so I did a bit of digging and realised I could just increase the amount of characters removed by the truncate function by 1 and it fixed it without introducing the space. Thanks for the work :)

@ceuk ceuk merged commit 0153d70 into ceuk:master Oct 15, 2020
@dbkosky
Copy link
Contributor Author

dbkosky commented Oct 15, 2020

ah good idea! Glad to help

@dbkosky
Copy link
Contributor Author

dbkosky commented Oct 15, 2020

I'm going to put this here because I'm not sure that it merits a new issue, but the update seems to have this behaviour

spotui-text-alignment-min
spotui-text-alignment-mid
spotui-text-alignment-max

I think it's happening when the song name is exactly equal to max length, otherwise formatting is correct.
Not sure if it was worth bringing to your attention though, ignore at will! 😄

@dbkosky
Copy link
Contributor Author

dbkosky commented Oct 15, 2020

not really worth its own PR, but I found that changing len(text) > max_length to len(text) >= max_length in the truncate function fixed this behaviour

@ceuk
Copy link
Owner

ceuk commented Oct 15, 2020

Cheers @dbkosky will push a fix now, what an annoying edge case :)

@dbkosky
Copy link
Contributor Author

dbkosky commented Oct 15, 2020

Ah I'm glad it's resolved, yeah it's a little pesky. Loving the app though 👍

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