Skip to content

Truncate playable widget#513

Merged
jacksongoode merged 4 commits intomainfrom
jackson/clip-playable
Jun 9, 2025
Merged

Truncate playable widget#513
jacksongoode merged 4 commits intomainfrom
jackson/clip-playable

Conversation

@jacksongoode
Copy link
Copy Markdown
Collaborator

@jacksongoode jacksongoode commented Aug 9, 2024

I'm hoping to solve that issue where long titles and album details are not clipped.

  • Refactor the track widget layout for better maintainability and ability to truncate the top and bottom row
  • Fix the "now playing" dot highhighting in the album view
  • Make the "now playing" marker a little lighter when active

@jacksongoode
Copy link
Copy Markdown
Collaborator Author

@SO9010 If you're bored and want to look at something new, I've been trying to figure our how to get rid of the longstanding bug where long titles and album details don't get clipped. This is as far as I got but I feel like it's really close.

@SO9010
Copy link
Copy Markdown
Collaborator

SO9010 commented Aug 10, 2024

I worked it out, the original child (the title child) needed to not be in a flex child as that will then share out the space evenly. I submitted a merge request to this branch.

@SO9010
Copy link
Copy Markdown
Collaborator

SO9010 commented Aug 10, 2024

Wait, false alarm! this then makes it so it cant clip, how weird!

@jacksongoode
Copy link
Copy Markdown
Collaborator Author

Darn! Well feel free to submit commits to this branch if you figure something out!

@SO9010
Copy link
Copy Markdown
Collaborator

SO9010 commented Aug 14, 2024

I have had a longer look, and it seems like something with the re-implemented logic has caused the issue where it plays that item when you click save on an item. :O

@jacksongoode
Copy link
Copy Markdown
Collaborator Author

Right I think it has, that can be resolved, I know what the issue is there to fix the save play, but the truncation was what I was trying to tackle now.

@SO9010
Copy link
Copy Markdown
Collaborator

SO9010 commented Aug 17, 2024

Okay, so I have been reading the documentation. The problem comes from the fact that a non-flex widget has an infinite size. We need either the text or the dots to be a flex widget. Otherwise, they share the space equally, and the dots will never disappear.

It clips well when just the text is in a flex row, with no expanding and no dots. Perhaps there is a way to interrupt the drawing of the text and then append the dots to it? Or maybe we could create a controller that changes a sizedbox depending on screen size, but this causes issues when the time changes.

@jacksongoode
Copy link
Copy Markdown
Collaborator Author

Right, I thought about painting the dots and appending them to the title, which would somewhat solve the issue, because then the title and the dots would truncate as a single item. It's a possibility, but I think it's a little tricky given that we might have to render the text as a painted object. I don't really want to make the text painted.

I think the other option would be to somehow wrap the text and dots in their own flex object. It's just that it's very confusing to me how non-flex and flex objects are able to be truncated. It seems like they would need the expand_width method? It's all very confusing to me...

@SO9010
Copy link
Copy Markdown
Collaborator

SO9010 commented Aug 19, 2024

I had a go at wrapping both the text and the dots into a flex widget but all that happened was that the time stamp stayed in one place.

@jacksongoode
Copy link
Copy Markdown
Collaborator Author

Ugh I really want to figure this issue out. But the inclusion of that dotted marker_widget is really confusing since there's no way to maximize the title width and have the remaining width filled by the dots while also allowing the title to be truncatable.

@jacksongoode jacksongoode force-pushed the jackson/clip-playable branch from 032561b to 50c0bdd Compare May 15, 2025 05:13
@jacksongoode
Copy link
Copy Markdown
Collaborator Author

@SO9010 I think it works! Could you give it one more review before merging?

@SO9010
Copy link
Copy Markdown
Collaborator

SO9010 commented Jun 8, 2025

Of course!!! I will be able to tomorrow!

@jacksongoode jacksongoode force-pushed the jackson/clip-playable branch from 117c119 to 6b22910 Compare June 9, 2025 11:16
@jacksongoode jacksongoode force-pushed the jackson/clip-playable branch from 6b22910 to e67ae93 Compare June 9, 2025 11:16
@jacksongoode jacksongoode force-pushed the jackson/clip-playable branch from d3f28a8 to 412d810 Compare June 9, 2025 11:22
@SO9010
Copy link
Copy Markdown
Collaborator

SO9010 commented Jun 9, 2025

Amazing it looks fantastic!

@jacksongoode jacksongoode merged commit f80f468 into main Jun 9, 2025
5 checks passed
@jacksongoode jacksongoode deleted the jackson/clip-playable branch June 9, 2025 14:56
@SO9010
Copy link
Copy Markdown
Collaborator

SO9010 commented Jun 9, 2025

Oh no... It has actually caused an issue with the podcast view.... mistook that for the same issue as #610
-- Before --
Screenshot From 2025-06-09 19-32-53
-- After --
Screenshot From 2025-06-09 19-33-57

Do you know what the issue is? I will revert it for now. :(

SO9010 added a commit that referenced this pull request Jun 9, 2025
@SO9010 SO9010 restored the jackson/clip-playable branch June 9, 2025 18:39
SO9010 added a commit that referenced this pull request Jun 9, 2025
@jacksongoode
Copy link
Copy Markdown
Collaborator Author

Ah sorry about that, thanks for the revert, I never used podcasts 😆 so I didn't check!

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