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

Added artist list concatenation for albums that have over 10 artists #4830

Merged
merged 8 commits into from
Aug 15, 2024

Conversation

alfred-delacosta
Copy link
Contributor

@alfred-delacosta alfred-delacosta commented Oct 3, 2023

Changes
Added condition to determine if the artist count of music is over 10 and if so, the displaying text will be changed to only display the first 10 artists and will have "and X other artists." concatenated to the end of it.

Issues
Fixes #4228

@alfred-delacosta alfred-delacosta requested a review from a team as a code owner October 3, 2023 15:56
@alfred-delacosta
Copy link
Contributor Author

Screenshot of fix:
image

@oddstr13
Copy link
Member

oddstr13 commented Oct 4, 2023

Please review https://jellyfin.org/docs/general/contributing/development#pull-request-guidelines

Pull-request titles will eventually end up in the release change-log, so make sure it's short and descriptive 😺

@thornbill thornbill added the bug Something isn't working label Oct 4, 2023
@alfred-delacosta alfred-delacosta changed the title Fixed #4228 Added artist list concatenation for albums that have over 10 artists Oct 4, 2023
src/controllers/itemDetails/index.js Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Oct 24, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
2.5% 2.5% Duplication

Copy link
Member

@thornbill thornbill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good now. It would be nice if someone could confirm the functionality works as expected... I don't seem to have any albums available that have enough artists to test. 😅

@thornbill thornbill added this to the v10.9.0 milestone Oct 24, 2023
@thornbill thornbill added the needs testing This PR requires additional testing label Oct 24, 2023
@oddstr13
Copy link
Member

Before

image

After

image

image

TV mode

image

Mobile

image

image

Experimental

image
image


The optimal number of entries seem to be highly dependent on resolution, display mode and potentially theme.
There does not seem to be a way to see all album artists with this PR?
From an UX perspective, I sort of expected the "and # other artists" to be interactive in some way, to actually be able to see them.

Copy link
Member

@thornbill thornbill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fix the extra slash showing up before the "and other artists" text.

src/controllers/itemDetails/index.js Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Nov 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.3% 1.3% Duplication

Copy link

sonarcloud bot commented Jan 25, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
1.1% Duplication on New Code

See analysis details on SonarCloud

@twihno
Copy link

twihno commented Feb 3, 2024

I don't think this PR solves the issue. It's a good feature to have if you do have more than 10 album artists but not if it's a compilation.
I wrote a quick overview of my interpretation in the linked issue. I don't want to duplicate the comment, so here's the link: #4228

@felix920506
Copy link
Member

I just tested this PR using the version deployed to Cloudflare pages and there are 2 items that would need to be addressed.

  1. There should be a space between the last artist and "and xxx other artists"
    Screenshot from 2024-04-22 22-58-36

  2. This falls apart when the browser window is resized to something narrow. I think this s an acceptable compromise for this PR as it is already a significant improvement over the current situation. This should however have a new issue opened for it.
    image

Copy link

sonarcloud bot commented Apr 25, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.7% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@felix920506 felix920506 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 changes should address my comment above and improve compatibility with RTL languages when doing localization.

This image is with the changes below applied
image

Changing the order of which the lists of artists appear in the strings
image
using source string {1} artists and {0}

src/controllers/itemDetails/index.js Outdated Show resolved Hide resolved
src/strings/en-us.json Outdated Show resolved Hide resolved
@thornbill thornbill removed the needs testing This PR requires additional testing label May 1, 2024
@thornbill thornbill modified the milestones: v10.9.0, v10.10.0 May 3, 2024
@1hitsong
Copy link
Member

1hitsong commented May 18, 2024

Instead of updating the number of artists shown to a hard-coded value, can we instead just use CSS to limit the displayed artists to 2 lines?

display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;  
overflow: hidden;

@alfred-delacosta
Copy link
Contributor Author

These 2 changes should address my comment above and improve compatibility with RTL languages when doing localization.

This image is with the changes below applied image

Changing the order of which the lists of artists appear in the strings image using source string {1} artists and {0}

So the first image shows what it would look like in a LTR language setting and the second image shows would it would look like in a RTL language setting? I just want to confirm that's my understanding of your post and changes.

@thornbill
Copy link
Member

So the first image shows what it would look like in a LTR language setting and the second image shows would it would look like in a RTL language setting? I just want to confirm that's my understanding of your post and changes.

Yes that is correct

@alfred-delacosta
Copy link
Contributor Author

So the first image shows what it would look like in a LTR language setting and the second image shows would it would look like in a RTL language setting? I just want to confirm that's my understanding of your post and changes.

Yes that is correct

Fantastic then I am going to commit those changes.

Copy link
Contributor Author

@alfred-delacosta alfred-delacosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure I accepted these changes...

Copy link

sonarcloud bot commented Jun 12, 2024

Please retry analysis of this Pull-Request directly on SonarCloud

Copy link
Contributor Author

@alfred-delacosta alfred-delacosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I missed these at some point?...

@alfred-delacosta
Copy link
Contributor Author

@thornbill Any idea as to why I can't get rid of this message on the PR? I already committed the changes and did so a while ago. At least I thought I did.
image

Copy link

sonarcloud bot commented Aug 15, 2024

@jellyfin-bot
Copy link
Collaborator

Cloudflare Pages deployment

Latest commit 1a6a44293605666ff1eca9487605d2d0c71a3830
Status ✅ Deployed!
Preview URL https://ff166322.jellyfin-web.pages.dev
Type 🔀 Preview

@thornbill thornbill merged commit 1172d9a into jellyfin:master Aug 15, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest-accepted
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

If there are quite a few artists in one album they overflow the UI.
10 participants