Make WordPress Core

Opened 4 years ago

Closed 22 months ago

#50865 closed enhancement (fixed)

[playlist] Please remove brackets from the titles

Reported by: hvar's profile hvar Owned by: audrasjb's profile audrasjb
Milestone: 6.2 Priority: normal
Severity: normal Version: 3.9
Component: Media Keywords: has-patch commit
Focuses: template Cc:

Description

Dear developers,

the song titles should not be enclosed into "" brackets. They should be removed.

Every song name is appearing inside brackets, and it's not how songs should be represented. They are not fake titles, or presumably terms similar to the song titles - they are the actual song titles, they don't need the brackets. And also it looks really ugly.

Here is the corrected code from media.php:

Thank you

				<?php
					/* translators: %s: Playlist item title. */
					printf( _x( '%s', 'playlist item title' ), '{{{ data.title }}}' );
				?>
				</span>


Attachments (5)

50865.diff (625 bytes) - added by Presskopp 3 years ago.
patch according to the proposal
50865.2.patch (1.6 KB) - added by sabernhardt 2 years ago.
removing quotation marks from title in both places, only when artist and album names do not appear
before_patch_50865.2.png (28.6 KB) - added by James Roberts 2 years ago.
Before patch 50865.2.patch
after_patch_50865.2.png (28.4 KB) - added by James Roberts 2 years ago.
After patch 50865.2.patch
artists_true.png (29.2 KB) - added by James Roberts 2 years ago.
Before and after patch 50865.2.patch, with the "artists" attribute set to true

Download all attachments as: .zip

Change History (23)

#1 @SergeyBiryukov
4 years ago

  • Keywords needs-patch good-first-bug added; songwriter-feedback removed

Hi there, welcome back to WordPress Trac! Thanks for the ticket.

Adjust the keywords per the workflow keywords used here on Trac.

#2 @hvar
4 years ago

  • Keywords good-first-bug removed

Sorry - I'm not really sure what I should do.

Last edited 4 years ago by hvar (previous) (diff)

@Presskopp
3 years ago

patch according to the proposal

#3 @Presskopp
3 years ago

  • Keywords has-patch added; needs-patch removed

@sabernhardt
2 years ago

removing quotation marks from title in both places, only when artist and album names do not appear

#4 @sabernhardt
2 years ago

Quotation marks usually would be around song titles in a paragraph, so it could make sense to keep them when the artist and/or album name display.

History: the quotes were added with playlist support in changeset:27239 (though r33643 replaced it with pseudo-elements in CSS and then r33844 converted it to translatable string).

#5 @sabernhardt
2 years ago

  • Keywords needs-testing added
  • Version changed from 5.4.2 to 3.9

I made edits to both templates, but I do not know how to test the tmpl-wp-playlist-current-item template.

#6 @sabernhardt
2 years ago

  • Milestone changed from Awaiting Review to 6.2

#7 @James Roberts
2 years ago

Test Report

Patch tested: https://core.trac.wordpress.org/attachment/ticket/50865/50865.2.patch

Environment

  • OS: macOS 12.4
  • PHP: 7.4.33
  • WordPress: 6.2-alpha-54642-src
  • Browser: Chrome 107.0.5304.110 (Official Build) (arm64)
  • Theme: Twenty Twenty-One, Twenty Twenty-Two, Twenty Twenty-Three

Results

  • 'artists' attribute set as true - Quotation marks and artist name are visible on both the tracklist and the current track.
  • 'artists' attribute set as false - Quotation marks and artist's name have been removed from the tracklist. The artist's name and quotation marks are still showing on the current track .wp-playlist-current-item.

@James Roberts
2 years ago

Before patch 50865.2.patch

@James Roberts
2 years ago

After patch 50865.2.patch

@James Roberts
2 years ago

Before and after patch 50865.2.patch, with the "artists" attribute set to true

#8 @antpb
2 years ago

  • Owner set to antpb
  • Status changed from new to assigned

#9 @arrasel403
23 months ago

Hi

I need testing instructions, I want to help test this ticket. I couldn't find any playlist in Dashboard Media Library. Please share some testing information.

Thanks!

#10 follow-up: @sabernhardt
23 months ago

For the current item, the quotes make enough sense with the album title. However, now I question whether they should stay there when the current track has an artist name but not an album title.

These instructions are probably not complete, but you could start with this:

  1. Create a new post. If you are using the block editor, create a Classic block.
  2. Click the Add Media button.
  3. Upload at least two audio files. Set the Title, Artist and Album. (If you add more tracks, you could try some without an artist and/or album.)
  4. Click "Create audio playlist" and select your items from the Media Library tab.
  5. Click the "Create a new playlist" button.
  6. Under Playlist Settings, you can choose "Show Artist Name in Tracklist" to test that option.
  7. Click the "Insert audio playlist" button.
  8. Create another playlist with the other option for Artist Name. (In the block editor, you may need to add this playlist within a separate Classic block.)
Last edited 23 months ago by sabernhardt (previous) (diff)

#11 @abidhasan112
23 months ago

Patch tested: https://core.trac.wordpress.org/attachment/ticket/50865/50865.2.patch

Environment

  • OS: Windows 10
  • Web Server: Apache
  • PHP: 7.4.3
  • WordPress: 6.2-alpha-55147
  • Browser: Chrome 109.0.5414.120
  • Theme: Twenty Twenty-Three

✅ Uploaded some audio files. Set the Title, Artist and Album.

Result: https://i.ibb.co/3N7PrTM/3.jpg

✅ Under Playlist Settings, I can choose "Show Artist Name in Tracklist" option to test this feature.

Result: https://i.ibb.co/vdLDwC3/4.jpg

Frontend Result:

https://i.ibb.co/XxKphSH/6.jpg

Backend(Editor) Result:

https://i.ibb.co/2yB87yy/7.jpg

#12 in reply to: ↑ 10 @arrasel403
23 months ago

Thanks for sharing the instructions.

Replying to sabernhardt:

For the current item, the quotes make enough sense with the album title. However, now I question whether they should stay there when the current track has an artist name but not an album title.

These instructions are probably not complete, but you could start with this:

  1. Create a new post. If you are using the block editor, create a Classic block.
  2. Click the Add Media button.
  3. Upload at least two audio files. Set the Title, Artist and Album. (If you add more tracks, you could try some without an artist and/or album.)
  4. Click "Create audio playlist" and select your items from the Media Library tab.
  5. Click the "Create a new playlist" button.
  6. Under Playlist Settings, you can choose "Show Artist Name in Tracklist" to test that option.
  7. Click the "Insert audio playlist" button.
  8. Create another playlist with the other option for Artist Name. (In the block editor, you may need to add this playlist within a separate Classic block.)

#13 @arrasel403
23 months ago

Test Report:

Patch tested: https://core.trac.wordpress.org/attachment/ticket/50865/50865.2.patch

Environment

  • OS: macOS
  • Web Server: nginx/1.23.2
  • PHP: 7.4.33
  • WordPress: 6.2-alpha-54642-src
  • Browser: Chrome 109.0.5414.87
  • Theme: Twenty Twenty-Three

Result

✅ Upload Audio files and set Title, Artist Name and Album Name. https://prnt.sc/vcI7SNsjzq_d

✅ Before Applying the patch, the Artist attribute is set as TRUE and another one is set as FALSE and getting like this screenshot: https://prnt.sc/iNmHZC2IX163

✅ After Applying the patch, the Artist attribute is set as TRUE and another one is set as FALSE and getting like this screenshot: https://prnt.sc/8PoDJqDVZ-JG

#14 @robinwpdeveloper
22 months ago

Test Report

This report validates that the indicated patch addresses the issue.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/50865/50865.2.patch

Environment

  • OS: macOS 11.2.3 (20D91)
  • Web Server: Nginx
  • PHP: 7.4.30
  • WordPress: 6.2-alpha-54642-src
  • Browser: Chrome 109.0.5414.119
  • Theme: Twenty Twenty-Three
  • Active Plugins:
    • No plugins activated

Actual Results

  • ✅ Issue resolved with patch.

Additional Notes

After applying the patch:

  • With Artist name: quotes found
  • Without Artist name: quotes removed

Supplemental Artifacts

Before: https://d.pr/i/ZoMGqP
After: https://d.pr/i/8DSeen

This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.


22 months ago

#16 @costdev
22 months ago

  • Keywords commit added; needs-testing removed

This ticket was discussed in the bug scrub. As this has several successful test reports and the patch looks clean, I'm removing needs-testing and adding for commit consideration.

Additional props to @mukesh27

#17 @audrasjb
22 months ago

  • Owner changed from antpb to audrasjb
  • Status changed from assigned to accepted

Self assigning for commit as today is 6.2 beta 1 release day.

#18 @audrasjb
22 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 55251:

Media: Remove unwanted quotation marks for playlist template.

This changeset improves the way quotation marks are handled in the Playlist template.

Follow-up to [27239], [33643 ].

Props hvar, Presskopp, sabernhardt, james-roberts, arrasel403, abidhasan112, robinwpdeveloper, costdev, mukesh27.
Fixes #50865.

Note: See TracTickets for help on using tickets.