miguelgrinberg / turbo-flask

Integration of Hotwire's Turbo library with Flask.
MIT License
301 stars 35 forks source link

Toggle Turbo Progress Bar #48

Closed ererdfdfcvcv closed 1 year ago

ererdfdfcvcv commented 1 year ago

Hey,

I am new to web application development and flask. I am using turbo-flask for updating a loading bar and some progress messages. So far everything works fine, but ...

a Turbo Progress Bar keeps appearing at the top of the site when running the server. I understand where the bar comes from and found the corresponding JS calls. Currently, I am hiding the bar by extending the .turbo-progress-bar CSS class with "display: none".

Is there a possibility to completely block the creation of the bar. Interestingly, the example @ https://blog.miguelgrinberg.com/post/dynamically-update-your-flask-web-pages-using-turbo-flask creates no bar. Even though my application is set up the exact same way (as far as I understood), the bar is automatically created in my app.

Greetings, Marc

miguelgrinberg commented 1 year ago

Turbo-Flask just integrates turbo.js into your Flask application. If you need to customize turbo.js, then you can do so as documented by that project. See the progress bar documentation for help.

ererdfdfcvcv commented 1 year ago

Thank you for the fast reply! The documentation gave me the hint I needed to delay/prevent the creation.

Thanks again for the help and quick response.