Mibew / mibew

Mibew Messenger - open-source live support application
https://mibew.org
Other
473 stars 204 forks source link

Better button code #268

Closed klodeckl closed 2 years ago

klodeckl commented 2 years ago

When using the button code Users make http requests to the chat even if the chat is not used/opened. And the requests are sent the whole time as long as the webpage is opened and consumes resources. It would be better if requests are only made if the user clicks on the chat button.

faf commented 2 years ago

Do you mean Widget - Server interaction (in terms of Mibew architecture, see docs for more info)? If so, your suggestion would break a bunch of plugins and one of the crucial features of the application. If you meant something else, please be more specific.

klodeckl commented 2 years ago

The “Tracking and inviting” option was disabled, but I still had

in my button code. I think since I deleted that part the requests are gone. Am I right that this is the responsible feature?
faf commented 2 years ago

One should re-generate the button and replace old code after disabling the tracking. At the same time any manual changes to the button code are discouraged.

klodeckl commented 2 years ago

So a hint for regenerating the button code if this option is changed would be helpful. Normally if a feature is disabled it should not work but it still sends requests if the code is not regenerated, but a non Mibew developer does not know this. Manual code changes were not mentioned in this issue.

faf commented 2 years ago

So a hint for regenerating the button code if this option is changed would be helpful. Normally if a feature is disabled it should not work but it still sends requests if the code is not regenerated, but a non Mibew developer does not know this.

Yes. And that's the reason why the appropriate hint is displayed on each and every change of any button-related features. See the screenshot. Or sneak a peek at the template.

Manual code changes were not mentioned in this issue.

Er?... And what about the sentence quoted below?

I think since I deleted that part the requests are gone.

klodeckl commented 2 years ago

Ah, if I click save, Sorry, my fault. Sure I did the change manual because I did not know that it influences the generated button. Sorry again.