iTwin / viewer

Monorepo that contains the iTwin Viewer npm packages and their related packages
MIT License
24 stars 15 forks source link

Issue with iTwin Web Viewer Status Bar behaviour #298

Closed DanielRusinovXerini closed 9 months ago

DanielRusinovXerini commented 9 months ago

Hello,

We are currently using a React.JS web application that leverages the iTwin.js library to dynamically load and display iModels. Recently, we transitioned from iTwin.js v2.x and @bentley/itwin-viewer-react v6.0.0 to iTwin.js v3.x and @itwin/web-viewer-react v3.1.4. While we are aware that iTwin.js version 3.x will reach end-of-life in mid-2024, we have not yet planned our migration to v4.x.

In our current setup, we have observed an issue with the behaviour of the status bar within the iTwin Web Viewer. Occasionally, the status bar would behave weirdly and get stuck. Despite this, it appears that the iModel has fully loaded. We have examined the network requests and found no pending requests awaiting responses from the server, suggesting to me that this might be a visual bug (refer to the attached screenshot).

Although this issue does not seem to impact the functionality of the viewer, as iModels appear to load successfully, the misleading status bar behaviour is a cause for concern. We would greatly appreciate your insights on this matter.

Additionally, could you kindly clarify whether the status bar indicates the progress of loading the iModel, the map tiles, or both?

Thank you for your assistance.

Screenshot 2023-09-14 at 09 06 23
aruniverse commented 9 months ago

The tile load indicator does take into account background map imagery tiles, which might explain what you are seeing. Tiles are dynamically generated (and cahced), so if the tile doesnt exist it will take a few seconds to generate those tiles and cache them for next time.

I highly recommend upgrading to iTwin.js 4.x as soon as you can.

DanielRusinovXerini commented 9 months ago

Hi @aruniverse, thank you for your response. That all makes sense, but the problem is that sometimes the tile load indicator gets stuck for no apparent reason (models and map imagery appear to have loaded fully). I've waited for quite some time and the bar doesn't move at all. The behaviour is different every time I open the Viewer. As I said, this doesn't seem to cause any problems with the functionality, but I'm keen to understand why this is the case.