groovebasin icon indicating copy to clipboard operation
groovebasin copied to clipboard

Feature Request: 5-star ratings

Open kentonv opened this issue 9 years ago • 7 comments

Personally, I depend deeply on a 5-star rating scale to curate my music. At different times, I feel like listening strictly to my favorites vs. a wider variety, and to that end I build playlists based on my ratings.

Currently Groove Basin doesn't support ratings (AFAICT), which prevents me from switching, but if it did support them and if I could configure Auto DJ based on them (favoring higher ratings, but mixing in lower ratings with some adjustable probability), Groove Basin would probably be my perfect music player.

Meanwhile, Google Music (where my music collection is, unfortunately, currently located) just removed 5-star ratings from their UI. :( Rant here.

kentonv avatar May 17 '15 22:05 kentonv

Can you explain more explicitly what you want, maybe with an example so I can better understand?

andrewrk avatar Sep 08 '14 18:09 andrewrk

Sure, i'll try once again.

My use case for Juice is to produce HTML for email newsletters.

Email newsletters have two peculiarities:

  • no JavaScript is allowed;
  • all CSS should be inlined, otherwise it won't work in some email apps/web services.

It is a nuisance to code pages with inline styles by hand. Instead, i leverage a static site generator to code pages with properly organized Haml and Sass. When the generator builds static pages, it minces them through Juice.

After all CSS has been inlined, there is no need for HTML classes. Classnames sit in the HTML code, occupying ~10% of its size, and there's absolutely no use for them. There no CSS to apply styles to them because it's all inlined, there's no JS to target them because email clients/services remove all JS.

That's why i wish i could tell Juice to strip HTML of classnames.

lolmaus avatar Sep 08 '14 18:09 lolmaus

Ah ok I understand now. I think this sounds like a reasonable feature.

andrewrk avatar Sep 15 '14 14:09 andrewrk

"all CSS should be inlined, otherwise it won't work in some email apps/web services...and there's absolutely no use for them"

This is definitely not true. Its normal to leave CSS classes in so that modern clients can target them, often this is a form of conditional css application. For example, you can use classes + non inline css to apply different styles for mobile browsers (as these render style blocks).

plummer avatar Oct 12 '14 23:10 plummer

Hey @plummer, but i already have all my CSS inlined by Juice.

Note that i don't request to enforce this setting. I just request to allow enabling it manually for those people who don't need HTML classes in their email.

lolmaus avatar Oct 14 '14 09:10 lolmaus

I wish Juice had an option to remove them. too. :) I use the options : removeStyleTags and removeLinkTags. So, i don't need a class tag anymore in my HTML. don't you think so?

bravocado avatar Oct 15 '14 16:10 bravocado

@lolmaus I suppose as an option, except it has the side effect of preventing media queries from being supported.

Also if you are using gulp / grunt, you can use a separate task that kills off classes pretty easily. I use dom_munger at the end and then run arbitrary jQuery against the document, in your case it could be like $('*').removeClass(); if you want a quick fix!

plummer avatar Oct 24 '14 04:10 plummer

@lolmaus you can also use gulp-replace after gulp-inline-css https://www.npmjs.org/package/gulp-replace

Something like this should work: .pipe(replace(/\sclass=["'][a-zA-Z0-9_ ]*['"]/g, ''))

bilalkinnek avatar Nov 06 '14 01:11 bilalkinnek

@bilalkinnek awesome! thx for the solution!

bravocado avatar Nov 12 '14 14:11 bravocado

@bilalkinnek, thank you for a handy workaround.

The point of this feature request is to use the capabilities of an HTML parser rather than relying on brute regexp.

lolmaus avatar Nov 25 '14 10:11 lolmaus