-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically update the inspector results #3
Comments
@imantsk this is awesome! I hope you don't mind me integrating your code into v1.4.0 which I've just pushed to the .org repo. Have a look and let me know what you think. One thing I noticed, sometimes clicking on the inspection result accordion does not work smoothly... i.e. panel is rolled up again so I have to click again to show the content. I'm guessing it has to do with the openClose function but was not able to troubleshoot today, so, I'm releasing as is with modification to the polling interval to 2500 ms, which seems to reduce the likelihood of experiencing this glitch. Again, thank you! I've added props to your suggestion here on the changelog at https://wordpress.org/plugins/variable-inspector/#developers |
@qriouslad I'm happy you liked my solution and have already integrated it in the update :)) I noticed that too, and I believe you guessed right, my openClose function might act not as smooth as the one that Simple Accordion uses. I had to make it up because of how JS/jQuery works: all event bindings of child elements are lost after the parent element's inner html is changed. Also, the reason why I choose to re-bind this function to Thank you again for publishing my little improvement and form mentioning me in the change log too. |
@imantsk Glad you're happy with the code inclusion too! Let's leave openClose() as is then. I am happy enough with how it currently works. Have a great day where you are!... and don't hesitate to suggest other changes/improvements in the future. |
Hi! 👋 I thought this was worth sharing..
Just for better usability and faster workflow, for a while, I felt the need to have the results updating automatically on the page as well as a quick way to access the
do_action(...);
function to copy in my code.So I made up my quick solution, used jQuery and Ajax to achieve my UI needs, and Code Snippets plugin to implement the code.
This little snippet adds:
do_action(...);
text line in the header bar, wrapped in<pre>
tags for quicker selectionWhen Auto update is enabled and a result accordion is opened, the Auto updating stops.
The snippet is also available in my repo: https://github.com/imantsk/variable-inspector-autoload
P.S.: This solution is far from perfect and these functionalities could be implemented better and in a cleaner fashion, however, I really needed my workflow fix so I whipped up some jQuery and here we go! 😅
The text was updated successfully, but these errors were encountered: