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

marquee text #754

Open
wants to merge 40 commits into
base: redesign
Choose a base branch
from
Open

marquee text #754

wants to merge 40 commits into from

Conversation

Decimate1405
Copy link

Implemented marquee text in song menu for overflow, instead of two lines

@Chaphasilor
Copy link
Collaborator

Hey, thanks for the PR. Sorry for not responding sooner, but I'll take a look now.
I'm not a huge fan of scrolling text myself but I'm happy with making this configurable via a setting.
Is there a particular reason why you didn't use an existing package, like marquee? There is also an existing solution (without a PR so far) at https://github.com/Ivanf1/finamp/tree/marquee that implements this for the player screen as a fallback if the two lines are not enough.

If you could update this PR to behave in a similar way (using up to two lines by default, and then switching to scrolling text) that would be nice. If you don't like the line break and would like to always keep it at a single line, that could be added through a setting!

Also, it seems like you removed the track title on the player screen?

@Decimate1405
Copy link
Author

Hey, thank you for the response. I tried using marquee package but it was giving an error during import (some conflict with fading_edge_scrollview package) that's why I implemented it myself. I think adding it as a setting would be really nice as it would accommodate for everyone's needs. Regarding the title being removed from the player screen, looks like I accidentally forgot to remove the comment.

@Decimate1405
Copy link
Author

added a toggle to switch between 1 or 2 lines of song title, defaults to 2. its under Player settings.

@Chaphasilor
Copy link
Collaborator

Okay, thanks for the changes. There's still a lot of commented-out code, that should be removed.
Could you also try integrating the marquee package again, instead of using the custom implementation? Or is there a specific benefit to your implementation?

@Decimate1405
Copy link
Author

Decimate1405 commented May 31, 2024

There's no specific benefit to using my implementation. I couldn't fix the errors i was getting while using the marquee package so i got fed up and implemented it myself. I'll give it another go

@Decimate1405
Copy link
Author

This is the error I keep getting when I use the marquee package in the now playing bar.
Screenshot 2024-05-31 at 2 47 03 PM

@Chaphasilor
Copy link
Collaborator

Try adding the override from MarcelGarus/marquee#98 (comment) in pubspec.yaml :)

…that's a temp fix for marquee after flutter 3.2.2
@Decimate1405
Copy link
Author

changed it to use the marquee package, still defaults to 2 lines

@Chaphasilor
Copy link
Collaborator

Appreciate the effort! Those changes sound good.

Let me know when I should try this out!

@Decimate1405
Copy link
Author

its working, you can try it now :)

@Chaphasilor
Copy link
Collaborator

Okay, took a look at the changes just now, here's what I noticed:

Marquee text color on the now playing bar doesn't adapt to the theme:
image

If a marquee isn't needed, the fallback isn't using the BalancedText widget:
image
Here's what it should look like:
image

With the one line marquee enabled, even non-overflowing text uses a marquee on the player screen:
image

The marquee should probably also be used in the queue list:
image
(code is very similar, so it should be easy to add)

And maybe also in the track menu:
image

And finally, one suggestion. Do you think you could add a mask to the marquee on the player screen, so that it fades out at the sides instead of simply being cut off? You can take a look at the headers within the queue list as an example. Here's what I mean:
image

Overall, the change is nice, and once the kinks are ironed out, I believe this will be an awesome new feature!
I'll probably add a commit that updated the settings title and descriptions to be a bit clearer, but that's it :)

@Chaphasilor
Copy link
Collaborator

@Decimate1405 I can resolve the conflicts and merge the PRs if you're busy. Just need your OK!

@Decimate1405
Copy link
Author

Hey @Chaphasilor ! Sorry I have been busy with things in personal life that I haven't been able to complete it, I still have to implement the default ellipses functionality and fix the centering a bit. I can complete it in the next 2 weeks and try to solve the merge conflicts as well

@Chaphasilor
Copy link
Collaborator

@Decimate1405 no worries! I just wanted to make sure the work you put into this will end up being used 😁
If you can finish it (at some point) that would be nice, but if you can't get to it, just let me know ^^

@Chaphasilor Chaphasilor added the awaiting response / stale Issue is possibly outdated or waiting for user feedback label Jan 4, 2025
@Decimate1405
Copy link
Author

Hey @Chaphasilor! It's been longer than I said it would take 😅, but I made the changes mentioned:

  1. Marquee text formatting is same whether title is single or double lines
    image
    image
    image
  2. Added a toggle in customization menu that will allow user to force truncate title in player screen if they don't like marquee, both the settings can be toggled on, this will make the title in miniplayer use the marquee effect while truncating it in the player screen
    image

Let me know if any more changes are needed, i'll fix it immediately 🫡

@Chaphasilor
Copy link
Collaborator

Hey, I thought I wouldn't hear from you again, so seeing your comment is awesome!

I'l have to read through the issue again to make sure everything is handled, but I think it's good enough for merging. Will take a proper look later.

One thing that you could change is the wording for the settings, the "default 2" sounds a bit strange. The descriptions for toggles should also always describe the enabled effect, so "Truncate with ellipsis instead of a scrolling marquee" or something along those lines :)

If you have time to spare, there's one more thing you could handle, but only if you feel like it:
Soms users "complained" about long artist or album names not being shown entirely. This could either be solved through a marquee/ellipsis, or by allowing the "chip" that contains the album and artist name to scretch wider than the available space, and becoming horizontally scrollable.

But since that's a little out of scope, you really don't need to do that :)

@Decimate1405
Copy link
Author

Decimate1405 commented Jan 29, 2025

Yea sure I can make those changes. For the descriptions would this be alright or should I simplify it further?
{
"oneLineMarqueeTextButton": "Single line text display",
"oneLineMarqueeTextButtonSubtitle": "Show song titles in a single scrolling line instead of two lines",

"marqueeOrTruncateButton": "Use ellipsis for long titles",
"marqueeOrTruncateButtonSubtitle": "Show ... at the end of long titles instead of scrolling text"
}

I'll give the long artist / album names a try

@Decimate1405
Copy link
Author

Decimate1405 commented Jan 29, 2025

Could you show an example of the problem or redirect me to wherever this issue has been discussed so I can get a better idea of what I need to implement? Right now all the long name albums I have fit perfectly in the smallest screen (4.6") I can emulate so I'm unable to reproduce it. Nevermind I found it

@Decimate1405
Copy link
Author

Implemented it, let me know if any changes are required

image

image

@Chaphasilor
Copy link
Collaborator

Okay, just from your comments so far I have some feedback:

  1. I assumed that with the oneLineMarquee setting, the marquee would be "always enabled", while with the setting disabled the marquee would only be used if the text still doesn't fit on two lines. Your new button title makes it sound like there will be no marquee at all when the setting is disabled?
    The new wording for the other setting is nice!
  2. The "chip" for the album has more padding than before, from looking at your screenshots. But it should look like before (at least if no marquee is needed).
  3. Can you try to limit the maximum width of the "chip" (or the container around it) so that it won't grow larger than the artist "chip"? Basically, take a look at the two buttons (favorite and hamburger menu) next to the artist. They should limit the size of all three info lines, the title, the artists, and the album. The space directly above and below these buttons should be empty.
    This also means that you can make the title marquee a bit wider. Take a look at the screenshots you posted in marquee text #754 (comment), the marquee start position (where the "b" of "probably" is) should be at the same distance from the left as the edge of the album chip)

I hope that is clear enough, if not I'll try to explain it again!

@Decimate1405
Copy link
Author

Decimate1405 commented Jan 30, 2025

ok so I have implemented that big album name issue
image

but I had a question for the marquee one, so right now i have two toggles:
1: switches marquee on/off - if its on then anything more than 1 line is marquee, if off then anything above 2 lines is marquee
2: switches truncate on/off - if on any number of lines if overflowed is truncated by ...

now that I look back at this I'm not even sure why I broke it into two settings. so the question is do we need these two different settings or should I just have marquee on/off toggle where on would make anything more than 1 line into marquee and and off would truncate anything that overflows. I feel like the answer is simple and just use the marquee setting for everything but I wanted to double check

ok so looking back at our convo i definitely misunderstood what you were saying and implemented two toggles for no reason 😂
#754 (comment)

@Chaphasilor
Copy link
Collaborator

I suggested the two line option. Especially on the player screen we often have enough space to statically show the entire title, but if that doesn't fit, we need to truncate or use marquee.
So the two settings aren't about on/off, but about when (how soon) overflow is handled, and how it is handled. Does that clear it up?

I can't take a proper look at the PR atm since my server died today, but hopefully I can get things up and running soon...

@Decimate1405
Copy link
Author

Decimate1405 commented Jan 30, 2025

I'm not sure I understand it completely

but if that doesn't fit, we need to truncate or use marquee

so this essentially what marquee toggle is supposed to do right? like we give the user the option whether they wanna use marquee or not, and if they choose not to then the overflow is handled by truncating it. so the "on/off" is basically the user toggling between whether they want marquee or not (truncate)

if im wrong then yea elaborating a bit more will be helpful

@Decimate1405
Copy link
Author

so this is how currently this toggle works

  1. off state
    image

image

image

  1. on state
    image

image

image

@Chaphasilor
Copy link
Collaborator

@Decimate1405 what I meant is that even when the setting is on, the title should still be shown in two lines as long as it doesn't overflow. Only if the setting is enabled and the title is longer than two lines should the title be shown as a one line marquee.

As I said, I'm currently not able to take a look at this myself since my server is broken and I don't have any media downloaded for the Finamp debug version. Otherwise I could just tell you if it behaves as expected...

@Decimate1405
Copy link
Author

Ok I understood what you are trying to say. The latest commit should be the last commit unless some more changes are required. Take a look at it whenever your server is back.

@Chaphasilor
Copy link
Collaborator

@Decimate1405 just took a look, yes the new setting is all that's needed I think, good job 👍🏻
The album chip wasn't quite what I had in mind, instead of a marquee I'd just have it be manually scrollable, like when having multiple artists or feature chips. Do you have the time to adjust that? If not, I can do it myself :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response / stale Issue is possibly outdated or waiting for user feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants