Skip to content

KopiaUI: snapshot error tooltip disappears after a moment and won't come back (and is missing entirely on htmlui master) #5709

Open
kopia/htmlui
#488

Description

@fabiomanz

What happens

When the last snapshot of a source had errors, the Snapshots list shows a red warning triangle next to the size. Hovering it shows the error list, but the tooltip closes within a few seconds and doesn't reappear unless the mouse leaves the icon and comes back. In practice the hover "works once" and feels unreliable.

Seen in KopiaUI v0.23.1 on macOS (htmlui e9f6ace).

Steps to reproduce

  1. Have a source whose last snapshot reported errors (e.g. a few permission denied files).
  2. Open Snapshots in KopiaUI.
  3. Hover the red triangle in the Size column and keep the mouse still.

Expected: the tooltip stays open while hovering.
Actual: it closes after at most ~3 seconds and stays closed.

Cause

There are two separate problems in kopia/htmlui:

  1. Every table cell is remounted on every render. KopiaTable renders cells with flexRender(cell.column.columnDef.cell, ...). The pages define columns inline in render(), so each cell: (x) => ... is a new function on every render, and flexRender mounts a function as a component. A new function is a new component type, so React unmounts and remounts every cell. The Snapshots page polls /api/v1/sources every 3 s and re-renders twice per poll. A MutationObserver on the Size cell recorded its contents being removed and re-added 20 times in 10 s. Removing the hovered element closes the native tooltip.

  2. On current master the tooltip is gone completely. sizeWithFailures() passes the error list as <FontAwesomeIcon title={caption} />. fontawesome-svg-core 6.x rendered that as an SVG <title>, but since the bump to 7.3.1 (build(deps): bump @fortawesome/fontawesome-svg-core from 6.7.2 to 7.3.1 htmlui#463) title is ignored and the SVG is rendered aria-hidden="true" with no <title>. The "Cancel task" icon in taskutil.jsx lost its tooltip the same way. This isn't in a release yet, but it will be in the next one.

Related

#883 (2021) replaced a flickering error popover on this icon with the native title tooltip. The flicker was likely the same constant remounting, which a native tooltip only partly hides.

I have a fix for both and will open a PR on kopia/htmlui.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions