-
Notifications
You must be signed in to change notification settings - Fork 178
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 #454 overflowing of song title #529
Conversation
It is now possible to adjust the width of the three sections in the library view.
Added a check to make sure that album_width + playlist_width isn't too large.
Change code back to simply error instead of catching the error and setting defaults.
* Use BufReader/BufWriter for data from file cache * formatting --------- Co-authored-by: user <puh@p> Co-authored-by: Thang Pham <phamducthang1234@gmail.com>
There is now a section which will contain all of the layout config options.
Add a section detailing the configuration for the layout options.
Clean up of code and removal of clippy errors
Fix aome510#454 by splitting the metadata text and the "title" text into two different rects. This means that the title text being cut off to long won't cause the metadata text to overflow outside the viewport. This does however mean that the `playback_format` config option should no longer contain the `{metadata}` placeholder. BREAKING CHANGE: removed `{metadata}` from `playback_format`
Why is this the case? I thought you can create an upstream PR from a branch in your fork. Separate two PRs gonna make reviewing easier unless two PRs are strictly dependent |
Remove old config options, which should previously already have been removed.
Remove text that accidentally showed up when resolving merge conflicts on github.
I thought the overflow can be fixed by increasing |
The title should simply be truncated if it can't fit fully. The official spotify client 'wraps' the title by moving it from left to right, but i don't believe that will be possible here. |
Could you squash your commits? |
truncating can be done by disabling wrapping when rendering the playback info.
|
Yes, however this would mean also cutting off the metadata info and what's if some people would rather have the text wrap so they can actually read it.
The problem with this is that some people have their metadata at the bottom of the playback window. When the text now wraps the metadata disappears. vs Adding a separate rect for the metadata would fix this. It would mean that the title / album / artist wrapping wouldn't affect the position of the metadata.
This can be done by simply setting |
Yes, but why? Since the commits get squashed when merged into main it makes seems to me there is no difference once the PR is merged. Why would you like me to squash them? |
I don't see how this can happen. The whole playback info is constructed as a single paragraph widget. Wrapping in one line shouldn't affect others. See the below picture, title line is wrapped but it doesn't affect other lines. @apprehensions' problem in the original issue happened because of the wrapping as he used spaces to represent paddings between playback section and cover image section, which doesn't work with text wrap. My suggestion is just simply disabling wrapping, then no overflowing issue will happen. However, I can see that text wrapping can be convenient feature for some people. |
I'm not entirely sure what you mean by "affect", but what happens to me is that when the title line wraps it now takes up two lines, which means the line for the metadata is now no longer visible, because it is pushed down a line. Here is my config for reference: playback_format = """
{track} • {album} • {artists}
{metadata}"""
playback_window_height = 6 |
Can you try replacing whitespace with newline ( |
Same thing happens. This is the new config. playback_format = """{track} • {album} • {artists}\n\n\n\n{metadata}""" |
Ah I see, it's because you add extra lines to push the metadata to the end. Therefore, it's expected for the metadata part to be moved outside the view upon overflowing. |
Let's disable wrapping then. It's much simpler and will also resolve your problem. |
Yup.
I can implement this if you like, but since we can achieve the same with setting the |
I don't like separating |
Fair point. I'll go ahead and change the code to turn off wrapping. |
This PR needs to be merged after #482resolvedFix #454 by splitting the metadata text and the "title" text into two
different rects. This means that the title text being cut off to long
won't cause the metadata text to overflow outside the viewport.
This does however mean that the
playback_format
config option shouldno longer contain the
{metadata}
placeholder.