Stylish 0.5a

edited March 2007 in Stylish
Stylish 0.5a

It's not feature-complete, but it's got a lot of stuff:

Manage dialog:
-Pretty icons
-Filter
-Englisher "Applies to" values

Edit dialog:
-Data URI upload
-!important-izer
-Reshuffled UI
-Simple/advanced views on install
-It's All Text integration

General:
-Accesskeys galore
-Cleaned up code
-SeaMonkey support

Caveats:
-SeaMonkey support not tested
-Thunderbird support not tested and unlikely to work
-en-US only
«13

Comments

  • edited March 2007
    Hey Jason
    New interface looks nice & I like the new icons, but when I try to edit a style, button opens a small empty window.
  • What version of Firefox do you use, and on what OS? Can you set javascript.options.showInConsole to true in about:config and see if anything comes up in the Error Console?
  • edited March 2007
    Lookin' real good!

    Like Doorman, I'm getting some problem when trying to edit a style. The first time I edit a style it seems to work, but the window isn't being drawn properly...it's like the window size isn't being calculated properly. One time it just created a window that was just the titlebar, and then another time it looked like this:

    image

    The second time I try to edit a style, no edit window pops up at all.

    The error console says:

    No chrome package registered for chrome://itsalltext/content/API.js .

    Also, when I close firefox, it doesn't close properly....I have to kill the process manually.

    I'm using Firefox 2.0.0.2 with a newly created profile on WinXP.
  • Working good in the latest Minefield release...Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a3pre) Gecko/20070301 Minefield/3.0a3pre. No problems with the editor window being drawn strangely, and editing a style always works.

    I found one bug with the search box though...if you type in something that won't match any styles like "sadfkjhsa", it will say that I have no styles installed and that I should visit userstyles.org. The only way to see my styles is to close and then open the manager window again.
  • edited March 2007
    Working fine, for me, with Ff v2.0.0.2, although I do get the same results as Valacar, doing a "nonsense" search. Initially, the window was smaller than I like but resizing has persisted through a restart.

    I wonder if those experiencing difficulties might have "Stylish" related entries in 'userChrome.js', 'userChrome.css' or "Stylish", itself, that may be causing the problem?

    One suggestion; either have the links open in a new tab, rather than window, or give users the option. Other than that, I like it.
    image
  • Getting the same as TheDoorman, when opening the manage window I get this in the error console:

    Warning: reference to undefined property primary.childNodes[i]
    Source file: chrome://stylish/content/browserOverlay.js
    Line: 176

    Then when editing the first style:

    No chrome package registered for chrome://itsalltext/content/API.js .

    Opens but small.

    Close and try to edit again, no response but a little activitiy on the mouse pointer for a second or two. Click edit or doubleclick a style a second time and the window opens tiny and empty.

    Fx 2.0.0.2 on Vista RTM. I'll try a clean profile and report.
  • Posted By: ValacarNo chrome package registered for chrome://itsalltext/content/API.js .
    This is normal behaviour if you don't have It's All Text installed.
    Posted By: ValacarThe first time I edit a style it seems to work, but the window isn't being drawn properly...it'slike the window size isn't being calculated properly.
    I set the default size too small, looks like.
    Posted By: ValacarThe second time I try to edit a style, no edit window pops up at all.
    This concerns me. It probably opened, but was invisible or hung or something, which is why your Firefox went nuts.
    Posted By: ValacarI found one bug with the search box though...if you type in something that won't match any styles like "sadfkjhsa", it will say that I have no styles installed and that I should visit userstyles.org.
    I should change it to only give that message if there are no styles AND the filter is blank.
    Posted By: WeishunOne suggestion; either have the links open in a new tab, rather than window, or give users the option.
    Bug 263433 – 'text-link' xul widget class does not respect tabbed browsing preferences
    Posted By: arteekay (rtk)when opening the manage window I get this in the error console:

    Warning: reference to undefined property primary.childNodes[i]
    Source file: chrome://stylish/content/browserOverlay.js
    Line: 176
    Which menu are you using to open the Manage dialog?
  • although Manage Styles loads in the sidebar and as tab page, it does not show the toolbar there, only in the standalone window (which i prefer not to use)..

    i also had a Fx 2.0.0.2 freeze (had to taskmgr kill) upon choosing a style and clicking Edit.
  • Not showing the toolbar when in the sidebar is by design - there just isn't enough room.

    I haven't seen this edit problem yet.
  • Posted By: Jason Barnabe (np)This is normal behaviour if you don't have It's All Text installed.
    So that means the It's All Text extension is required to be installed in order to allow style editing in an external text editor, right? No plans to make it a built-in feature (so we don't have to have It's All Text installed)?
  • Posted By: Jason Barnabe (np)Not showing the toolbar when in the sidebar is by design - there just isn't enough room.
    well, with MultiSidebar (allows making sidebar horizontal on top or bottom) there's no need; there are ways around the archaic fixed narrow vertical pane. plus there's plenty of room in a tab.. anyway, a simple display: -moz-box makes it show but seems it should be there by default with horiz scroll if nec.

    currently double clicking a style first time on restart brings up the editor properly, on a second try it brings up a tiny titlebar which when drag expanded is just a blank window with horizontal double arrow.. on a minimal profile, with Manage Styles both as external window and from sidebar.

    in console, only a sessionstore.js error and:

    No chrome package registered for chrome://itsalltext/content/API.js .
  • Alice0775 posted a userChrome hack over on mozillaZine to edit styles in an external editor and return them


    [Ext] userChrome.js 0.7 - mozillaZine Forums

  • edited March 2007
    it should be there by default with horiz scroll if nec.
    It was originally a bunch of buttons and I took it out because people didn't want it... I personally don't use the sidebar, so whatever the majority of people tell me to do, I do.
  • I am getting the following at the bottom of the browser [firefox 2.02]

    image

  • A suggestion for the !important-izer function. It would be nice if it would preserve the scroll position in the text box when adding !important. Here's the code:

    function makeImportant() {
    //preserve scroll position
    var box = codeElement.mInputField;
    var scroll = [box.scrollTop, box.scrollLeft];

    ...your code...

    //restore scroll position
    box.scrollTop = scroll[0];
    box.scrollLeft = scroll[1];
    }

    Also, I've seen cases where people use "! important" with a space, which is valid. In that case a second !important is added. This is fixed by using !\s*important in the line that checks for !important already being there. I changed it on my end and it works great!

    Awesome work on this, my favorite extension.
  • Posted By: theaulddublinerI am getting the following at the bottom of the browser [firefox 2.02]
    You using en-US?

    pile0nades, thanks, I'll try that out.
  • edited March 2007
    Bug found. When using the !important function with the following reduced testcase (bug found in deviantART Black style), the first !important is doubled, and the second rule fails to be !important'ed at all.

    #thread {
    color: #eee !important;
    color: #eee
    }
  • Posted By: Jason Barnabe (np)
    Posted By: theaulddublinerI am getting the following at the bottom of the browser [firefox 2.02]
    You using en-US?

    no - en-GB
  • What is the significance of the numbers next to the style names in the statusbar display?
  • Posted By: pile0nades#thread {
    color: #eee !important;
    color: #eee
    }
    I thought I handled this case. I'll check again.
    Posted By: theaulddublinerno - en-GB
    It's not localized yet, so only en-US will work.
    Posted By: WebbWhat is the significance of the numbers next to the style names in the statusbar display?
    Accesskeys.
  • Posted By: WebbWhat is the significance of the numbers next to the style names in the statusbar display?
    Accesskeys.
    Am I missing some documentation? What is the trigger key - alt, shift, etc?
  • It's an accesskey, not a shortcut key. When the menu has focus, you just press the number.
  • Something may be overriding it but pressing a number doesn't do anything but close the menu. And I have two 1s visible, one in the page style and one in the global styles.

    No matter, it's easier to right click them anyway.
  • It should enable/disable the style (as if you had clicked on it).
  • OK, got it now.
  • edited March 2007
    Posted By: Jason Barnabe (np)
    Posted By: ValacarI found one bug with the search box though...if you type in something that won't match any styles like "sadfkjhsa", it will say that I have no styles installed and that I should visit userstyles.org.
    I should change it to only give that message if there are no styles AND the filter is blank.
    I prefer to make the tree focused rather than to use the search box.
    Posted By: Jason Barnabe (np)
    it should be there by default with horiz scroll if nec.
    It was originally a bunch of buttons and I took it out because people didn't want it... I personally don't use the sidebar, so whatever the majority of people tell me to do, I do.
    I don't use sidebar either, but perhaps a context menu would help

    screenshot

    --- content\manage.xul 2007-02-25 18:21:12.000000000 +0700 +++ content-mod\manage.xul 2007-03-06 22:15:54.000000000 +0700 @@ -42,6 +42,17 @@ <key keycode="VK_F1" oncommand="document.getElementById('help-link').click()"/> </keyset> + <popupset> + <popup id="stylish-manager-popup"> + <menuitem id="context-add" label="&write;" accesskey="&write.ak;" oncommand="openAdd()"/> + <menuitem id="context-edit" label="&edit;" accesskey="&edit.ak;" oncommand="handleEditButtonClick()"/> + <menuitem id="context-delete" label="&stylish.delete;" accesskey="&stylish.delete.ak;" oncommand="handleDeleteButtonClick()"/> + <menuseparator id="stylish-manager-popup-separator"/> + <menuitem id="context-update" label="&findupdates;" accesskey="&findupdates.ak;" oncommand="findUpdateButtonClick()"/> + <menuitem id="context-help" label="&help;" accesskey="&help.ak;" oncommand="document.getElementById('help-link').click()"/> + </popup> + </popupset> + <label id="help-link" class="text-link" href="http://userstyles.org/stylish/help"/> <deck id="hide-tree" flex="1"> @@ -58,7 +69,7 @@ &info; </description> - <tree id="styles" flex="1" editable="true" onselect="changeSelection()" persist="sortDirection sortResource" sortDirection="ascending" sortResource="description" onkeypress="styleListKeyPress(event)" enableColumnDrag="true"> + <tree id="styles" flex="1" editable="true" onselect="changeSelection()" persist="sortDirection sortResource" sortDirection="ascending" sortResource="description" onkeypress="styleListKeyPress(event)" enableColumnDrag="true" context="stylish-manager-popup"> <treecols> <treecol id="description" label="&stylish.description;" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="sortDirectionIndicator" sortDirection="ascending"/> <splitter class="tree-splitter"/>


  • There are already ways of getting most of those things to happen... Delete by pressing Delete, Edit by double clicking on a line, Write by double clicking on an empty spot, Help by pressing F1.
  • Posted By: ValacarThe second time I try to edit a style, no edit window pops up at all.
    Posted By: alta88currently double clicking a style first time on restart brings up the editor properly, on a second try it brings up a tiny titlebar which when drag expanded is just a blank window with horizontal double arrow.. on a minimal profile, with Manage Styles both as external window and from sidebar.
    It looks like this only happens when It's All Text! isn't installed. I'm going to have to look more into it, but it looks like a Firefox bug.
  • Has anyone seen the edit dialog not opening bug in a nightly? I'm trying to see if this is something that's been fixed in Firefox (and if so, the Bugzilla bug) so I can inform the author of It's All Text!.
Sign In or Register to comment.