Global css classes?

Avatar

John Haugeland

10 months ago

So when you embed the project basic stats widget, it creates a block that styles, among other things, body, img and anchor. This, predictably, ruins the formatting on any page into which the widget is placed.

Because other widgets such as the COCOMO project cost calculator do not have this behavior, I assume this is an oversight.

Here is my current documentation:

http://scutil.com/docs/

This is what happens when I add the stats widget, thanks to the block at the beginning:

http://scutil.com/docs/scutil.html

Please fix?


Avatar

John Haugeland

10 months ago

Also, looks like your forum strips out html tags, instead of entity encoding them. That makes it difficult to discuss html defects.

Those links, now that I notice the markdown:

Current docs: link

Broken after widget: link


Avatar

Jason Allen

10 months ago

As per our IRC conversation, we'll tackle:

  1. The basic stat widget's global css bug.
  2. Add a cocomo salary url param.
  3. Fix the negative h3 margin css problem.

Thanks again for helping us out w/ these bug reports.


Avatar

John Haugeland

10 months ago

Awesome, thanks


Avatar

Jason Allen

10 months ago

Hi John,

These fixes have been deployed. To change the default salary in the cocomo widget, include a 'salary' param to the widget ".js" href. Example:

http://www.ohloh.net/p/316896/widgets/projectbasicstats.js?salary=80000

Good luck!


Avatar

John Haugeland

10 months ago

All fixes confirmed. Thank you.


Avatar

John Haugeland

10 months ago

On second thought, negative. You added the salary parameter to the wrong widget. It's the cocomo widget that needs it, not project basic stats. :D

Sorry it took me so long to notice that.


Avatar

John Haugeland

10 months ago

Actually, now it's working again this morning. So, last night when I said negative, I may have just been facing caching issues.


Avatar

Jason Allen

10 months ago

Hi John,

Just checking that everything's working for you now?


Avatar

John Haugeland

9 months ago

You know, it was, but it seems to have regressed. The style tags have returned, and the breakage with them.


Avatar

lukasiewycz

9 months ago

Right now I have a problem with the Stats Widgets: It changes the fonts of the whole html site that contains this widgets.


Avatar

John Haugeland

9 months ago

You've found the right forum entry. The reason for the problem is visible if you just load this URL and look at the beginning of the script:

http://www.ohloh.net/p/316896/widgets/projectbasicstats.js


Avatar

lukasiewycz

9 months ago

Currenlty, you can make a workaround by using javascript to reset the body style. But thats not really nice, because for a fraction of a second the website has a different style.

Is this "bug" going to be fixed soon?


Avatar

Jason Allen

9 months ago

Greeting y'all.

Sorry about the delay. Your suspicions were correct: the fix I had applied originally got reverted by a subsequent commit - so the "bad css" behavior returned.

I've re-applied the original fix and thereby fixed the offending, globally-scoped css rules. Thanks for your patience!


Avatar

John Haugeland

9 months ago

Thank you. Fix re-confirmed.

A side note: that you use such common terms as "gadget" for your styling is a bit concerning. These widgets stand a pretty good chance of colliding with other style sets. Have you considered using names like ohlohwidget instead?