PDA

View Full Version : Updated Fishbone skin, with alt styles



kdf
2005-07-18, 12:50
Thanks to some stylesheet tweaking by MeSue, there are a couple of alternate
looks for the Fishbone skin. I've packaged up an updated version that allows
switching of styles from the help section. The latest choice is then stored as
a cookie so that the new preferred style takes over.

This requires a small change to the server itself, Web/HTTP.pm line 859 needs to
change to:
} elsif ($path =~ /slimserver.*?\.css/) {

I'm looking for a bit of feedback before I commit something like this.

The updated skin can be downloaded from here:
http://www.deane-freeman.com/~fishbone/Fishbone.zip

the help page includes the screenshots originally posted on the users' list.

Notes:
changing style requires a full window refresh to take full effect.
tested on IE and Firefox (not safari yet)
browse pane header needs some positioning tweaks, but I'm not sure yet how to
do it in a css.

Thank!
-kdf

Grotus
2005-07-18, 13:18
kdf wrote:
> Thanks to some stylesheet tweaking by MeSue, there are a couple of alternate
> looks for the Fishbone skin. I've packaged up an updated version that allows
> switching of styles from the help section. The latest choice is then stored as
> a cookie so that the new preferred style takes over.
>
> This requires a small change to the server itself, Web/HTTP.pm line 859 needs to
> change to:
> } elsif ($path =~ /slimserver.*?\.css/) {
>
> I'm looking for a bit of feedback before I commit something like this.

It would probably be reasonable to serve up any .css file. And since we
switched to Template Toolkit we could even serve it up through that to
allow for a little server side action for .css files. The original
reason for serving .css as static files was due to our home-grown
template system using {} as brackets, which didn't work too well with
stylesheets.

kdf
2005-07-18, 14:06
Quoting Robert Moser <rlmoser (AT) comcast (DOT) net>:

> kdf wrote:
> > Thanks to some stylesheet tweaking by MeSue, there are a couple of
> alternate
> > looks for the Fishbone skin. I've packaged up an updated version that
> allows
> > switching of styles from the help section. The latest choice is then
> stored as
> > a cookie so that the new preferred style takes over.
> >
> > This requires a small change to the server itself, Web/HTTP.pm line 859
> needs to
> > change to:
> > } elsif ($path =~ /slimserver.*?\.css/) {
> >
> > I'm looking for a bit of feedback before I commit something like this.
>
> It would probably be reasonable to serve up any .css file. And since we
> switched to Template Toolkit we could even serve it up through that to
> allow for a little server side action for .css files. The original
> reason for serving .css as static files was due to our home-grown
> template system using {} as brackets, which didn't work too well with
> stylesheets.

I'm glad you mentioned that. Ideally, I thought it would be nice to have this
kind of feature available to all skins, since a good number of the ones
currently included with the server are simply style sheet changes to EN. For
now, I went with the smallest ans simplest change server side, simply to take
away as much risk as possible for 6.1. I'm also not sure how extensive the
changes would get in order to support some sort of server-side style sheet
controls.

-kdf

MrC
2005-07-18, 16:44
I'm having, and have always had trouble getting skins to change correctly. Testing the new Fishbone changes are even more problematic for me now.

Despite numerous hard refreshes, clearing the cache, using Opera or IE, I get these weird mixtures of skins when trying to use the updated Fishbones.

What does one have to do to get the darned skins to take hold !?

Edit: also to note, there are double images being shown in the fishbone player area. Two SqueezeBox pics, two start buttons, etc. All the controls are doubled, side-by-side. See pic below.

MrC
2005-07-18, 18:04
Attached is a picture of the odd behavior I see with the Fishbone skin.

kdf
2005-07-18, 19:20
That looks like you are using a browser that does not support
stylesheets, OR you have not patched the server as described. if, as I
believe you mentioned, you are having troubles of a similar nature with
the standard skins, this really belongs as an issue in the discussion,
or beta forum or directed to support (AT) slimdevices (DOT) com. Please deal with
the issues from standard skins before you start testing developer
releases. This is a test skin, NOT intended to fix any reported bugs.

-kdf

On 18-Jul-05, at 6:04 PM, MrC wrote:

>
> Attached is a picture of the odd behavior I see with the Fishbone skin.
>
>
> +-------------------------------------------------------------------+
> |Filename: Goofy.jpg |
> |Download:
> http://forums.slimdevices.com/attachment.php?attachmentid=190|
> +-------------------------------------------------------------------+
>
> --
> MrC
>

Yannzola
2005-07-18, 20:30
... http://www.deane-freeman.com/~fishbone/Fishbone.zip appears to be down or otherwise unavailable.

y.

MrC
2005-07-18, 20:47
kdf,

Nope, this is not a browser lacking-stylesheets problem (opera 8.01 and IE 6). And the server was patched at line 859 of file Web/HTTP.pm as described ( i just verified it again ).

As far as my comments about standard skins, that may have been over-stated, but reinforced by what I'm seeing with Fishbone. I can get the other skins to work with many refreshes - eventually, all the cached data works itself out, and things work fine. My point was that it doesn't just work by clicking the "click here" to refresh skins link, and often takes more than one refresh.

However, the problem I'm mentinoning to you is with Fishbone only, and only the modified one. But, no matter, I've figured it out for you. :-)

The cookie handling/parsing mechanism needs to be improved. Somehow, my Style cookie was corrupted. After deleting it, all works fine.

Probably bad cookied data parsing should result in the nuking of the cookie entirely, and resort back to smart defaults.

kdf
2005-07-18, 20:51
On 18-Jul-05, at 8:30 PM, Yannzola wrote:

>
> ... http://www.deane-freeman.com/~fishbone/Fishbone.zip appears to be
> down or otherwise unavailable.
>
thanks. its back now.
-kdf

kdf
2005-07-18, 21:00
On 18-Jul-05, at 8:47 PM, MrC wrote:

>
> kdf,
>
> Nope, this is not an browser lacking-stylesheets problem (opera 8.01
> and IE 6). And the server was patched at line 859 of file Web/HTTP.pm
> as described ( i just verified it again ).
>
> As far as my comments about standard skins, that may have been
> over-stated, but reinforced by what I'm seeing with Fishbone. I can
> get the other skins to work with many refreshes - eventually, all the
> cached data works itself out, and things work fine. My point was that
> it doesn't just work by clicking the "click here" to refresh skins
> link, and often takes more than one refresh.

please refer to the notes. the change requires a full window refresh
in order to take full effect.
I dont have opera, so I have no chance to test that, but it has been
working with IE in my tests. However, perhaps I can force a full
refresh without having to require the user to think.

>
> However, the problem I'm mentinoning to you is with Fishbone only, and
> only the modified one. But, no matter, I've figured it out for you.
> :-)
>
> The cookie handling/parsing mechanism needs to be improved. Somehow,
> my Style cookie was corrupted. After deleting it, all works fine.

If they end up corrupted again, feel free to post the contents.

This is the first report of any 'cookie' corruption that I have seen or
heard. The cookie handling javascript is freely available source code,
and not my own.

-kdf

MrC
2005-07-18, 21:19
please refer to the notes. the change requires a full window refresh in order to take full effect. I dont have opera, so I have no chance to test that, but it has been working with IE in my tests. However, perhaps I can force a full refresh without having to require the user to think.

Please refer to my original post! :-) I forced refresh many times, and use BOTH IE and Opera. The same problem occured with both browsers. But now that I think more about it, that would indicate that the IE cookie was bad too. Hmmm, let me see...

Here's the cookie data for IE, where it displays as in the picture I added earlier ( i sure hope there's no sensitive data here!):


style
Fishbone_Gray
localhost/
1088
3803115648
29797062
1784974448
29723637
*
ExBrowse2Player

localhost/
1088
954015616
29723704
3423965520
29723630
*
ExBrowse2Mode
0
localhost/
1088
754015616
29723704
3223035520
29723630

How does this cookie look to you?

kdf
2005-07-18, 21:38
On 18-Jul-05, at 9:19 PM, MrC wrote:

>
>> please refer to the notes. the change requires a full window refresh
>> in
>> order to take full effect. I dont have opera, so I have no chance to
>> test that, but it has been working with IE in my tests. However,
>> perhaps I can force a full refresh without having to require the user
>> to think.
>
> Please refer to my original post! :-) I forced refresh many times,
> and use BOTH IE and Opera. The same problem occured with both
> browsers. But now that I think more about it, that would indicate that
> the IE cookie was bad too. Hmmm, let me see...

well, to be honest, your original post looked more like a support issue
with existing skins. That is really the last thing I wanted to be
dealing with in the dev list :) I happen to feel that too many times,
ppl are taking advantage of the openness to use this group for lobbying
directly at devs. My apologies if that was not your intent.

>
> Here's the cookie data for IE, where it displays as in the picture I
> added earlier ( i sure hope there's no sensitive data here!):

just cookie name, host, path, connection type and store duration (as
far as I know)
>
>
> Code:
> --------------------
> style
> Fishbone_Gray
> localhost/
> 1088
> 3803115648
> 29797062
> 1784974448
> 29723637
> *
>

Nothing obviously wrong here, aside from the strange whitespace in
front of 'style'. if you clear the cookies and get the proper render,
does it look any different? I use Firefox mostly, so the cookie
details are displayed a bit differently.

I'll try some more testing with IE and see if I can get the same
results.

-kdf

MrC
2005-07-18, 21:56
well, to be honest, your original post looked more like a support issue
with existing skins. That is really the last thing I wanted to be
dealing with in the dev list :) I happen to feel that too many times,
ppl are taking advantage of the openness to use this group for lobbying
directly at devs. My apologies if that was not your intent.
Understood, and no problem. I'm a (long time) developer too, so I understand your issue completely. Sorry for my misdirection.


if you clear the cookies and get the proper render,
does it look any different?

Removing the cookie fixes the problem completely for IE as well.

As for what might have caused this problem to occur in both browsers, it might be that my Fishbone takes about 30 seconds to return after a full refresh (lots of tracks). Several times I was unsure what was going on and refreshed again. Perhaps this was the cause. Whether it is a corrupted cookie, or modified timestamp, or what, I don't know. But since it happened in two different browswers with their own cookie stores, there is some hole of opportunity in the code somewhere.

And I should add as well, the skin is very nice!

kdf
2005-07-18, 22:18
Quoting MrC <MrC.1sehm0 (AT) no-mx (DOT) forums.slimdevices.com>:


> Removing the cookie fixes the problem completely for IE as well.

so, are you able to access any of the alternate styles? Those would require the
cookie at least once. Is the cookie any different when it works?

> As for what might have caused this problem to occur in both browsers,
> it might be that my Fishbone takes about 30 seconds to return after a
> full refresh (lots of tracks). Several times I was unsure what was
> going on and refreshed again. Perhaps this was the cause. Whether it
> is a corrupted cookie, or modified timestamp, or what, I don't know.
> But since it happened in two different browswers with their own cookie
> stores, there is some hole of opportunity in the code somewhere.
>
agreed. I just can't see exactly where. I have a couple things I'm going to
try, but being unable to reproduce this myself, they are but stabs in the dark
:)

> And I should add as well, the skin is very nice!

thanks. hopefully this will all be an improvement.

kdf
2005-07-18, 22:53
ok, normally the scripts set the cookie on window unload. However, since a
refresh causes several unloads, the old cookie was always being set. I
modified to set the cookie when changing the stylesheet. I think this basically
tripped over the same problem, the cookie being set by several windows at the
same time as each page sets the active style on loading.

I've now split it up so that the change function sets the cookie, and a
different function is used to change the css on loading.

I've updated the zip file at the same old URL. Hopefully that will behave
better in IE and opera.

-kdf

MrC
2005-07-18, 23:40
I downloaded the new zip file and installed. I also installed Firefox. Upon opening slimserver, I found all is well with Fishbone in Firefox. I go to the Fishbone Skin style changes Help page, and click "Change style to tan". Then hit the reload button. The interface gets distorted like the picture I displayed. This happens exacttly the same in all three browsers.

The links to grey and tan do nothing on subsequent tries. The default link works correctly, and the skin gets restored.

I'll look more at the cookies tomorrow, i'm too tired tonight. There must be something about my system and yours that is causing us to have such different results. I'm running the 7-18 nightly on XP, and the browsers are on the same XP.

mherger
2005-07-18, 23:53
> I downloaded the new zip file and installed. I also installed Firefox.
> Upon opening slimserver, I found all is well with Fishbone in Firefox.
> I go to the Fishbone Skin style changes Help page, and click "Change
> style to tan". Then hit the reload button. The interface gets
> distorted like the picture I displayed. This happens exacttly the same
> in all three browsers.

Do you use a local caching proxy?

--

Michael

-----------------------------------------------------------
Help translate SlimServer by using the
StringEditor Plugin (http://www.herger.net/slim/)

MrC
2005-07-18, 23:56
Nope, no local caching proxy.

kdf
2005-07-19, 00:06
Quoting MrC <MrC.1sen60 (AT) no-mx (DOT) forums.slimdevices.com>:

>
> Nope, no local caching proxy.

when you feel less tired, try doing a change and reload with d_http debugging
turned on. Lets see if slimserver is finding anything wrong.

Are you using the EXE version of the server, by any chance? That would
certainly prevent the patch of HTTP.pm from working, and explain the lack of
proper display when changing to the alternate styles. Basically, its like the
other stylesheets don't exist.

-kdf

Jacob Potter
2005-07-19, 04:47
On 7/18/05, kdf <slim-mail (AT) deane-freeman (DOT) com> wrote:
> I'm looking for a bit of feedback before I commit something like this.

Very cool.

One minor thing - I think you're missing a [% webroot %] prefix in a
few places, line 47 of home.html and the two images and "click here"
links in docs/readme.html. Those cause some problems if the skin is
accessed explicitly as http://server:9000/Fishbone.

The stylesheet switching doesn't work in Safari. PPK's demo at
http://www.quirksmode.org/js/cssdisable.html does work cross-browser,
so you might want to check that out. :)

Other than that - looks great! :)

- Jacob

kdf
2005-07-19, 09:30
Quoting Jacob Potter <jacobdp (AT) gmail (DOT) com>:

> One minor thing - I think you're missing a [% webroot %] prefix in a
> few places, line 47 of home.html and the two images and "click here"
> links in docs/readme.html. Those cause some problems if the skin is
> accessed explicitly as http://server:9000/Fishbone.

right...will fix that.

>
> The stylesheet switching doesn't work in Safari.

it doesn't??? What was I doing last night then? I woudn't expect it to work
from teh browser side, but the links in the readme sure appeared fine for me.
Is this a rule that I missed? What is happening when you try it?

> PPK's demo at
> http://www.quirksmode.org/js/cssdisable.html does work cross-browser,
> so you might want to check that out. :)

will do !

-kdf

MrC
2005-07-19, 09:32
Are you using the EXE version of the server, by any chance? That would certainly prevent the patch of HTTP.pm from working, and explain the lack of proper display when changing to the alternate styles. Basically, its like the other stylesheets don't exist.
-kdf

Yes, I am using slim.exe. I presume I need activeperl to run the slimserver.pl script. Is the cygwin perl known to work?

kdf
2005-07-19, 09:39
Quoting MrC <MrC.1sfdsb (AT) no-mx (DOT) forums.slimdevices.com>:

>
> kdf Wrote:
> > Are you using the EXE version of the server, by any chance? That would
> > certainly prevent the patch of HTTP.pm from working, and explain the
> > lack of proper display when changing to the alternate styles.
> > Basically, its like the other stylesheets don't exist.
> > -kdf
>
> Yes, I am using slim.exe. I presume I need activeperl to run the
> slimserver.pl script. Is the cygwin perl known to work?

Either one should work fine.
-kdf

Dan Sully
2005-07-19, 10:32
* kdf shaped the electrons to say...

>> Yes, I am using slim.exe. I presume I need activeperl to run the
>> slimserver.pl script. Is the cygwin perl known to work?
>
>Either one should work fine.

Actually, cygwin perl is known *not* to work. Please use ActivePerl.

-D
--
You know, for kids.

MrC
2005-07-19, 10:39
Actually, cygwin perl is known *not* to work. Please use ActivePerl.


Yeah, I'm discovering that.

kdf
2005-07-19, 10:47
Quoting MrC <MrC.1sfgso (AT) no-mx (DOT) forums.slimdevices.com>:

>
> Dan Sully Wrote:
> > Actually, cygwin perl is known *not* to work. Please use ActivePerl.
> >
>
> Yeah, I'm discovering that.

oh...sorry.
-kdf

MrC
2005-07-19, 11:02
Ok, problem solved. It was that I was using slim.exe and not slimserver.pl which caused the problem. It is clear now that slim.exe includes a pre-compiled version of Web/HTTP.pm. Perhaps a quick edit to the instructions indicating not to use slim.exe and instead use slimserver.pl. w/ActivePerl might help others.

kdf
2005-07-19, 12:06
Quoting Jacob Potter <jacobdp (AT) gmail (DOT) com>:

>PPK's demo at
> http://www.quirksmode.org/js/cssdisable.html does work cross-browser,
> so you might want to check that out. :)

I'm not sure I understand how this is much different from the techniques I've
got in use here. I've changed the ordering of stylesheets, no longer using
'alternate stylesheet'. I'm not sure I want to care about trapping document.all
for dealing with IE4 (in fact, I recall specifically taking it out of another
script becuase it caused confusion somewhere). Otherwise, the styleswitcher
scripts are very much the same, unless I'm missing something.

-kdf

Jacob Potter
2005-07-19, 12:14
On 7/19/05, kdf <slim-mail (AT) deane-freeman (DOT) com> wrote:
> I'm not sure I understand how this is much different from the techniques I've
> got in use here. I've changed the ordering of stylesheets, no longer using
> 'alternate stylesheet'. I'm not sure I want to care about trapping document.all
> for dealing with IE4 (in fact, I recall specifically taking it out of another
> script becuase it caused confusion somewhere). Otherwise, the styleswitcher
> scripts are very much the same, unless I'm missing something.

Whoops, I stand corrected. Just tried it again and it does work in
Safari, dunno why it wasn't cooperating this morning. Sorry for the
false alarm!

- Jacob

kdf
2005-07-19, 12:54
Quoting Jacob Potter <jacobdp (AT) gmail (DOT) com>:

> On 7/19/05, kdf <slim-mail (AT) deane-freeman (DOT) com> wrote:
> > I'm not sure I understand how this is much different from the techniques
> I've
> > got in use here. I've changed the ordering of stylesheets, no longer using
> > 'alternate stylesheet'. I'm not sure I want to care about trapping
> document.all
> > for dealing with IE4 (in fact, I recall specifically taking it out of
> another
> > script becuase it caused confusion somewhere). Otherwise, the
> styleswitcher
> > scripts are very much the same, unless I'm missing something.
>
> Whoops, I stand corrected. Just tried it again and it does work in
> Safari, dunno why it wasn't cooperating this morning. Sorry for the
> false alarm!

np. Thanks for the tips, though. It was good to get the full explanation of
the quirks. After reading that, I'll have to test with Mozilla.

-kdf

Yannzola
2005-07-21, 17:06
Sorry for barging in on the Developers list.
Quick question for kdf. Have you considered making the font size user scalable? All you'd need to do (CSS wise) is set the size as a percent value... of course, I have no idea how the back end is put together and if this is even feasible... but it would be nice for those with less then perfect vision.

I find that 70% usually renders as 11px on screen. 90% as 10px, 120% as 13px... etc.

Also, I mentioned this before, but would you consider making a more "compact" version of fishbone optimized for those of us still at 800x600? Or, ideally, adapt the existing template to accommodate lower resolutions. You'd only need to tweak a few variables:

1- allow the "search for songs" dropdown and "for" text field to break to a second line below the "browse artist" dropdown when the frame is collapsed.

2- add just a bit (4px?) of margin between the (sleep) "Player Settings Undock, etc." links in the right frame (so they don't scrunch together into a single unit)

3- add just a bit (4px?) of margin around the "|" seperating the REPEAT: , SHUFFLE:, and PLAYER: areas. Again, to prevent scrunch.

Or... feel free to ignore any of this ;-)

Thanks!
y.

kdf
2005-07-21, 17:28
Quoting Yannzola <Yannzola.1sjo6o (AT) no-mx (DOT) forums.slimdevices.com>:

>
> Sorry for barging in on the Developers list.
> Quick question for kdf. Have you considered making the font size user
> scalable?

I'd consider switching to FireFox, personally. I use it, and for me, the fonts
are already scalable.

> All you'd need to do (CSS wise) is set the size as a percent
> value... of course, I have no idea how the back end is put together and
> if this is even feasible... but it would be nice for those with less
> then perfect vision.
>
> I find that 70% usually renders as 11px on screen. 90% as 10px, 120% as
> 13px... etc.

I'll think about it, but I'd be hesitant to be messing with fonts again. They
were problematic to line up in the first place. I'm not familiar with the %
sizing in CSS so not knowing how it reacts in all the other browsers is also a
setback.

>
> Also, I mentioned this before, but would you consider making a more
> "compact" version of fishbone optimized for those of us still at
> 800x600? Or, ideally, adapt the existing template to accommodate lower
> resolutions.

> You'd only need to tweak a few variables:

let me just point out now, that I really dont get good feelings when any request
starts out like this. If its that simple, I'd expect to see a patch instead ;)
The only reason I took the steps on this recent update was that a lot of work
went into it beforehand by another user.

> 1- allow the "search for songs" dropdown and "for" text field to break
> to a second line below the "browse artist" dropdown when the frame is
> collapsed.
>
> 2- add just a bit (4px?) of margin between the (sleep) "Player Settings
> Undock, etc." links in the right frame (so they don't scrunch together
> into a single unit)
>
> 3- add just a bit (4px?) of margin around the "|" seperating the
> REPEAT: , SHUFFLE:, and PLAYER: areas. Again, to prevent scrunch.

To be totally frank, I had and continue to have very little motivation in
continually tweaking the skin. A skin can't work in every case, and I'm soon
going to have a lot less time to spend tweaking. Since you do seem to have the
details worked out, why not experiment with it for your own use? I'd be more
than happy to help merge any changes into something that can be shared. It
sounds almost like you've tried it already. If so, feel free to post the
tweaked version (hopefully already tested with Firefox, IE and safari if at all
possible)

Oh, and a sidenote: some of that scrunch is deliberate (or as a side effect of
what I did want). The start of the playlist on the right side has to shift to
specific heights depending on whether artwork is shown in the top part.
Letting the other item wrap, was not an option. Having them go off the screen
was not ideal. Scrunching isn't either, but at least it sizes to fit while the
browser window is at least large enough to fit. I never intended the skin for
small windows. Other skins are better optimised for that. Fishbone is set
toward a pile of information all in one view. What I have always thought would
be cool is a single-pane version of Fishbone, much like HandHeld is for the
default skin.

Sorry to be a bit of a stonewall on this, but I'd forgotten how painful it was
to deal with cross browser. This recent tweak has cost me too much sleep
already, and it hasn't even made a nightly build.

-kdf

Yannzola
2005-07-21, 17:45
Sorry to be a bit of a stonewall on this, but I'd forgotten how painful it was
to deal with cross browser. This recent tweak has cost me too much sleep
already, and it hasn't even made a nightly build.

-kdf

No prob, kdf! I'll work on some of the CSS styling myself, test 'em... and send them over your way.

Q:Why in the world would you even consider supporting IE4? Who in their right mind still uses it?

kdf
2005-07-21, 18:01
Quoting Yannzola <Yannzola.1sjq1b (AT) no-mx (DOT) forums.slimdevices.com>:

>
> No prob, kdf! I'll work on some of the CSS styling myself, test 'em...
> and send them over your way.

cool.

>
> Q:Why in the world would you even consider supporting IE4? Who in their
> right mind still uses it?

wouldn't be in MY plan. I believe you must be referring to a response I gave
based on a link that Jacob suggested. The link went to a page outlining a
number of quirks to be wary of when switching styles.

-kdf