Stylish 1.0a2

edited February 2009 in Stylish
Available here.

Over and above Stylish 1.0a1:
  • Tagging of styles, which is useful in...
  • Grouping/sorting in the manage window by name, enabled, type, or tag
  • Toolbar button
  • A quick way to enable/disable in the Manage dialog: double click the icon
  • Various bug fixes and performance improvements
If you want Stylish to try to import your Stylish 0.5 styles again, set extensions.stylish.legacyFileMigrated to false and restart Firefox. If you find any bugs, please post them here and include your Firefox version and OS.

Another interesting new feature... I've made Stylish inject some attributes into the Firefox browser XUL window element. These attribute are stylish-url, representing the URL of the page in the currently opened tab; stylish-domain, the full domain of the page in the currently opened tab; and stylish-hour, a number from 0 to 23 representing the current hour. So what good is that? Well, using those attributes you can style the browser window based on the time of day or the page you're looking at. Some example uses to get you started:

window[stylish-hour="22"], window[stylish-hour="23"], window[stylish-hour="0"], window[stylish-hour="1"], window[stylish-hour="2"], window[stylish-hour="3"], window[stylish-hour="4"], window[stylish-hour="5"], window[stylish-hour="6"] { /* this code will only take effect at night. combine with any of the "dark" styles */ }

window[stylish-domain="userstyles.org"] { /* this style will only take effect when you're on userstyles.org */ }
I haven't decided whether I'm going to keep this, spin it off into a separate thing, or drop it altogether. Let me know if you find this useful, or would be useful with certain tweaks or additional attributes, or whether it's lame.
«1

Comments

  • The same thing here - Fx is unusable. Some transparent window shows up (probably) from there on can't click anything anywhere and need to kill the process. I did try disabling all styles before installing this version (before that is, with a1) but it didn't work either. Will try again, for the last time).
  • I saw that happen on mine when I clicked on the Options/Preferences button for the Stylish entry in the Extensions tab, but that button should be disabled now. I haven't seen it happen in any other situation.
  • That's the case. However, i can't get to the manager/options in any other way.
  • I don't understand... You can't:

    -Tools, Add-ons, Stylish (on the top row of icons), or
    -Status bar icon, Manage Styles?
  • HKKHKK
    edited February 2009
    I just installed the new version.

    two things:
    1) I still observe what i describe on 1.0a1, that when i open the manage dialog, i see the "install" button (which wants me to choose an XPI file, i.e. the extension install button). When I click "Stylish" in the top toolbar again, it disappears. Heres a screenshot: http://www.imagebam.com/image/53565626780901/

    2) Can you make it so the style editor opens when double-clicking on a style. (so, double click on style icon disables/enables, and double-click on style name open editor) that would really speed up the workflow. Could you also make it an option whether to use the context menu in the Stylish icon-menu? i kinda like the behavior of 0.5 that it opens the editor right away when i right-click an item. i don't uninstall styles often, so i'd be willing to open the Manager for that instead of having to click again to edit them.

    Will keep testing and report anything i encounter.

    ~HKK

    Edit: Just found another problem: the preview doesnt work, at all. The changes to a style also arent applied when i save the Style. I have to restart firefox for them to work. Since i'm working on a style at the moment, i'll change back to the stable version for now. tell me if you want me to test anything, i can just install 1.0a2 back
  • edited February 2009
    I can use the statusbar icon to open exts. manager/styles > enable/disable styles there. I can write a style from that menu as well.
    I can also see styles in the addons manager window.
    That's in a clean profile with nothing but Stylish and 2 styles for testing (one of which is to hide the Stylish statusbar icon ;-)).
    However, if i click on the Options button (in the exts.manager) - i see 2 (dead) icons and have to kill the process as i can't click on anything else. If that Options window is not suppose to be there, the Options button should be greyed and not functional.
    I don't see any way to open the Stylish manager in the side bar and i still see no way to enable/disable all styles (i can do both with custom buttons).
    So, i see HKK's shot (above) but see nothing in my exts. manager window, none of this (i'll make a shot in a bit)):

    # Tagging of styles, which is useful in...
    # Grouping/sorting in the manage window by name, enabled, type, or tag
    # Toolbar button
    # A quick way to enable/disable in the Manage dialog: double click the icon

    And it still would be nice to have an import/export function so that we can move styles from profile to profile (and having it to do it selectively with checkboxes would just be perfect!). It's especially obvious now that styles open in the Stylish tab in the addons manager where we're able to install/uninstall things by clicking install/update buttons.
  • edited February 2009
    OK, after a half-a-dozen restarts, it seems to be there, in both profiles, however, i see no options - my shot ( http://img365.imageshack.us/my.php?image=captureml3.png ).

    Also, i open the manager in the sidebar (by clicking a custom toolbar button). I don't think i'll be using 1.0 version.
  • Posted By: HKKI still observe what i describe on 1.0a1, that when i open the manage dialog, i see the "install" button (which wants me to choose an XPI file, i.e. the extension install button). When I click "Stylish" in the top toolbar again, it disappears. Heres a screenshot: http://www.imagebam.com/image/53565626780901/
    I don't have that Install button, even when I'm on the Extensions tab. You also have a textbox and a 1/12 button. Do you have an extension that's adding those? Or maybe you're on a beta?
    Posted By: HKKthe preview doesnt work, at all. The changes to a style also arent applied when i save the Style
    Can you open the URL "chrome://stylish/content/test.xul" and tell me the results it gives that aren't green?
    Posted By: makondoHowever, if i click on the Options button (in the exts.manager) - i see 2 (dead) icons and have to kill the process as i can't click on anything else. If that Options window is not suppose to be there, the Options button should be greyed and not functional.
    It should be, and it is on my computer. The install.rdf doesn't specify an optionsURL. I really don't get why it shows up for you.
  • edited February 2009
    The ext. that adds all those (perks in the addons manager) is Mel's toolkit - http://forums.mozillazine.org/viewtopic.php?f=48&t=669795
  • HKKHKK
    edited February 2009
    Posted By: Jason Barnabe (np)I don't have that Install button, even when I'm on the Extensions tab. You also have a textbox and a 1/12 button. Do you have an extension that's adding those? Or maybe you're on a beta?
    Oh yea, those elements are added by MR Tech Toolkit (an extension). So it's off the bug list, but if you have some time at hand you may look if you can find out why it doesn't work right. (the extension has a lot of features so i keep it on. since that button doesnt do anything negative, it doesnt matter much right now)
    Posted By: Jason Barnabe (np)Can you open the URL "chrome://stylish/content/test.xul" and tell me the results it gives that aren't green?
    all are green except the following three, which are blue:
    testAppliesSearch Style pre-existing
    asyncRunUpdateAvailable Expected 'update-success', got 'null'.
    asyncRunUpdateNotAvailable Expected 'no-update-possible', got 'null'.
    (i also tried again, preview still doesnt work)

    hope this helps

    ~HKK
  • Posted By: HKKOh yea, those elements are added by MR Tech Toolkit (an extension). So it's off the bug list, but if you have some time at hand you may look if you can find out why it doesn't work right. (the extension has a lot of features so i keep it on. since that button doesnt do anything negative, it doesnt matter much right now)
    It looks like that MR Tech Toolkit makes it show up on all tabs, even when it doesn't make sense (like for Plugins), so really it seems more like a limitation of that extension than a problem in Stylish.
    Posted By: HKKthe preview doesnt work, at all. The changes to a style also arent applied when i save the Style.
    The results of the test URL makes me think the preview actually does work, because it does try it in there. If you put in:
    * { color: blue !important;} and preview or save that, it doesn't apply immediately?
  • Posted By: makondoOK, after a half-a-dozen restarts, it seems to be there, in both profiles, however, i see no options - my shot ( http://img365.imageshack.us/my.php?image=captureml3.png ).
    With this and the options button thing, it really sounds to me like you're not actually getting the updated version. Does the extensions pane even say that it's Stylish 1.0a2?
  • Posted By: Jason Barnabe (np)It looks like that MR Tech Toolkit makes it show up on all tabs, even when it doesn't make sense (like for Plugins), so really it seems more like a limitation of that extension than a problem in Stylish.
    I see ^^
    Posted By: Jason Barnabe (np)The results of the test URL makes me think the preview actually does work, because it does try it in there. If you put in:* { color: blue !important;}and preview or save that, it doesn't apply immediately?
    I just tried around with that and observed strange behavior, and i can't find real pattern to it. When I created a new style (i did for domain userstyles.org), the preview worked, even several times when i changed the color. then i saved the style and reopened the editor and changed it again, and the preview still worked.
    but then i opened a new tab of the page and tried it there, and the preview did not work anymore; also, it now doesn't work on the tabs that were previously open of the same page, and additionally, i cannot un-apply the style.
    i think this is similar to the behavior that ChoGGi or t31os (im not sure who) described in the thread for 1.0a1.
    hope this helps you track it down

    ~HKK
  • In the previous thread, someone mentioned that things could get stuck at being applied if they previewed and then enabled or disabled in another window. I know about that one. If you're not enabling or disabling it while previewing, can you try to get a small set of steps that causes the problem? Preferably with some obvious style change like making everything blue as above.
  • okay, i'll write down the steps as i do them, so i am sure they produce the error here.
    1) open a page, lets say userstyles.org
    2) create a new style ("For userstyles.org...") and add some obvious change. I use this:@namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain("userstyles.org") { * {color: blue !important;} } and give it a random name so you can save it later.
    3) click preview, it works.
    4) change something, e.g. the color to green, click preview: it works. (you can also try out some more changes, it keeps working)
    5) save the style, re-open it. do some change... oh nice, now its not working anymore. so this is where the preview stopped working for me now. i think it worked even after saving before.

    what i also seem to have noticed about this is that it stops working when this style or another style is applied when the page is loaded. if you create a style for a page for which no style has applied before, it keeps working even after saving (however will stop working once you (re)load the page)

    ~HKK
  • edited February 2009
    np,
    the Toolkit has nothing to do with it. I get the same result without it, in a clean profile with only Stylish installed - that is i do NOT see 'Sort', for example. I do not see icons by styles names and they all look enabled (or disabled, for this matter).
    BTW, by 'toolbar button' do you mean the toolbar in the exts. manager or Fx? 'cause i keep looking for the Fx toolbar icon (see none).
    Oh, and i don't have the preview problem HKK describes above, it works all right here.
    Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 - Build ID: 2009011913, Stylish 1.0a2
  • Posted By: makondonp,
    the Toolkit has nothing to do with it. I get the same result without it, in a clean profile with only Stylish installed - that is i do NOT see 'Sort', for example. I do not see icons by styles names and they all look enabled (or disabled, for this matter).
    BTW, by 'toolbar button' do you mean the toolbar in the exts. manager or Fx? 'cause i keep looking for the Fx toolbar icon (see none).
    I didn't think it has anything to do with the toolkit.

    You should see the sorting/grouping thing, tags in the edit window, a toolbar button (for the main Firefox window), and a disabled Options button in the Extensions pane. The fact that you're seeing none of these makes me think that you don't actually have the new version installed. Go to the Extensions pane, see if Stylish says "1.0a2". If it doesn't have the "2", you don't have the new version.
  • Posted By: makondoOh, and i don't have the preview problem HKK describes above, it works all right here.
    I just thought of something: It could of course just be another extensions causing interference. if you cant find anything in stylish that might cause this problem, Jason, I will try to disable my extensions one by one and see what happens. but i'll have to see if i have that much time tomorrow, otherwise i'll have to put it off to friday or the weekend

    ~HKK
  • Posted By: HKKokay, i'll write down the steps as i do them, so i am sure they produce the error here.
    Yup, got it to happen. I'll look into it, thanks.
  • The trick is that the problem only happens when you open the edit dialog from the status bar. Opening from Manage works fine. The actual bug is that it's not recognizing the style as one that was previously saved; you can see the dialog's title is "New style" rather than "Edit whatever". This messes up the preview logic.
  • Posted By: Jason Barnabe (np)The trick is that the problem only happens when you open the edit dialog from the status bar. Opening from Manage works fine. The actual bug is that it's not recognizing the style as one that was previously saved; you can see the dialog's title is "New style" rather than "Edit whatever". This messes up the preview logic.
    woa cool, i helped to solve something! *party* lol thats cool. and good to know that i dont have to uninstall 1.0a2 everytime i wanna work at my styles ^^

    ~HKK
  • i haven't gotten around to testing it yet, but i thought of a feature request so figured i'd ask here :)
    adding a button to show a list of styles (and if they're modified)
    and possibly also the mozilla/os version
  • Can you elaborate more on both of those?
  • edited February 2009
    it's just the one feature. same idea as mr tech toolkit, but instead of a list of extensions/plugins it shows styles then you could post it here if your having trouble with a style
    edit: example
  • edited February 2009
    +1. I like it! But!..
    .. some of us have many, many styles, to say the least. What if you have ... hundreds(?!) of styles - it'd be a veeeery long post here. Are you sure you'd ever want to sift through a hundred of somebody's else styles (some probably modified) to try to help them?
    ChoGGi, n your table, what's 'site version'/'your version'?
  • Posted By: makondo+1. I like it! But!..
    .. some of us have many, many styles, to say the least. What if you have ... hundreds(?!) of styles - it'd be a veeeery long post here. Are you sure you'd ever want to sift through a hundred of somebody's else styles (some probably modified) to try to help them?
    ChoGGi, n your table, what's 'site version'/'your version'?
    a) users can be expected to trim the list to a relevant part, or post it all, which wouldnt really matter. if you dont think you need it, you can just scroll over it
    b) obviously, it would be the version of the style thats posted to userstyles.org and the one currently installed on your system

    ^.^
  • The whole idea of posting your styles is the hope that someone else will see what you can't. So, how would one know which part to trim? Of course, they can trim orkut styles out if they're talking about Google (even though one never knows what might be in a Google style that might actually cause a problem anyway). But application styles might be problematic.
    I think the best approach might be to have a temp bin somewhere where people can post those lists and then put a link to it in a thread. But, as you can see, i like the idea in general (that's why +1!). Implementation needs some thinking though.
    b) - thanks! it makes sense.
  • Posted By: makondo ... Of course, they can trim orkut styles out...
    Now that's a good idea!
    And I am brazilian... :)
  • So the idea behind the list is just for troubleshooting?
  • i guess it could be used for other purposes, but that's what i was thinking of
Sign In or Register to comment.