Page 5 of 6

Re: [Release] Milestone 10

Posted: 2020-05-21, 18:34
by New Tobin Paradigm
No it isn't. Just a broken toolbar image.

Re: [Release] Milestone 10

Posted: 2020-05-21, 18:42
by KlarkKentThe3rd
Looks like this is caused by Pure URL.

Re: [Release] Milestone 10

Posted: 2020-05-22, 07:27
by FranklinDM
Can't reproduce the issue on Windows:
Annotation 2020-05-22 151948.png
Annotation 2020-05-22 151948.png (3.12 KiB) Viewed 434 times
I'm not entirely sure (and might be wrong) about what causes this, but it might have something to do with how Pure URL defines its toolbar image by using the `image` attribute instead of styling it through CSS.

Re: [Release] Milestone 10

Posted: 2020-05-22, 12:05
by moonbat
FranklinDM wrote:
2020-05-22, 07:27
I'm not entirely sure (and might be wrong) about what causes this, but it might have something to do with how Pure URL defines its toolbar image by using the `image` attribute instead of styling it through CSS.
Pure URL has always used CSS 'list-style-image' to set the button image - as in the CSS here, browser overlay here.

Edit - I found the problem, I'm dynamically setting the image directly depending on if the extension is turned on or not. Is there a way to do that with CSS?

Re: [Release] Milestone 10

Posted: 2020-05-22, 15:07
by FranklinDM
You can set a state attribute in the toolbar button itself to track whether the extension is enabled. There are also other methods that could be used to achieve this such as updating the toolbar button's class, etc.

JS Pseudo-code:

Code: Select all

var tb = document.getElementById("button-pureurl4pm");
tb.removeAttribute("state");
if (!extensionIsEnabled) {
  tb.setAttribute("state", "disabled");
}
In CSS:

Code: Select all

#button-pureurl4pm {
  list-style-image: url("chrome://pureurl4pm/skin/icon-green.png");
}
#button-pureurl4pm[state="disabled"] {
  list-style-image: url("chrome://pureurl4pm/skin/icon-red.png");
}

Re: [Release] Milestone 10

Posted: 2020-05-22, 18:21
by moonbat
Thanks :thumbup:
I was using Javascript to set style.listStyleImage with the image file but This is the Way, as the Mandalorian would say ;)

Re: [Release] Milestone 10

Posted: 2020-07-13, 09:00
by KlarkKentThe3rd
After the latest few updates, Milestone does not play well with Pure URL. 1 more option = 1 extra row = new row cropped. The OK/Cancel options are still ckickable (barely), but this needs to be fixed.

Re: [Release] Milestone 10

Posted: 2020-07-13, 09:34
by moonbat
I don't get it, what's cropped?

Re: [Release] Milestone 10

Posted: 2020-07-13, 09:48
by adesh
The (action) buttons, towards the bottom of the dialog.

Re: [Release] Milestone 10

Posted: 2020-07-14, 11:08
by Billyhook
FranklinDM wrote:
2019-10-31, 14:58
Here's the test version of the Milestone 10 theme,
Moderator note: excessive quoting removed.

It is a wonderful theme, I have just downloaded it and I will definitely speak if something goes wrong.

Re: [Release] Milestone 10

Posted: 2020-07-15, 05:34
by moonbat
KlarkKentThe3rd wrote:
2020-07-13, 09:00
After the latest few updates, Milestone does not play well with Pure URL. 1 more option = 1 extra row = new row cropped. The OK/Cancel options are still ckickable (barely), but this needs to be fixed.
Fresh profile with nothing but latest Pure URL (3.0.3 as of today) and Milestone -


Image

Re: [Release] Milestone 10

Posted: 2020-07-15, 07:37
by KlarkKentThe3rd
I am using a Mac build.

Re: [Release] Milestone 10

Posted: 2020-07-15, 08:05
by moonbat
Ah. Dunno then, could be platform specific with the theme.

Re: [Release] Milestone 10

Posted: 2020-07-16, 08:47
by Billyhook
Awesome and pretty cool!!

Re: [Release] Milestone 10

Posted: 2020-07-17, 07:21
by FranklinDM
KlarkKentThe3rd wrote:
2020-07-13, 09:00
... The OK/Cancel options are still ckickable (barely), but this needs to be fixed.
Because of how Pure URL's options window is set up (it's not a prefwindow), its dimensions (including the screen position) is preserved or "persisted" by the browser and might not be updated if something changes in the options window's layout. I can't do anything about this since it has nothing to do with the theme and is something that may have to be fixed by moonbat.
Excerpt from xulstore.json in the profile directory
Excerpt from xulstore.json in the profile directory
With that said, you can manually reset these values through the following steps:
  1. Go to about:config and set devtools.chrome.enabled to true
  2. Open the Scratchpad, which could be found at Tools > Web Developer > Scratchpad
  3. In the Scratchpad window, set the Environment > Browser.
  4. Copy and paste the following code:

    Code: Select all

    function removeWH() {
      let xulStore = Components.classes["@mozilla.org/xul/xulstore;1"]
                        .getService(Components.interfaces.nsIXULStore);
      xulStore.removeValue(
        "chrome://pureurl4pm/content/options.xul",
        "pureurl-options-dialog",
        "width");
      xulStore.removeValue(
        "chrome://pureurl4pm/content/options.xul",
        "pureurl-options-dialog",
        "height");
    }
    removeWH();
    
  5. Click Run and close the Scratchpad window without saving.
  6. Go to about:config and set devtools.chrome.enabled to false
What this code does is it removes the persisted values from the (not well-documented) XUL store and thus fixes the incorrect height in Pure URL's options window. moonbat may opt to add similar code when he changes the options window's layout or perhaps modify it to become a prefwindow instead.

Re: [Release] Milestone 10

Posted: 2020-07-17, 07:27
by moonbat
FranklinDM wrote:
2020-07-17, 07:21
I can't do anything about this since it has nothing to do with the theme and is something that may have to be fixed by moonbat.
I have set persist="screenX screenY width height" in the options dialog. Will removing that help? I can put out a test XPI for Klarkkentthe3rd to test out.

I tried making it into a prefwindow, but the garbage field list doesn't directly map to a preference string, and I gave up when it resulted in a lot of inconsistent behavior.

Re: [Release] Milestone 10

Posted: 2020-07-17, 07:28
by FranklinDM
Removing [width height] should work, but you also have to remove the persisted values from the XUL store at some point (perhaps in a function that gets called only when you change the layout code) to ensure that the behavior is consistent.

Re: [Release] Milestone 10

Posted: 2020-07-17, 07:40
by moonbat
FranklinDM wrote:
2020-07-17, 07:28
remove the persisted values from the XUL store
How does one do that?

@Klarkkentthe3rd - please try this version and let me know if it fixes the dialog.

Re: [Release] Milestone 10

Posted: 2020-07-17, 07:57
by FranklinDM
moonbat wrote:
2020-07-17, 07:40
How does one do that?
See the code I wrote above inside the removeWH function.

Re: [Release] Milestone 10

Posted: 2020-07-17, 08:04
by moonbat
Should I keep this function as a one time fix, just for this build for Klarkkentthe3rd, since I can remove the width and height persistence from options.xul?