It was not storing its current value properly, thanks to an incomplete
refactoring ages ago during which etag and lastmodified types were
joined into httpheader.
Closes#4806
* 🐛 Reduce intersection observer threshold
When this value is 1, scrolling down the page (sometimes?) triggers the value to change - probably something changes invisibly. Setting it to anything less than 1 seems to cure the issue, and there are no longer unwanted triggers of changes. 1% also seems to make more sense here than 100% - we want the webcam to load whenever even a tiny amount of it is visible.
* ♻️ Change visibility observer threshold to 1%
* ♻️ Use log.debug instead of console.debug
---------
Co-authored-by: Gina Häußge <gina@octoprint.org>
We need to reset emptyLayers (and should - for the sake of consistency -
also reset percentageByLayer) after running an analysis because
otherwise old values will stay in there until page reload, causing layers
to not render that actually are not empty but were in any previously
loaded model.
`None` values were converted to an empty string by sv, leading to
comparison issues with (correct) integers. Using the default order
value for sv fixes that.
Closes#4818
In that case the nav container isn't available, and thus
the attempt to select the first link from that to activate
simply failed silently.
Instead we now check whether the nav container is
even there, and if not just activate the first tab pane.
Closes#4791
Avoids issues with chunked transfers that remove the "Content-Length" header, which the GCODE viewer requires for calculating percentages for progress monitoring.
Closes#4772
* Use webcam container for intersection instead of controls
* Removed check for tab visibility, fully rely on control.js logic
* Allow intersection observers to be recreated
* Use onStartupComplete as callback to defer intersection initialization
Apparently we have an issue when updating from an older OctoPrint install
that included that to a newer one that depends on OctoPrint-Setuptools, because
the `octoprint_setuptools` package simply won't be installed in that case.
A reinstall after updating OctoPrint makes it available, but that's not something
we can do in the field.
Long term this needs a better solution, short term we are simply going to provide
OctoPrint-Setuptools to pyproject.toml users, and a vendored copy here. It's the
only solution I see for now.
Really closes#4749