Birkbjo / OctoPrint-Themeify

Beautiful themes for OctoPrint
94 stars 35 forks source link

New custom config settings aren't being applied to new console messages #100

Open jeffeb3 opened 3 years ago

jeffeb3 commented 3 years ago

Hi, I published a small plugin to change the class of sent and received messages from the terminal in octoprint. This is working well, but a lot of people want their own style for these (understandably). So I started recommending themeify.

In my first tests, I was just applying new rules to span.received and span.sent and it seemed to work ok. But after I enable the setting in the Themeify config dialog, it only applies the style to messages that were already there. It doesn't affect new messages coming out after that change, and a page refresh doesn't show any of the custom style.

Here is an issue reported in TerminalMessaging, with a firefox inspector view of the problem: https://github.com/jeffeb3/OctoPrint-TerminalMessaging/issues/10

I looked and I wonder if this is related to #88?

Is there something I can add in my plugin to make this trigger more easily for systems that have themeify?

The code in my plugin is super simple: https://github.com/jeffeb3/OctoPrint-TerminalMessaging/blob/master/octoprint_terminalmessaging/static/js/terminalmessaging.js#L15

Birkbjo commented 3 years ago

That is indeed correct, currently it will not update dynamically. I will merge the stylesheet-rework branch which fixes this after some more testing. https://github.com/Birkbjo/OctoPrint-Themeify/tree/stylesheet-rework

You are welcome to test that branch out and see if it works as intended for your plugin.