aclist / kbin-kes

Add-on manager and scripting framework for kbin
MIT License
24 stars 8 forks source link

[BUG] Toggling verbose timestamp script kicks you from KES #60

Closed McBinary closed 1 year ago

McBinary commented 1 year ago

Describe the bug Toggling the verbose timestamp feature on and then back off force closes KES and reloads the browser window.

To Reproduce Open KES, General > Verbose TimeStamps > toggle the switch on then off again

Expected behavior The KES shade continues to stay open during the other toggles I've attempted.

Screenshots n/a

Megamod version: KES 1.0.3

Desktop (please complete the following information):

McBinary commented 1 year ago

I skipped over the part that says that it will reload... I stopped reading that line after the word "swedish-like"... My fault. Closing.

aclist commented 1 year ago

If you take a look at the description for that mod, it says:

Use adapted ISO8601 (Swedish-like) date/time syntax. Note: toggling off will reload the page

This mod is somewhat unique from the other ones. Originally it worked the way you describe, but we noticed that kbin tries to update timestamps after a minute has passed (34 minutes ago, 35 minutes ago...), causing these values to be overwritten. So we have to watch for changes to timestamps and restyle them in the new format.

The consequence of this is that reverting the timestamps triggers a large number of changes to all of the timestamp nodes above, which floods the observer used to watch for these time tick events and overwhelms the browser. In this case, we just set the feature to off and reload so that everything resets.

There is at least one other script that depends on a reload to reset, but we are trying to minimize these.

McBinary commented 1 year ago

Yeah, that is completely my fault for skipping past the "Note" part... I scanned that line and saw Uses swedish-like date/time and just truncated the rest of the line from my brain. I suspect I won't be the only one to do that though.

aclist commented 1 year ago

No worries. We can make it more high visibility or put it on its own line, or something along those lines.