pyxelr / dark-google-calendar

Dark theme for Google Calendar.
MIT License
143 stars 18 forks source link

Stylus disables/re-enables itself repeatedly #21

Closed seansfkelley closed 10 months ago

seansfkelley commented 10 months ago

I'm having a very strange issue, and I can't tell if it's Stylus or this stylesheet or the both of them interacting together. When I load Google Calendar, Stylus disables and re-enables itself a couple times, and then (usually) settles on being disabled. I can re-enable just by clicking the Stylus icon in the toolbar, and it'll stick, until I start interacting with certain elements in the calendar.

This only happens with this stylesheet -- none of my others ever disable themselves or Stylus as far as I can tell.

Here's a cropped (for privacy) screencap:

https://github.com/pyxelr/dark-google-calendar/assets/2101409/f728d8d4-aff9-46ea-9a28-442b657df951

Sorry it's not as helpful as it could be; I wasn't sure how to demonstrate it while keeping my calendar content private. The first time the mouse disappears and it flashes white, I clicked on regular event to view it in a popup. The second time, I do the same to an all-day event. Strangely, after I've hovered on these different things, doing so again doesn't cause Stylus to unset itself until I refresh the page again.

I wonder if this is some iframe nonsense? I notice that there are a lot in Google Calendar, and that one of them has the same name as the main page, but only contains the stylesheet:

image

This sounds kind of like #14.

pyxelr commented 10 months ago

This is a very intriguing issue, and I am unsure how a CSS modification could re-enable Stylus. Perhaps, it has something to do with iframes or the inner workings of Stylus for different browsers (I am using Chrome and have never observed such problems).

I have a couple of ideas to resolve it:

  1. Could you have a look if your Stylus settings are similar to mine?

<img src="https://github.com/pyxelr/dark-google-calendar/assets/30161753/7798bcd7-4aec-4356-8e8b-d92a3ad4c983" width="500" height="700" />

  1. Could you try disabling any other themes which are currently applied, disabling other browser extensions, or simply trying it out in an incognito mode? Perhaps, it also relates to the applied browser, since you seem to be using Firefox like in #14?

  2. @Korb: May I ask if you had any particular workaround for #14? Did the issue come back?

  3. Lastly, I am unsure if it is related only to Firefox browsers by looking at this Stylus GitHub issues. Maybe you could also try creating this issue in their repository? I would be curious to know the answer myself.

Korb commented 10 months ago

May I ask if you had any particular workaround for After restarting the browser, the first time an event is created, the dark theme is disabled #14? Did the issue come back?

At some point, I turned off this style, and did not use it. Now I turned it on again, ran through the functions - everything works flawlessly.

My settings that I cannot change (all changes made to them are reset after close, there is no Save button, there are "Reset options", "Shortcuts" and "Close" only):

2023-08-30_15-55-21

Mozilla Firefox 118.0b2 (64-bit), Stylus 1.5.33 (June 11, 2023), Microsoft Windows 10.0.19045.3393

seansfkelley commented 10 months ago

My settings are largely the same:

image

Though I do configure Stylus to only inject this theme when the system is in dark mode:

image

(Note that I did not toggle light/dark mode in my video above; you can see that the browser toolbar didn't change.)

Firefox 116.0.3, Stylus 1.5.33, macOS 13.4.

I just installed Chrome to give it a try, and yeah, it doesn't happen there. I suspect this is actually a Stylus issue, so I'll close this out and file a ticket there instead.