Hide stars when there is no rating
ClosedPublic

Authored by januz on May 18 2018, 11:45 PM.

Details

Summary

This patch hides the rating widget when the rating is 0 stars to reduce visual clutter.
There are two cases with different behaviour:

  • When a rating widget is read-only, only ratings with more than zero stars are visible
  • When a rating widget isn't read-only, the same rule applies but it also becomes visible on hover or selection (works like the play/delete/enqueue buttons). This way users can still set ratings on tracks with no stars.

Test Plan

Set readOnly in RatingStar.qml to false to test the hover effect

Diff Detail

Repository
R255 Elisa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
januz requested review of this revision.May 18 2018, 11:45 PM
januz created this revision.
januz edited the summary of this revision. (Show Details)May 18 2018, 11:47 PM
januz edited the test plan for this revision. (Show Details)
januz added a reviewer: Elisa.
januz added a project: Elisa.

Thanks! I think this is needed because Elisa is not able to set the rating of track currently.
However, the icons when hovering now jump around. But if we keep an empty space, it probably will look strange with the buttons shown somewhere in the middle of an entry if no rating is shown. Any ideas?

januz added a comment.May 21 2018, 5:50 PM

I don't think the buttons look so bad jumping around, after all there's only two positions they can be. However I think if we keep them in the same position (in the middle) but actually push them farther to the left we could create the illusion of columns, and it wouldn't look so weird. I'll take a look at it.

januz updated this revision to Diff 34891.May 26 2018, 12:28 AM

Here's a test for the "columns" idea.

Sorry for the delay. I think with the column there is too much wasted space, especially with long titles.
I still cannot think of a good way to solve this now. It will eventually go away once Elisa gets the editing of ratings. Maybe you first version is still the best.
Let's wait for @mgallien opinion.

we could actually flip the position of the buttons and the star ratings...

Here's a test for the "columns" idea.

Works fine. Thanks.
There is an issue with the rating in the view filter. We do not see the empty stars so the look is odd. There is also the fact that users will not know where to click to change the value.

mgallien requested changes to this revision.Jun 4 2018, 3:51 PM
This revision now requires changes to proceed.Jun 4 2018, 3:51 PM
januz updated this revision to Diff 35859.Jun 8 2018, 9:59 PM

Make filter rating stars always visible

januz added a comment.Jun 8 2018, 10:15 PM

we could actually flip the position of the buttons and the star ratings...

I've given this a try but it still looks weird. Is setting ratings too far away? We could put this patch in the backburner until that's working. That way we don't have to worry about the buttons jumping around.

we could actually flip the position of the buttons and the star ratings...

I've given this a try but it still looks weird. Is setting ratings too far away? We could put this patch in the backburner until that's working. That way we don't have to worry about the buttons jumping around.

Unfortunately still a while. KFileMetaData has currently not the ability to write these tags, and Elisa itself also has no infrastructure yet to actually edit the metadata

mgallien accepted this revision.Jun 20 2018, 9:06 PM

Works fine thanks.
Sorry for the delay due to me being sick

This revision is now accepted and ready to land.Jun 20 2018, 9:06 PM
This revision was automatically updated to reflect the committed changes.

Unfortunately still a while. KFileMetaData has currently not the ability to write these tags, and Elisa itself also has no infrastructure yet to actually edit the metadata

Ah ok, I thought it was closer because Dolphin can write them.

Works fine thanks.
Sorry for the delay due to me being sick

No prob man, hope you're feeling better now!