Skip to content

Navbar links clipping instead of jumping into more menu #2225

Description

@corykon

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.

image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnew patch version number to the library

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions