When an app is loaded in incognito or cache is cleared, you can get in a state where links are clipped instead of jumping into the more menu. The reason is that the calculation is done before the appIcon image is loaded. There's really no reliable way to tell when the image is loaded.
Proposed solution: Add an input parameter for raw SVG, which avoids the race condition of the image loading.
Not-so-good possible solutions:
[yuck] just tell devs to call navBar?.refreshNavLinks() within a setTimeout and hope you time it right. (not guaranteed and could be jittery)
[yuck] add an input parameter for hardocding the navbar image width, that way the more menu calculations don't need to rely on the appIcon image being loaded. (hacky, bug prone if the image size changes and a dev forgets to update)
[yuck] write some code that continuously checks the width of the appIcon element until it changes, probably indicating that the image has been rendered
@waldnercharles reported seeing this in a vitalware app. I've seen it sporadically in PopInsights
When an app is loaded in incognito or cache is cleared, you can get in a state where links are clipped instead of jumping into the more menu. The reason is that the calculation is done before the appIcon image is loaded. There's really no reliable way to tell when the image is loaded.
Proposed solution: Add an input parameter for raw SVG, which avoids the race condition of the image loading.
Not-so-good possible solutions:
navBar?.refreshNavLinks()
within a setTimeout and hope you time it right. (not guaranteed and could be jittery)@waldnercharles reported seeing this in a vitalware app. I've seen it sporadically in PopInsights