[Release] Milestone 10

Anything about browser themes, both Full Themes and Lightweight Themes (personas) should go here.

Moderators: FranklinDM, Lootyhoof

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 8977
Joined: 2012-10-09, 19:37
Location: Seriphia Galaxy

Re: [Release] Milestone 10

Post by New Tobin Paradigm » 2020-05-21, 18:34

No it isn't. Just a broken toolbar image.
As a young boy, I dreamed of being a baseball.
But tonight I say, we must move forward, not backward; upward, not forward; and always twirling, twirling, twirling towards freedom!

Image

KlarkKentThe3rd
Lunatic
Lunatic
Posts: 431
Joined: 2018-04-20, 20:31

Re: [Release] Milestone 10

Post by KlarkKentThe3rd » 2020-05-21, 18:42

Looks like this is caused by Pure URL.

User avatar
FranklinDM
Add-ons Team
Add-ons Team
Posts: 288
Joined: 2017-01-14, 02:40
Location: Manila, Philippines
Contact:

Re: [Release] Milestone 10

Post by FranklinDM » 2020-05-22, 07:27

Can't reproduce the issue on Windows:
Annotation 2020-05-22 151948.png
Annotation 2020-05-22 151948.png (3.12 KiB) Viewed 444 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.

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2785
Joined: 2015-12-09, 15:45

Re: [Release] Milestone 10

Post by moonbat » 2020-05-22, 12:05

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?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20.1 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
FranklinDM
Add-ons Team
Add-ons Team
Posts: 288
Joined: 2017-01-14, 02:40
Location: Manila, Philippines
Contact:

Re: [Release] Milestone 10

Post by FranklinDM » 2020-05-22, 15:07

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");
}

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2785
Joined: 2015-12-09, 15:45

Re: [Release] Milestone 10

Post by moonbat » 2020-05-22, 18:21

Thanks :thumbup:
I was using Javascript to set style.listStyleImage with the image file but This is the Way, as the Mandalorian would say ;)
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20.1 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

KlarkKentThe3rd
Lunatic
Lunatic
Posts: 431
Joined: 2018-04-20, 20:31

Re: [Release] Milestone 10

Post by KlarkKentThe3rd » 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.
Attachments
Screen Shot 2020-07-12 at 04.35.42.png
Screen Shot 2020-07-12 at 04.35.42.png (37.36 KiB) Viewed 328 times

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2785
Joined: 2015-12-09, 15:45

Re: [Release] Milestone 10

Post by moonbat » 2020-07-13, 09:34

I don't get it, what's cropped?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20.1 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: [Release] Milestone 10

Post by adesh » 2020-07-13, 09:48

The (action) buttons, towards the bottom of the dialog.

User avatar
Billyhook
Moongazer
Moongazer
Posts: 9
Joined: 2020-05-29, 05:49

Re: [Release] Milestone 10

Post by Billyhook » 2020-07-14, 11:08

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.

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2785
Joined: 2015-12-09, 15:45

Re: [Release] Milestone 10

Post by moonbat » 2020-07-15, 05:34

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
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20.1 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

KlarkKentThe3rd
Lunatic
Lunatic
Posts: 431
Joined: 2018-04-20, 20:31

Re: [Release] Milestone 10

Post by KlarkKentThe3rd » 2020-07-15, 07:37

I am using a Mac build.

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2785
Joined: 2015-12-09, 15:45

Re: [Release] Milestone 10

Post by moonbat » 2020-07-15, 08:05

Ah. Dunno then, could be platform specific with the theme.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20.1 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Billyhook
Moongazer
Moongazer
Posts: 9
Joined: 2020-05-29, 05:49

Re: [Release] Milestone 10

Post by Billyhook » 2020-07-16, 08:47

Awesome and pretty cool!!

User avatar
FranklinDM
Add-ons Team
Add-ons Team
Posts: 288
Joined: 2017-01-14, 02:40
Location: Manila, Philippines
Contact:

Re: [Release] Milestone 10

Post by FranklinDM » 2020-07-17, 07:21

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.
Last edited by FranklinDM on 2020-07-17, 07:25, edited 1 time in total.

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2785
Joined: 2015-12-09, 15:45

Re: [Release] Milestone 10

Post by moonbat » 2020-07-17, 07:27

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.
Last edited by moonbat on 2020-07-17, 07:29, edited 1 time in total.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20.1 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
FranklinDM
Add-ons Team
Add-ons Team
Posts: 288
Joined: 2017-01-14, 02:40
Location: Manila, Philippines
Contact:

Re: [Release] Milestone 10

Post by FranklinDM » 2020-07-17, 07:28

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.

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2785
Joined: 2015-12-09, 15:45

Re: [Release] Milestone 10

Post by moonbat » 2020-07-17, 07:40

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.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20.1 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
FranklinDM
Add-ons Team
Add-ons Team
Posts: 288
Joined: 2017-01-14, 02:40
Location: Manila, Philippines
Contact:

Re: [Release] Milestone 10

Post by FranklinDM » 2020-07-17, 07:57

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

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2785
Joined: 2015-12-09, 15:45

Re: [Release] Milestone 10

Post by moonbat » 2020-07-17, 08:04

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?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20.1 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Post Reply