termynal / termynal.py

Python markdown terminal. Built for mkdocs
https://termynal.github.io/termynal.py/
MIT License
85 stars 8 forks source link

Animation doesn't start - fast and restart buttons do not render #22

Closed carried-away closed 5 months ago

carried-away commented 5 months ago

Hey again

Sorry for opening a second issue. I don't think this one is due to a conflict with another plugin or extension.

The animation does not start. The termynal asset displays at its last frame without the "fast" or "restart" buttons appearing.

However, this only happens if i navigate to the page with termynal on it through the nav: menu. If I go to the page via the URL, the animation starts and everything appears as intended. Also, if I navigate to the page through the nav: menu and get the static image, if I do a refresh on the page, animation plays fine.

Full disclosure, I do not have this issue with the official docker image from squidfunk.

This is only occurring on the mkdocs-material package installed via PIP install.

I was just hoping that during the development of this plugin that you ran into this issue or something similar and might know a workaround.

Edit:

Once again this isn't an issue with your plugin. I know the "What", just not sure about the "Why" yet.

Contingent on how the nav menu is configured, links may not trigger a GET request. The lack of the GET request fails to trigger the termynal animation.

daxartio commented 5 months ago

Thank you for detailed explanation.

carried-away commented 5 months ago

For anyone else that might be running into this problem, the issue was the navigation.instant feature.

https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/?h=navigat#instant-loading

without fully reloading the page

I don't know how I didn't catch this sooner. I turned it off and everything is working as expected.

AnvithLobo commented 4 months ago

Had the exact same issue and had to troubleshoot my way to come to the same conclusion.

Only then was I able to lookup this issue with the keyword instant

Since disabling this is crucial for the functionality of the pugin. I think It would be a good idea to put this in the documentation.