...well, actually, they're thumbs but there you go. Might be useful to someone out there - we use them on an internal site just fine.

Comments

whiteph’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes

Moved to 7.x-2.x as these might be useful

kapil.ropalekar’s picture

StatusFileSize
new2.74 KB
new2.5 KB
new829 bytes

Hi rachel_norfolk, whiteph

I have created a patch and added the new thumb widget. Please add my .png files to the thumb widget folder.

Kindly verify the same.

kapil.ropalekar’s picture

Assigned: Unassigned » kapil.ropalekar
Status: Active » Needs review
tr’s picture

Version: 7.x-2.x-dev » 8.x-1.x-dev
Assigned: kapil.ropalekar » Unassigned
StatusFileSize
new6.82 KB

There are several problems with the patch, so I'm moving this issue to D8 as that is the version that's currently being developed - all new features should go into the current version first.

The problems are:

  1. Patch is in wrong format (in -p2 instead of -p1) so it won't apply.
  2. Image files are empty.
  3. No newlines at end of .css

After fixing these things the new widget looks like it works, although I haven't examined it in detail - I'll keep using it to see if I notice anything wrong. This patch should work for both D8 AND D7.

Status: Needs review » Needs work

The last submitted patch, 4: thumb-widget.patch, failed testing. View results

tr’s picture

Status: Needs work » Needs review
tr’s picture

Title: Another set of stars... » New widget: Thumbs
tr’s picture

Component: Code » Widgets
tr’s picture

StatusFileSize
new7.6 KB

Here's a new patch that conforms to the new hook_fivestar_widget() format present in Fivestar 8.x-1.0-alpha2 and higher. The patch in #4 should still work for D7.

rivimey’s picture

+++ b/widgets/thumbs/thumbs.css
@@ -0,0 +1,64 @@
+.fivestar-thumbs div.fivestar-widget-static .star {

Don't know if there is good reason, but 'div.' has been pointed out as bad for 'overspecifying'.

[also later in file]

Otherwise patch looks ok.

tr’s picture

Yes, the "overqualified" problem is common to every single widget in this module - see the module test output at https://www.drupal.org/pift-ci-job/2131817

I took some time a while ago to make sure all the .css files were consistent with each other. The .css for the thumbs widget follows the same 'template' as all the other widgets.

This module sorely needs a CSS expert to go through the output and our styles and reduce things to only what is necessary. There is a lot of junk in there that has accumulated over the years.

I'm not sure whether we should be adding more widgets into this module or put them into an "extras" module (for example, fivestar_smiley is a module I maintain that provides a new widget).

rivimey’s picture

Given its a common problem, but on the other hand doesn't have a serious downside, I would be pragmatic and shelve the css being not as good as it could be for another time.