I have a script on my page, that triggers a reload of the page on receiving a websocket signal.
And pinegrow keeps popping up this confirmation message in spite of the fact that the page wasn’t edited (notice no asterik next to the file name index.html).
In fact, I have noticed, refresh of an edited html page (with an asterik on the filename), doesn’t actually show any such confirmation message, this is when it’s more important to show a confirmation dialog.
I have never got the “reload site” message from any UI actions. This shouldn’t be shown especially when it’s unnecessary (when the page is in an unedited state)!
Thanks @red-rosefields & @droidgoo, I removed the vs-code pg extension, restarted both vs-code & pinegrow, didn’t fix it…
Going by pinegrow’s philosophy that we are not locked-into pinegrow and we can work on pinegrow alongside other tools like vs-code…
… I don’t see any use-case scenario where this dialog (“Reload site”) can be shown except when we quit pinegrow and there are unsaved open files (with an asterisk next to the filename). Even then, this dialog can’t be “Reload site”, as it’s only to do with unsaved open files.
Hopefully, the pinegrow pro team can assist here. Cheers!
This gif from this page pretty much explains how it’s suppose to work (not talking about instant live update for eg, with vscode pg plugin, rather auto-refresh on save):
This question is a little bit of a black box. Can you share the script that is causing the original problem? Typically a reload will not lose any edits that have been made to the page, hence the lack of notification.
Thanks for looking into this. Here is a simple replication of the issue, click button to reload.
In my real app, I trigger reload when I receive socket updates for certain events (on an avg every minute). And I’m forced to deal with this dialog every minute while I’m working on a live site.
Hmmm… what changes are happening on the site in the intervening minute? Your example above doesn’t trigger the dialog. Usually this type of warning only pops up if there is user input that would be lost on reset. Normally other changes should be cached and persist through a reload.
Hi @RobM, Im running macOS Catalina v10.15.3, PG 5.972.
Please see gif attached, it shows my PG settings also. I did have the vs-code extension installed earlier and had my project open in vs-code, but I removed the extension and closed vs-code (not sure if it matters).
Another way to approach this issue, if you could find out when this dialog in PG workflow is shown functionally, and I could then do some trial and error by changing the settings to avoid this dialog.
As my post above shows, the dialog wasn’t popping up for me. That was when I just opened a file and added your code. Given that @Pinegrow_User and you were able to trigger it, I tried saving the file and opening as a project. Now the dialog triggers. That dialog seems to be a lower level NW.js dialog. I’m not sure if much can be done to stop it from appearing. I think you will have to temporarily disable that bit of javascript when working in Pinegrow.